Jump to content
Sign in to follow this  
otakueric

help with a pre-exisitng script

Recommended Posts

ok so the original script makes it so every few minutes it will press the 'spacebar' and cause the character in my game to jump. this is so i dont get logged off for being idle and such, now that i am hotboxing two windowed version of my game i was wondering if it is possible to send an "alt tab" command and then "space" again. one alt tab would be find since the two windows are always next to each other on my task bar.

this is the original script

func Start()

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "TogglePause")

ToolTip('2box antiafk started.',0,0)

While 1

Send("{SPACE}")

Sleep(Random(120000,240000))

WEnd

EndFunc

i tried

Send("{SPACE}")

Send("(ALT)")

Send("(TAB)")

Send("{SPACE}")

and various versions of combining ALT and TAb together only to cause my character to go haywire

i tried searching, and i tried looking at the faq and even downloaded autoit1-2-3 but honestly i just got this script from this forum years ago and just compiled it and used it all this time, i am a retard when it comes to this.

any help would be greatly appreciated it, thanks!

Share this post


Link to post
Share on other sites

Try this for sending Alt+Tab

Send("!{tab}")

I guess you could use WinActivate() too

wow works like a charm! thank you.

is there a command to delay the sends a little bit? maybe .5 seconds or something to that degree.

Share this post


Link to post
Share on other sites

Try adding this at the top of your script:

Opt("SendKeyDelay",5000)

SendKeyDelay Alters the the length of the brief pause in between sent keystrokes.

Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...