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 

help needed.

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





PostPosted: Thu Jul 23, 2009 7:13 am    Post subject: help needed. Reply with quote

hi everyone. i need help here...
i need a script that do the following:

1) Press "F7" to start the script"
2) once script start input "TAB" then follow by "4"
3) After which Sleep For 2sec
4) Repeat Step 2 and 3 for 4times then INput "8"
5) Sleep for 10sec
6) then repeat step 4 and 5 endlessly
7) till Press "F8" to stop script.

By the way. i do not have autohotkey install so can help me convert the file so that i can use.

thk.
Back to top
Klaus, nli
Guest





PostPosted: Thu Jul 23, 2009 8:05 am    Post subject: Reply with quote

A really descriptive and appropriate nick.
Back to top
LazyGuest
Guest





PostPosted: Thu Jul 23, 2009 8:14 am    Post subject: Reply with quote

this is my code. can someone help me check?


F7:: ;start app

Loop ;endless loop for step 4 & 5
{
Loop, 4 ;loop 4 time for step 2 & 3
{
Send, {Tab}{4} ;step 2
Sleep, 200 ;step3
}

Send, {8} ;step4
Sleep, 1000 ;step5
}

F8::ExitApp ;This exits the script
Back to top
Klaus



Joined: 12 May 2005
Posts: 325
Location: Münster, Germany

PostPosted: Thu Jul 23, 2009 8:39 am    Post subject: Reply with quote

Hi, LazyGuest,
please surround you code examples with code tags to improve readability.
Your code seems to be ok. It types four times TAB4 followed by one 8 in an endless loop until F8 is typed. Process starts with one F7.
Just three corrections:
Code:
F7:: ;start app

Loop ;endless loop for step 4 & 5
{
Loop, 4 ;loop 4 time for step 2 & 3
{
Send, {Tab}4  ; step 2 ; no curly brackets around key values, only around key names like Tab Enter and so on
Sleep, 200 ;step3
}

Send, 8 ; step4 ; same as above
Sleep, 1000 ;step5
}

return ; to finish the Hotkey, even though the outer loop will not be left


F8::ExitApp ;This exits the script

Hope it helps,
Klaus
Back to top
View user's profile Send private message Send e-mail
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