fraudh8er Posted August 25, 2004 Share Posted August 25, 2004 I need a simple script that will send down and space when the mouse clicked twice. Or I can wait for the windoe to open. I cant figure out how to loop it that many time, I am very new to this. Thanks Link to comment Share on other sites More sharing options...
scriptkitty Posted August 25, 2004 Share Posted August 25, 2004 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 comment Share on other sites More sharing options...
fraudh8er Posted August 25, 2004 Author Share Posted August 25, 2004 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. expandcollapse popup;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 comment Share on other sites More sharing options...
SlimShady Posted August 25, 2004 Share Posted August 25, 2004 (edited) expandcollapse popup;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 August 25, 2004 by SlimShady Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now