Jump to content

Recommended Posts

Posted (edited)

$i = 0

Global $Paused

HotKeySet("`", "TogglePause")

HotKeySet("{DEL}", "Terminate")

Sleep (2000)

While $i <= 2

Send ("{RIGHT down NUMPAD4 down}")

Sleep (500)

$i = $i + 1

WEnd

Func TogglePause( )

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate( )

Exit 0

EndFunc

not sure if this is right does not seem to work? need to simulate holding both keys down at same time forever.

Edited by Galdorf
Posted

This looks like it is for a game. Be aware that some games block automation - so this may not work.

Global $Paused
HotKeySet("`", "TogglePause")
HotKeySet("{DEL}", "Terminate")

While 1
    Send("{RIGHT down}")
    Send("{NUMPAD4 down}")
    Sleep(500)
WEnd

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
    Sleep(100)
    ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc ;==>Terminate

Func OnAutoItExit()
    Send("{RIGHT up}")
    Send("{NUMPAD4 up}")
EndFunc

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...