Jump to content

Recommended Posts

Posted

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.

 

Global $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

 

Posted

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.

Posted

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
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...