gallarh Posted October 11, 2019 Share Posted October 11, 2019 Global $sHeight = @DesktopHeight Global $sWidth = @DesktopWidth Global $UnPaused HotKeySet("+1","_TogglePause") ; Press Shift+1 to start script HotKeySet("+2", "_Terminate") ; Press Shift+2 to terminate script MsgBox(64, "=)") While 1 ; Loop 1 Sleep(100) ; Waiting for function call. Pressing the Start hotkey ends this loop ToolTip('Autobuyer paused. Press SHIFT+1 to resume/pause or SHIFT+2 to terminate.',0,0) WEnd Func _TogglePause() ToolTip('Autobuyer has started. Press SHIFT+1 to pause or SHIFT+2 to terminate.',0,0) $UnPaused = NOT $UnPaused While $UnPaused ; Loop 2 MouseClick("left", 1189, 720, 1, 25) MouseClick("left", 1073, 720, 1, 17) MouseClick("left", 687, 447, 1, 2) MouseClick("left", 1217, 682, 1, 30) MouseClick("left", 1258, 686, 1, 80) WEnd EndFunc Func _Terminate() If MsgBox(4, 'Do you want to exit?', 'Click Yes to exit, or No to continue') = 6 Then Exit EndFunc ;==>_Pause Link to comment Share on other sites More sharing options...
water Posted October 11, 2019 Share Posted October 11, 2019 (edited) Welcome to AutoIt and the forum! You need to provide more information. What should the counter count? Which program do you try to automate? MouseClicks are not very reliable as they depend on window position, screen resolution and might interfere with user actions. Edited October 11, 2019 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Musashi Posted October 11, 2019 Share Posted October 11, 2019 12 minutes ago, gallarh said: Autobuyer has started I don't want to imply anything illegal, but are Autobuyers not one type of bot and therefore against the forum rules ? "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Developers Popular Post Jos Posted October 11, 2019 Developers Popular Post Share Posted October 11, 2019 @gallarh, You do realize you reported your own thread as "Reported as Inappropriate Content / Game Bots.? *click* Jos Earthshine, Werty, jchd and 2 others 5 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts