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 

Sleep and loop at same time

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



Joined: 09 Nov 2009
Posts: 92

PostPosted: Mon Dec 14, 2009 6:45 pm    Post subject: Sleep and loop at same time Reply with quote

I want to open explorer.exe after 30 seconds, and a loop at same time, but my script wait 30 seonds, and after that start the loop, I want to wait this 30 seconds, but run the loop during this time too.

Code:
sleep 30000
run explorer.exe
goto, uploop
return

uploop:
Loop
{
    KeyWait, up,D T13
    If(ErrorLevel) {
run notepad.exe
    Break
  }
}


[Deleted double post. ~jaco0646]
Back to top
View user's profile Send private message
alexisfch



Joined: 09 Nov 2009
Posts: 92

PostPosted: Mon Dec 14, 2009 7:32 pm    Post subject: Reply with quote

any idea?? Shocked
Back to top
View user's profile Send private message
Carcophan



Joined: 24 Dec 2008
Posts: 1308
Location: :noitacoL

PostPosted: Mon Dec 14, 2009 8:13 pm    Post subject: Reply with quote

Quote:
I want to open explorer.exe after 30 seconds, and a loop at same time, but my script wait 30 seonds, and after that start the loop, I want to wait this 30 seconds, but run the loop during this time too.


Can you try rewording your question. It seems recursive.
Back to top
View user's profile Send private message
alexisfch



Joined: 09 Nov 2009
Posts: 92

PostPosted: Mon Dec 14, 2009 8:56 pm    Post subject: Reply with quote

Carcophan wrote:
Quote:
I want to open explorer.exe after 30 seconds, and a loop at same time, but my script wait 30 seonds, and after that start the loop, I want to wait this 30 seconds, but run the loop during this time too.


Can you try rewording your question. It seems recursive.


I just need that during the sleep order (30sec) run the loop during all these 30 sec too, no after these 30 sec.
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Mon Dec 14, 2009 9:15 pm    Post subject: Reply with quote

You will need to run second AutoHotkey script (you could use a pipe, see RunTempScript() function) or use AutoHotkey.dll ( Thread() will be helpful here).
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
alexisfch



Joined: 09 Nov 2009
Posts: 92

PostPosted: Mon Dec 14, 2009 10:51 pm    Post subject: Reply with quote

HotKeyIt wrote:
You will need to run second AutoHotkey script (you could use a pipe, see RunTempScript() function) or use AutoHotkey.dll ( Thread() will be helpful here).


it doesn't work Shocked
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Tue Dec 15, 2009 8:59 am    Post subject: Reply with quote

alexisfch wrote:
it doesn't work Shocked

Show what you got Confused
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
aaffe



Joined: 17 May 2007
Posts: 1002
Location: Germany - Deutschland

PostPosted: Tue Dec 15, 2009 9:55 am    Post subject: Reply with quote

use Settimer to run the loop.
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