Jump to content
Sign in to follow this  
Cloudsx

how work a hotkeyset

Recommended Posts

where do i have to put the hotkeyset in this script

CODE

#include <GUIConstants.au3>

GUICreate("BOT",300,300 ) ; will create a dialog box that when displayed is centered

GUISetState (@SW_SHOW) ; will display an empty dialog box

$widthCell=300

GUICtrlCreateLabel ("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)

GuiCtrlCreateLabel("hoeveel uur wil je gebruiken",0, 170,)

GuiCtrlCreateInput("0",0, 150, 23, 20)

GuiCtrlCreateUpDown(1)

Opt("GUICoordMode",3)

$start = GUICtrlCreateButton ("start", 100, 250,50)

GUICtrlCreateButton ("stop", 150, 250,50)

GUISetState () ; will display an dialog box with 2 button

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

If $msg = $start Then ExitLoop

Wend

While 2

MouseMove (900, 700, 50)

MouseClick ("left", 900,700,2,50)

MouseMove (980, 670, 50)

Mouseclick ("left",980,670,2,80)

WEnd

and it must work on the script or it is hard to stop

DONT LOOK TO THE STARHE LANGUAGE IT DUTCH

Edited by Cloudsx

Share this post


Link to post
Share on other sites

maybe...

#include <GUIConstants.au3>

HotKeySet("{F9}", "MyFunction")
GUICreate("BOT", 300, 300); will create a dialog box that when displayed is centered
GUISetState(@SW_SHOW); will display an empty dialog box


$widthCell = 300
GUICtrlCreateLabel("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GUICtrlCreateLabel("hoeveel uur wil je gebruiken", 0, 170)
GUICtrlCreateInput("0", 0, 150, 23, 20)
GUICtrlCreateUpdown(1)


Opt("GUICoordMode", 3)
$start = GUICtrlCreateButton("start", 100, 250, 50)
GUICtrlCreateButton("stop", 150, 250, 50)

GUISetState(); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $start Then MyFunction()
    
WEnd

Func MyFunction()
    
    While 2
        MouseMove(900, 700, 50)
        MouseClick("left", 900, 700, 2, 50)
        MouseMove(980, 670, 50)
        MouseClick("left", 980, 670, 2, 80)
    WEnd
    
EndFunc ;==>MyFunction

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

HotKeySet("{ESC}", "MyExit")
HotKeySet("{F9}", "MyFunction")
GUICreate("BOT", 300, 300); will create a dialog box that when displayed is centered
GUISetState(@SW_SHOW); will display an empty dialog box


$widthCell = 300
GUICtrlCreateLabel("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GUICtrlCreateLabel("hoeveel uur wil je gebruiken", 0, 170)
GUICtrlCreateInput("0", 0, 150, 23, 20)
GUICtrlCreateUpdown(1)


Opt("GUICoordMode", 3)
$start = GUICtrlCreateButton("start", 100, 250, 50)
GUICtrlCreateButton("stop", 150, 250, 50)

GUISetState(); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $start Then MyFunction()
    
WEnd

Func MyFunction()
    
    While 2
        MouseMove(900, 700, 50)
        MouseClick("left", 900, 700, 2, 50)
        MouseMove(980, 670, 50)
        MouseClick("left", 980, 670, 2, 80)
    WEnd
    
EndFunc  ;==>MyFunction

Func MyExit()
    Exit
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

look at this

#include <GUIConstants.au3>

Global $Paused, $Move
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "MyExit")
HotKeySet("{F9}", "MyFunction")
GUICreate("BOT", 300, 300); will create a dialog box that when displayed is centered
GUISetState(@SW_SHOW); will display an empty dialog box


$widthCell = 300
GUICtrlCreateLabel("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GUICtrlCreateLabel("hoeveel uur wil je gebruiken", 0, 170)
GUICtrlCreateInput("0", 0, 150, 23, 20)
GUICtrlCreateUpdown(1)


Opt("GUICoordMode", 3)
$start = GUICtrlCreateButton("start", 100, 250, 50)
GUICtrlCreateButton("stop", 150, 250, 50)

GUISetState(); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $start Then MyFunction()
    
WEnd

Func MyFunction(); this will make the mouse move and press (F9) again to leave this function
    $Move = NOT $Move
    While $Move
        MouseMove(900, 700, 50)
        MouseClick("left", 900, 700, 2, 50)
        MouseMove(980, 670, 50)
        MouseClick("left", 980, 670, 2, 80)
    WEnd
EndFunc   

Func TogglePause(); this will pause the script
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func MyExit()
    Exit
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...