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 

Ragnarok Online

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



Joined: 11 May 2008
Posts: 1

PostPosted: Sun May 11, 2008 8:18 am    Post subject: Ragnarok Online Reply with quote

Heya, ok i made this short code so it would press Insert a couple of times every ten seconds. I want it so that it would still press the insert buttons ingame even though i have another window active, ie. firefox. is that possible? i tried using ifwinactive but failed miserably. lol

Code:

]::
IfWinActive //My ragnarok server censored
{
settimer, sendkey, 10000
}
return

\::
settimer, sendkey, off
return

sendkey:
{
send, {Insert}
sleep 100
send, {Insert}
}
return
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 23

PostPosted: Sun May 11, 2008 9:21 pm    Post subject: Reply with quote

Use ControlSend. Also, you don't need brackets for a label.

I believe that your code should look like this:
Code:
sendkey:
ControlSend, ahk_parent, {insert}, //your ragnarok window
sleep 100
ControlSend, ahk_parent, {insert}, //your ragnarok window
return

However, I have always had problems making ControlSend/Click work properly, so... Sorry if that doesn't work for you.

And one more thing, when using something like this in a game environment, you might want to randomize the times spent between keypresses so it doesn't look like it's being botted. You may want to read the Gaming Tutorial thread by System Monitor, especially the part about randomization. You wouldn't want to get yourself banned for some simple insert keystrokes, would you? Razz
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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