Background script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
youdontknowme
Posts: 14
Joined: 03 Aug 2017, 10:40

Background script

29 Aug 2017, 11:09

Hello everyone, i'm back for new help.

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?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Background script

29 Aug 2017, 13:20

Even simpler way to reduce that variable by 1 ...
guicontrol,,counter4Text, % "Derivadas: " counter4 - 1
youdontknowme
Posts: 14
Joined: 03 Aug 2017, 10:40

Re: Background script

01 Sep 2017, 11:22

Any help here?!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Spawnova and 132 guests