An easy script for game

Ask gaming related questions (AHK v1.1 and older)
minileo
Posts: 1
Joined: 27 Mar 2020, 19:30

An easy script for game

27 Mar 2020, 19:37

Hello!
I need a little help.
I'm totally novice and i don't want for now to learn this language. I'm trying to create a simple script.

Code: Select all

SendMode Event

XButton1::

loop
{
send, 1
sleep 1600
send, 2
sleep 2100
send, 3
sleep 1900
send, {space}
send, {space}
send, {space}
send, z
}
return

XButton2::

loop
{
send, 5
sleep 100000
}
return

^XButton2::

loop
{
send, 6
sleep 19000
send, 7
sleep 1243000
}
return
[Mod edit: [code][/code] tags added]

For now i have something like this.
The first problem is with sleep. When i give 100sec (100000ms) it's working. Above this, it's not.
The second problem is that i want to use one button for 2 actions (XButton2 and ^XButton2 as XButton) and i don't know why. The complicated scripts i can't read.
If someone could write something for me, i would be thank.
User avatar
Yakshongas
Posts: 590
Joined: 21 Jan 2020, 08:41

Re: An easy script for game

28 Mar 2020, 10:33

Code: Select all

XButton1::

Loop ;never ending loop
{
SendInput, 1
Sleep, 1600
SendInput, 2
Sleep, 2100
SendInput, 3
Sleep, 1900
SendEvent, {Space 3}
SendInput, z
}

return ;this return does noting

XButton2::

Loop
{
Send, 5
Sleep, 100000
}

return

^XButton2::

Loop
{
SendInput, 6
Sleep, 19000
SendInput, 7
Sleep, 1243000
}

return
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 91 guests