Helmeh220 Posted November 15, 2018 Posted November 15, 2018 Hello im new to the forums and i have a problem. Im trying to get one of my forms labels to read "sleep(Random(8000, 8800))" and give the precise number that it has chosen. For eg, if the random number is 8567 then i want that number to be shown on the label and to count down. The reason i am wanting this is because im trying to create basically an auto button presser but to make it not look human, i was just hoping to get a visual aid along side it so i know what the countdown is at so it doesnt just press the button when im not ready. So in Fun three() there is a sleep command, im wanting the label2 to show the exact time left until the sleep is over. That if this is at all possible. expandcollapse popupGlobal $Paused, $four, $labels HotKeySet("{NUMPAD8}" , "On_Exit") HotKeySet( "{-}", "three") HotKeySet("{NUMPAD5}", "TogglePause") #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 396, 232, 706, 271) $Label1 = GUICtrlCreateLabel("Skill cooldown:", 0, 88, 167, 33) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label2 = GUICtrlCreateLabel("Timer", 174, 88, 122, 33) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 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 three() $four = Not $four While $four Sleep(Random(10, 20)) Send("{3}") Sleep(Random(8016, 8752)) WEnd EndFunc Func On_Exit() Exit EndFunc
Helmeh220 Posted November 15, 2018 Author Posted November 15, 2018 What ive realised might be easier is if i used a count down timer, if the count down timer could both start at a random number between 8050 and 8700 and post to the label then it would work out the same as long as it continues to loop and chooses a random number each loop.
careca Posted November 15, 2018 Posted November 15, 2018 You can start a timer and make it stop at a random number between those. Doesnt need to be a count down, but a loop checking the difference until the value is between what you want. 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
Moderators Melba23 Posted November 15, 2018 Moderators Posted November 15, 2018 Helmeh220, Quote im trying to create basically an auto button presser but to make it not look human And why would you want to do that - other than for the obvious reason? Plus this line: $Label1 = GUICtrlCreateLabel("Skill cooldown:", 0, 88, 167, 33) makes me think you are still trying to create a gamebot - please check my post here before you post again. M23 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
Moderators JLogan3o13 Posted November 15, 2018 Moderators Posted November 15, 2018 Thread locked as it is the same as https://www.autoitscript.com/forum/topic/196550-pause-button-not-working/?tab=comments#comment-1409639 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts