tjiuz Posted July 18, 2011 Share Posted July 18, 2011 (edited) I have a script from Quick Macro. I was wondering if it could be turned into a script that works for autoit. It's simple but I think it only works in that program. I hope I'm wrong. This is what a part of it looks like it. Script From Quick Macro MoveTo 325,251 <<< Coordinat Mouse LeftClick 1 <<< Mouse Left Click down Delay 300 LeftUp 1 <<< Mouse Left Clik Up Delay 10000 KeyDown 13,1 <<< Enter Down Delay 200 KeyUp 13,1 <<< Enter Up Delay 200 KeyDown 13,1 <<< Enter Down Delay 200 KeyUp 13,1 <<< Enter Up So, could it be done or not be done? Edited July 18, 2011 by tjiuz Link to comment Share on other sites More sharing options...
JoHanatCent Posted July 18, 2011 Share Posted July 18, 2011 (edited) I have a script from Quick Macro. I was wondering if it could be turned into a script that works for autoit. It's simple but I think it only works in that program. I hope I'm wrong. This is what a part of it looks like it. Script From Quick Macro MoveTo 325,251 <<< Coordinat Mouse LeftClick 1 <<< Mouse Left Click down Delay 300 LeftUp 1 <<< Mouse Left Clik Up Delay 10000 KeyDown 13,1 <<< Enter Down Delay 200 KeyUp 13,1 <<< Enter Up Delay 200 KeyDown 13,1 <<< Enter Down Delay 200 KeyUp 13,1 <<< Enter Up So, could it be done or not be done? In short . . . yes! WelCome to the forum. If you did install AI take a look at these and their examples from the help section of scite: MouseMove MouseClick Send Spelling! Edited July 18, 2011 by JoHanatCent Link to comment Share on other sites More sharing options...
JohnOne Posted July 18, 2011 Share Posted July 18, 2011 could be done. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tjiuz Posted July 18, 2011 Author Share Posted July 18, 2011 In short . . . yes! WelCome to the forum. If you did install AI take a look at these and their examples from the help section of scite: MouseMove MouseClick Send Spelling! I've installed the AI. could be done. how ? help in the correction While 1=1 $moveX = random (1,325,1) $moveY = random (1,251,1) MouseClick("left",$moveX,moveY,1,1) Sleep (10000) send ("{enter}") sleep (200) send ("{enter}") sleep (200) send ("{enter}") sleep (200) WEnd there is an error line-4 error : error parsing function call Thanks B4 Link to comment Share on other sites More sharing options...
JohnOne Posted July 18, 2011 Share Posted July 18, 2011 moveY = $moveY AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tjiuz Posted July 18, 2011 Author Share Posted July 18, 2011 (edited) moveY = $moveYthanks for the help .. now can build .. ^ ^but why the movement of the mouse is not in accordance with 325.251?mouse cursor moves randomly>, <!I want to ask now is how to use hotkey to turn on and off the script is running? Edited July 18, 2011 by tjiuz Link to comment Share on other sites More sharing options...
Exit Posted July 18, 2011 Share Posted July 18, 2011 $moveX = random (1,325,1)$moveY = random (1,251,1)MouseClick("left",325,251,1,1) App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
tjiuz Posted July 19, 2011 Author Share Posted July 19, 2011 $moveX = random (1,325,1)$moveY = random (1,251,1)MouseClick("left",325,251,1,1)Wow.. Nice...I want to ask now is how to use hotkey to turn on and off the script is running? Link to comment Share on other sites More sharing options...
monoscout999 Posted July 19, 2011 Share Posted July 19, 2011 You will need The function HotKeySet() and declare a function for the hotkey you chose. Something like this. HotKeySet("{F2}","_pause") global $pause = false ; Your code here Func _pause() $pause = Not $pause While $pause Sleep(500) WEnd EndFunc ;==>_pause Link to comment Share on other sites More sharing options...
tjiuz Posted July 19, 2011 Author Share Posted July 19, 2011 (edited) You will need The function HotKeySet() and declare a function for the hotkey you chose. Something like this. HotKeySet("{F2}","_pause") global $pause = false ; Your code here Func _pause() $pause = Not $pause While $pause Sleep(500) WEnd EndFunc ;==>_pause it's only for a command script pause? what if making masagebox to the initial view (insert name in the credits and there massagebox OK button to close the massagebox) when the program is enabled script? I saw in the FAQ like this ; A simple custom messagebox that uses the MessageLoop mode #include <GUIConstantsEx.au3> GUICreate("Custom Msgbox", 210, 80) GUICtrlCreateLabel("Please click a button!", 10, 10) $YesID = GUICtrlCreateButton("Yes", 10, 50, 50, 20) $NoID = GUICtrlCreateButton("No", 80, 50, 50, 20) $ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20) ; Set accelerators for Ctrl+y and Ctrl+n Dim $AccelKeys[2][2]=[["^y", $YesID], ["^n", $NoID]] GUISetAccelerators($AccelKeys) GUISetState(); display the GUI Do $msg = GUIGetMsg() Select Case $msg = $YesID MsgBox(0, "You clicked on", "Yes") Case $msg = $NoID MsgBox(0, "You clicked on", "No") Case $msg = $ExitID MsgBox(0, "You clicked on", "Exit") Case $msg = $GUI_EVENT_CLOSE MsgBox(0, "You clicked on", "Close") EndSelect Until $msg = $GUI_EVENT_CLOSE Or $msg = $ExitID masagebox but it can not close its macros and script was still running when there is massagebox .. Edited July 19, 2011 by tjiuz Link to comment Share on other sites More sharing options...
monoscout999 Posted July 19, 2011 Share Posted July 19, 2011 When a MessaageBox from the script is open the script will be in pause until you close it. 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