I have done this
Code: Select all
#Singleinstance Force
counter := 0 ;initiate variable
Counter2 := 0
counter3 := 0
counter4 := 0
gui,font, s11, Verdana, w450
gui,add,text,x5 y5 w150 h20 vcounterText,Bandejas: 0
gui,add,text,x5 y25 w150 h20 vcounter2Text,Cerradas: 0
gui,add,text,x5 y45 w150 h20 vcounter3Text,Pendientes: 0
gui,add,text,x5 y65 w150 h20 vcounter4Text,Derivadas: 0 ;add text to the gui, vcounterText sets counterText as a variable associated with this control
Gui +LastFound +AlwaysOnTop +ToolWindow -Theme -Border
Gui, Margin, 5, 5
OnMessage(0x201, "WM_LBUTTONDOWN")
gui,show,x50 y50,Contador ;not specifying width/height causes it to autosize
return
WM_LBUTTONDOWN() {
PostMessage, 0xA1, 2
}
!Numpad7:: ;Sumar una cerrada / mas una bandeja
counter2++
counter++ ;simplest way to increase a variable by 1
guicontrol,,counterText, % "Bandejas: " counter ;update the text control
guicontrol,,counter2Text, % "Cerradas: " counter2
return
!Numpad8:: ;Sumar una Pendiente / mas una bandeja
counter3++
counter++ ;simplest way to increase a variable by 1
guicontrol,,counterText, % "Bandejas: " counter ;update the text control
guicontrol,,counter3Text, % "Pendientes: " counter3
return
!Numpad9:: ;Sumar una Derivada / mas una bandeja
counter4++
counter++ ;simplest way to increase a variable by 1
guicontrol,,counterText, % "Bandejas: " counter ;update the text control
guicontrol,,counter4Text, % "Derivadas: " counter4
return
!Numpad1:: ;Restar una Cerrada / una bandeja menos
counter2--
counter-- ;simplest way to reduce a variable by 1
guicontrol,,counterText, % "Bandejas: " counter
guicontrol,,counter2Text, % "Cerradas: " counter2
return
!Numpad2:: ;Restar una Pendiente / una bandeja menos
counter3--
counter-- ;simplest way to reduce a variable by 1
guicontrol,,counterText, % "Bandejas: " counter
guicontrol,,counter3Text, % "Pendientes: " counter3
return
!Numpad3:: ;Restar una Derivada / una bandeja menos
counter4--
counter-- ;simplest way to reduce a variable by 1
guicontrol,,counterText, % "Bandejas: " counter
guicontrol,,counter4Text, % "Derivadas: " counter4
return
guiclose: ;built in event that fires when a gui is closed
exitapp ;when gui is closed, exit the program
What i want to do now, is a new one but... this time, the gui must to count by herself... Like watching my actions and, depending on the action, + or - on one/or more of the types listed. What i do is select a classification from a menu on a web page(in chrome) and click a button to send it to a server. That's what the GUI/script must watch and then + or -
Is there commands to make this? Any idea?