AutoHotkey Community

It is currently May 27th, 2012, 12:35 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 16th, 2009, 1:25 am 
Offline

Joined: November 9th, 2009, 4:24 pm
Posts: 94
Im trying to do this:
run a loop (if nobody press "up" arrow key after 10 second run notepad and continue the loop)
and in the same time wait for 20 seconds and run explorer (just 1 time)

So, if nobody press "up" after 50 seconds, i'll have 1 explorer opened (20sec) and 5 notepad opened (10sec+10+10+10+10)

I tried to do it with this (with gosub), but it doesn't work

Code:
gosub, order1
sleep 20000
run explorer.exe
return

order1:
Loop
{
    KeyWait, up,D T10
    If(ErrorLevel) {
run notepad.exe
 }
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 16th, 2009, 2:06 am 
why are u keep making new threads on the same script??
Code:
settimer, a, 10000
settimer, b, 20000
up::
settimer, a, off
settimer, b, off
settimer, a, 10000
settimer, b, 20000
return

a:
run, notepad.exe
return

b:
x++
if x = 1
run, explorer.exe
return
 


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 16th, 2009, 2:45 am 
Offline

Joined: November 9th, 2009, 4:24 pm
Posts: 94
in your script if I keep pressed "up" arrow key, nothing happens, I mean will not run notepad and explorer.

Anonymous wrote:
why are u keep making new threads on the same script??
Code:
settimer, a, 10000
settimer, b, 20000
up::
settimer, a, off
settimer, b, off
settimer, a, 10000
settimer, b, 20000
return

a:
run, notepad.exe
return

b:
x++
if x = 1
run, explorer.exe
return
 


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 16th, 2009, 6:38 am 
why would pressing up opens anything?
Quote:
Im trying to do this:
run a loop (if nobody press "up" arrow key after 10 second run notepad and continue the loop)
and in the same time wait for 20 seconds and run explorer (just 1 time)

So, if nobody press "up" after 50 seconds, i'll have 1 explorer opened (20sec) and 5 notepad opened (10sec+10+10+10+10)

u only said pressing up would hold the Run for another 10/20 seconds

if u want to Run something when up is pressed, u can put Run whatever in the up hotkey


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: iDrug, Leef_me, Ohnitiel, rjgatito, Yahoo [Bot] and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group