Helmeh220 Posted November 15, 2018 Share Posted November 15, 2018 As can been seen in my code the pause button wont work, i was trying to understand off someone else's post how to save the time then continue it but it really confused me. What i was wondering someone could help with is just making it so when i press numpad4 it pauses everything including the countdown. If someone could help it would be much appreciated. expandcollapse popupGlobal $Paused, $two, $_CompteArebour = random(113126 , 121734), $_Seconds HotKeySet("{NUMPAD7}" , "On_Exit") HotKeySet ("{=}" , "_one") HotKeySet("{NUMPAD4}", "TogglePause") $Form1 = GUICreate("Form1", 419, 144, 404, 220) $Label1 = GUICtrlCreateLabel("'=' Starts First and Second skill Scipt", 80, 8, 260, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label2 = GUICtrlCreateLabel("'Numpad 7' Exits First and Second Skill Script Completely", 8, 40, 405, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label3 = GUICtrlCreateLabel("'Numpad 4' Pauses Skill 1 and 2", 96, 72, 229, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label4 = GUICtrlCreateLabel("Countdown Until Use:", 88, 112, 178, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label5 = GUICtrlCreateLabel("", 272, 112, 58, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) GUISetState(@SW_SHOW) $TimeTicks = TimerInit ( ) While 1 Sleep(10) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func _one() Sleep(10) Send("{2}") Sleep(Random(52, 506)) Send("{1}") $two = Not $two While $two $_CompteArebour -= TimerDiff ( $TimeTicks ) $TimeTicks = TimerInit ( ) Local $_SecCalc = $_CompteArebour $_SecCalc = Int ( $_SecCalc / 1000) If $_CompteArebour <= 0 Then Sleep(10) Send("{2}") Sleep(Random(52, 506)) Send("{1}") $_CompteArebour = Random(113126 , 121734) Else If $_SecCalc <> $_Seconds Then $_Seconds = $_SecCalc GUICtrlSetData($Label5, StringFormat ("%02u", $_Seconds )) EndIf EndIf WEnd EndFunc Func On_Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
careca Posted November 15, 2018 Share Posted November 15, 2018 I would do it differently, the code you have there cannot stop anything that's running in the function. Instead, if you add a condition(s) in the main loop, or in whatever function, you can control it better imo. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Helmeh220 Posted November 15, 2018 Author Share Posted November 15, 2018 By more functions are you meaning if statements? Link to comment Share on other sites More sharing options...
Helmeh220 Posted November 15, 2018 Author Share Posted November 15, 2018 Ok so i have tried disabling the code using True and False statement and i cant get the countdown to stop, i have also tried storing the number on another string then forcing that number onto the countdown for it to continue to count but no matter what i do it just keeps counting down. Does anyone have any ideas? Link to comment Share on other sites More sharing options...
careca Posted November 15, 2018 Share Posted November 15, 2018 27 minutes ago, Helmeh220 said: cant get the countdown to stop, You must add if statements to the loop that controls the countdown, how else would it cut off the countdown? The countdown loop doesn't care about togglepause function until it is done with whatever it's doing. Does this make sense to you? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Helmeh220 Posted November 15, 2018 Author Share Posted November 15, 2018 34 minutes ago, careca said: You must add if statements to the loop that controls the countdown, how else would it cut off the countdown? The countdown loop doesn't care about togglepause function until it is done with whatever it's doing. Does this make sense to you? I tried adding an if statement but i dont really know how to stop the counter. Ive tried exitloop which just freezes it until it skips ahead alot and still continues counting. I dont know how to interupt the count down to stop it and even if i somehow managed to do that i need it to continue the countdown from where it left off. Link to comment Share on other sites More sharing options...
caramen Posted November 15, 2018 Share Posted November 15, 2018 3 hours ago, Helmeh220 said: Skill 1 and 2 Can you explaîn this ? My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
careca Posted November 15, 2018 Share Posted November 15, 2018 (edited) removed Edited November 15, 2018 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Helmeh220 Posted November 15, 2018 Author Share Posted November 15, 2018 31 minutes ago, caramen said: Can you explaîn this ? Its a simple script for auto skilling in a game so i dont have to micro manage the skills and die. Link to comment Share on other sites More sharing options...
careca Posted November 15, 2018 Share Posted November 15, 2018 Wrong answer. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
caramen Posted November 15, 2018 Share Posted November 15, 2018 As I thought. Cya. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted November 15, 2018 Share Posted November 15, 2018 @careca please remove all your pointers. Thx. Protect AutoIT with us Thanks. Skeletor 1 My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Helmeh220 Posted November 15, 2018 Author Share Posted November 15, 2018 18 minutes ago, caramen said: @careca please remove all your pointers. Thx. Protect AutoIT with us Thanks. My bad, dunno how to delete posts either :/ Link to comment Share on other sites More sharing options...
caramen Posted November 15, 2018 Share Posted November 15, 2018 @Helmeh220 Dont worry you wont be banned. You will be warned. And pointed to the forum rules. Doing AutoIT script for game automation will result to false positive virus. Among other. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Helmeh220 Posted November 15, 2018 Author Share Posted November 15, 2018 2 minutes ago, caramen said: @Helmeh220 Dont worry you wont be banned. You will be warned. And pointed to the forum rules. Doing AutoIT script for game automation will result to false positive virus. Among other. Ok still sorry tho, tbh i didnt read the rules before i posted, even tho i should have. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 15, 2018 Moderators Share Posted November 15, 2018 Helmeh220, The previous posters are quite right - please read the Forum rules - particularly the bit about not discussing game automation - before you post again. Thread locked. M23 Skeletor 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts