AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Button Loop

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Holy Macro



Joined: 09 Jan 2009
Posts: 11

PostPosted: Wed Jan 14, 2009 3:32 pm    Post subject: Button Loop Reply with quote

After pushing this button once, and then pushing it again, i want the code to rerun. But after its pushed once it cant be pushed again until the code has run all the way through. How do i get it to rerun when its pushed multiple times without waiting for the rest of the code to finish?

Code:

!r::
Gui, Show, Options X5 Y5 W500 H200, Somename,
Gui, Add, Button, X445 Y5 W50 H30, Run
Return

ButtonRun:
IfExist C:\Users\%A_UserName%\Desktop\Someprogram.exe
Run, C:\Users\%A_UserName%\Desktop\Someprogram.exe


And seriously, i know theirs a quick fix to this to this so please answer with some kind of help.[/code]


Last edited by Holy Macro on Thu Jan 15, 2009 12:47 am; edited 1 time in total
Back to top
View user's profile Send private message
Cephei1



Joined: 04 Aug 2008
Posts: 199
Location: UK

PostPosted: Wed Jan 14, 2009 3:51 pm    Post subject: Reply with quote

Oh wait what is the rest of the code
Back to top
View user's profile Send private message
Z_Gecko
Guest





PostPosted: Wed Jan 14, 2009 5:25 pm    Post subject: Reply with quote

Code:
#MaxThreadsPerHotkey 9
ButtonRun:
IfExist C:\Users\%A_UserName%\Desktop\Someprogram.exe
Run, C:\Users\%A_UserName%\Desktop\Someprogram.exe
return
Back to top
Holy Macro



Joined: 09 Jan 2009
Posts: 11

PostPosted: Wed Jan 14, 2009 8:09 pm    Post subject: Reply with quote

Ok my mistake, sorry, heres the entire piece.


Code:
!r::
Gui, Show, Options X5 Y5 W500 H200, Somename,
Gui, Add, Button, X445 Y5 W50 H30, Run
Return

ButtonRun:
IfExist C:\Users\%A_UserName%\Desktop\Someprogram.exe
Run, C:\Users\%A_UserName%\Desktop\Someprogram.exe
Return
Back to top
View user's profile Send private message
Holy Macro



Joined: 09 Jan 2009
Posts: 11

PostPosted: Thu Jan 15, 2009 12:42 pm    Post subject: Reply with quote

...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group