Trying to send commands to an inactive window D:

Ask gaming related questions
sleepyy--
Posts: 1
Joined: 01 Oct 2019, 03:36

Trying to send commands to an inactive window D:

01 Oct 2019, 03:45

Hey all,

For the past hour or 2 ive been trying to throw together an AFK script for roblox that just walks around in a square like pattern. Ive got the pattern down but i cant get it to work while tabbed out of the window (also toggle wont work). Help would be very appreciated. Side note im very new to this.

See script below:

Code: Select all

#persistent



F9::

pause,toggle



#ifwinactive ahk_id %0x80820%



loop

{

controlsend,ahk_parent,{w down}, ahk_id %0x80820%

sleep 500

controlsend,ahk_parent,{w up}, ahk_id %0x80820%

controlsend,ahk_parent,{a down}, ahk_id %0x80820%

sleep 500

controlsend,ahk_parent,{a up}, ahk_id %0x80820%

controlsend,ahk_parent,{s down}, ahk_id %0x80820%

sleep 500

controlsend,ahk_parent,{s up}, ahk_id %0x80820%

controlsend,ahk_parent,{d down}, ahk_id %0x80820%

sleep 500

controlsend,ahk_parent,{d up}, ahk_id %0x80820%

}

return
gregster
Posts: 3410
Joined: 30 Sep 2013, 06:48

Re: Trying to send commands to an inactive window D:

01 Oct 2019, 05:07

I never played Roblox, but I have seen this statement by forum user evilC (which is most likely correct):
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=62926&p=268640#p268640 wrote:Roblox does not support receiving input while inactive
Apart from that, there seem to be problems with the use of #IfWinActive (wrong placement - it should be above the hotkey definition) and ahk_id (0x80820 is probably meant literally?! Is it valid?) in your script.

Return to “Gaming”

Who is online

Users browsing this forum: Flipeador, kjaty and 32 guests