Sign in to follow this  
Followers 0
Cloudsx

how work a hotkeyset

9 posts in this topic

#1 ·  Posted (edited)

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



Dutch is not a problem for everybody....

Anyway, you forgot to tell us what you want to accomplish with the hotkey....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

and my function is exit or something els

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

but with the myexit will it close the dialog

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

thanks for it it work very good

:geek::D:o

Share this post


Link to post
Share on other sites

thanks for it it work very good

:geek::D:o

Welcome!!!

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  
Followers 0