Jump to content

Recommended Posts

Your post might have been better made in

v3 Support

"Help and scripting advice for AutoIt v3."

but anyhow, autoit works with hotkeys, but mouseclicks are a bit tougher.

if you could use a hotkey, say the pause key, it would be easy to do with a func.

Func is like a mini script inside the script.

hotkeyset("{pause}","downspace"); this will send down and space if you hit pause

while 1; this is a loop
winwait("my window title",""); this will wait until this window exists.
downspace(); this will do the send down and space
sleep(1000)
wend

func downspace()
send("{down} ")

endfunc

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to post
Share on other sites

this i what I have so far and for some reason it starts by itself, it doesnt wait for me to press ALT+a, anythoughts.

;program for Peter for replications

;WinWaitActive("Choose Destination Location")

MsgBox(4096, "SpaceDown v1", "USE ALT A to Start AND ESC to Stop AND Pause to pause", 10)

;$i = 0
;While $1 >= $tables
;   Send("{SPACE}") 
;   Send("{Down}")

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
Hotkeyset("{ALT+a}","Downspace"); this will send down and space if you hit pause
Hotkeyset("{ESC}","Stop");;this will end the program when done

while 1; this is a loop
;winwait("my window title",""); this will wait until this window exists.
downspace(); this will do the send down and space
;sleep(1000)
wend


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',488,371)
    WEnd
    ToolTip("")
EndFunc

func Downspace()
  Send("{SPACE}") 
  Send("{Down}")
endfunc


func Stop()
  Exit
endfunc

Your post might have been better made in

v3 Support

"Help and scripting advice for AutoIt v3."

but anyhow, autoit works with hotkeys, but mouseclicks are a bit tougher.

if you could use a hotkey, say the pause key, it would be easy to do with a func.

Func is like a mini script inside the script.

hotkeyset("{pause}","downspace"); this will send down and space if you hit pause

while 1; this is a loop
winwait("my window title",""); this will wait until this window exists.
downspace(); this will do the send down and space
sleep(1000)
wend

func downspace()
send("{down} ")

endfunc

<{POST_SNAPBACK}>

Link to post
Share on other sites

;program for Peter for replications

;WinWaitActive("Choose Destination Location")

MsgBox(4096, "SpaceDown v1", "USE ALT A to Start AND ESC to Stop AND Pause to pause", 10)

;$i = 0
;While $1 >= $tables
;    Send("{SPACE}")    
;    Send("{Down}")

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
Hotkeyset("!a","Downspace"); ALT+a - this will send down and space if you hit pause
Hotkeyset("{ESC}","Stop");;this will end the program when done

TogglePause();Pause the script until I press ALT+a

while 1; this is a loop
;winwait("my window title",""); this will wait until this window exists.
downspace(); this will do the send down and space
;sleep(1000)
wend
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',488,371)
    WEnd
    ToolTip("")
EndFunc

func Downspace()
  Send("{SPACE}") 
  Send("{Down}")
endfunc
func Stop()
  Exit
endfunc

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

    No registered users viewing this page.

×
×
  • Create New...