6906320 Posted September 5, 2009 Share Posted September 5, 2009 here is my script #Include <GuiListView.au3> GUICreate(' Login Tool', 250, 300, @DesktopWidth/2-400/2, @DesktopHeight/2-300/2, 0x100A0000) GUICtrlCreateGroup("Settings", 5, 5, 300, 73) GUICtrlSetFont(-1, 10) $sett=GUICtrlCreateLabel( "(1)Press F10 To Start. ", 50, 20, 200. -7, 100) $sett=GUICtrlCreateLabel( "(2)Press F6 To Pause. ", 50, 40, 215. -7, 100) $sett=GUICtrlCreateLabel( "(2)Press F8 Or ESC To Close. ", 50, 60, 215. -7, 100) GUICtrlCreateButton('Click here for updates',5, 80, 250, 20) Global $Paused HotKeySet("{F6}", "Pause") HotKeySet("{F8}", "Close") HotKeySet("{F10}", "Start") Func QuitProg() Exit EndFunc While 1 Sleep(100) WEnd Func Pause() $Paused = NOT $Paused While $Paused sleep(50) WEnd EndFunc Func Close() Exit 0 EndFunc Func Start() While 1 ControlSend("SRO_Client", "", "", "{ENTER}") Sleep(3000) Wend EndFunc at GUICtrlCreateButton('Click here for updates',5, 80, 250, 20) i want it when i press it redirect me to a website like www.google.com can i make that with autoit ? Link to comment Share on other sites More sharing options...
FrankwazHere Posted September 5, 2009 Share Posted September 5, 2009 you need to add these things in the while loop with GUIGETMSG, pay close attention to the $button_1 case and the function below it called. look below, if you need more explanation just say the word, this should help though. expandcollapse popup;------------------------------------------------------------------------------------- ; Example - Press the button to see the value of the radio boxes ; The script also detects state changes (closed/minimized/timeouts, etc). Func Example() Local $button_1, $group_1, $radio_1, $radio_2, $radio_3 Local $radioval1, $radioval2, $msg Opt("GUICoordMode", 1) GUICreate("Radio Box Demo", 400, 280) ; Create the controls $button_1 = GUICtrlCreateButton("B&utton 1", 30, 20, 120, 40) $group_1 = GUICtrlCreateGroup("Group 1", 30, 90, 165, 160) GUIStartGroup() $radio_1 = GUICtrlCreateRadio("Radio &0", 50, 120, 70, 20) $radio_2 = GUICtrlCreateRadio("Radio &1", 50, 150, 60, 20) $radio_3 = GUICtrlCreateRadio("Radio &2", 50, 180, 60, 20) ; Init our vars that we will use to keep track of GUI events $radioval1 = 0 ; We will assume 0 = first radio button selected, 2 = last button $radioval2 = 2 ; Show the GUI GUISetState() ; In this message loop we use variables to keep track of changes to the radios, another ; way would be to use GUICtrlRead() at the end to read in the state of each control While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE MsgBox(0, "", "Dialog was closed") Exit Case $msg = $GUI_EVENT_MINIMIZE MsgBox(0, "", "Dialog minimized", 2) Case $msg = $GUI_EVENT_MAXIMIZE MsgBox(0, "", "Dialog restored", 2) Case $msg = $button_1 MsgBox(0, "Default button clicked", "Radio " & $radioval1) Case $msg >= $radio_1 And $msg <= $radio_3 $radioval1 = $msg - $radio_1 EndSelect WEnd EndFunc ;==>Example ;Frank. 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