Trying to create a Increase / Decrease system

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
IHvNoIdea
Posts: 3
Joined: 31 Jul 2021, 15:59

Trying to create a Increase / Decrease system

31 Jul 2021, 16:14

Hello everybody...

Well, im trying to create a increase /decrease system using a variable in my gui, but no results. Someone can tell me what is the problem, please?

Code: Select all

Gui, ProgramGui: Font, s10 bolda Verdana
Gui, ProgramGui: Color, Black
Gui, ProgramGui: +AlwaysOnTop
Gui, ProgramGui: add, text, cWhite, Feito por: Programador da NASA
Gui, ProgramGui: add, text, cWhite,PgUp Pausa CTRL+PgUp Ativa
Gui, ProgramGui: add, button, gPlay, Ativar
Gui, ProgramGui: add, button, gFechar, Fechar
Gui, ProgramGui: add, text, x125 y60 w135 h30 cWhite, Velocidade recomendada: 450
Gui, ProgramGui: add, edit, x71 y62 w50 h25 vTempo
Gui, ProgramGui: show, w300 h230, PvP Auto da NASA
Return


Play:
Variable = 1
While Variable = 1
{
Gui, ProgramGui: Submit, NoHide
Send, {LControl Down}{RButton Down}{2 Down}
Sleep, 0.2
Send, {2 Down}
Sleep, 0.2
Send, {3 Down}
Sleep, 0.5
Send, {LButton Down}
Sleep, 50
Send, {LButton Up}
Sleep, 2
Send, {LButton Down}
Sleep, 35
Send, {LButton Up}
Sleep, %Tempo%
Send, {3 Up}
Sleep, 2
}
Return

Rel:
Reload
Return

Fechar:
ExitApp
Return

LoginGuiClose:
ExitApp
Return

ProgramGuiClose:
ExitApp
Return

WheelUp::
%Tempo% = ++1000
Return

^PgUp::Pause
Return

Pause::^PgUp
Return

^PgDn:: Send, {LControl Up}{RButton Up}{LButton Up}{2 Up}{3 Up}
Return
[Mod edit: quote tags replaced with [code][/code] tags.]
IHvNoIdea
Posts: 3
Joined: 31 Jul 2021, 15:59

Re: Trying to create a Increase / Decrease system

31 Jul 2021, 18:21

I found the error, I forgot that my loop presses the CTRL key all the time, so the code wasnt recognizing the Home command...
Last edited by gregster on 31 Jul 2021, 19:20, edited 1 time in total.
Reason: Post was approved after mikeyww's next post.
User avatar
mikeyww
Posts: 26882
Joined: 09 Sep 2014, 18:38

Re: Trying to create a Increase / Decrease system

31 Jul 2021, 18:57

I did not try it but suggest paring your script to a few essentials while you are testing.

Code: Select all

Tempo := 0
Tempo += 1000
MsgBox %Tempo%
Eliminate your loops and most hotkeys. Test one thing at a time.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Nerafius, RandomBoy and 108 guests