Cloudsx Posted February 17, 2006 Share Posted February 17, 2006 (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 February 17, 2006 by Cloudsx Link to comment Share on other sites More sharing options...
Developers Jos Posted February 17, 2006 Developers Share Posted February 17, 2006 Dutch is not a problem for everybody.... Anyway, you forgot to tell us what you want to accomplish with the hotkey.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Valuater Posted February 17, 2006 Share Posted February 17, 2006 (edited) maybe... expandcollapse popup#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 February 17, 2006 by Valuater Link to comment Share on other sites More sharing options...
Cloudsx Posted February 17, 2006 Author Share Posted February 17, 2006 and my function is exit or something els Link to comment Share on other sites More sharing options...
Valuater Posted February 17, 2006 Share Posted February 17, 2006 expandcollapse popup#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) Link to comment Share on other sites More sharing options...
Cloudsx Posted February 17, 2006 Author Share Posted February 17, 2006 but with the myexit will it close the dialog Link to comment Share on other sites More sharing options...
Valuater Posted February 17, 2006 Share Posted February 17, 2006 look at this expandcollapse popup#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) Link to comment Share on other sites More sharing options...
Cloudsx Posted February 17, 2006 Author Share Posted February 17, 2006 thanks for it it work very good Link to comment Share on other sites More sharing options...
Valuater Posted February 17, 2006 Share Posted February 17, 2006 thanks for it it work very goodWelcome!!!8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now