danusko Posted August 26, 2005 Posted August 26, 2005 Hi everybody i want to do a remnider. I use GUI but it doesnt works like i want. I use edit box, combo with default preset time (1 min, 5 min...) and 2 buttons. I want after i send enter on combobox, or click or enter on OK button close the Gui Msbbox and show it after selected time. But it doesnt works. Help me pls. THANKE YOU VERY MUCH expandcollapse popup#include "C:\My documents\docs\AutoIt\Include\GUIConstants.au3" AutoItSetOption ( "SendKeyDelay", 300 ) If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110, 21) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") do GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) sleep($data) if $data = 3 then MsgBox(0, "AutoIt", "3") endif if $data = 5 then MsgBox(0, "AutoIt", "5") endif If $msg = 1 Then exit endif $data = $data * 1000 sleep($data) EndSelect Until $msg = $GUI_EVENT_CLOSE or $msg = $cancel3 Exit
seandisanti Posted August 26, 2005 Posted August 26, 2005 Hi everybodyi want to do a remnider. I use GUI but it doesnt works like i want. I use edit box, combo with default preset time (1 min, 5 min...) and 2 buttons. I want after i send enter on combobox, or click or enter on OK button close the Gui Msbbox and show it after selected time. But it doesnt works. Help me pls.THANKE YOU VERY MUCHexpandcollapse popup#include "C:\My documents\docs\AutoIt\Include\GUIConstants.au3" AutoItSetOption ( "SendKeyDelay", 300 ) If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110, 21) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") do GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) sleep($data) if $data = 3 then MsgBox(0, "AutoIt", "3") endif if $data = 5 then MsgBox(0, "AutoIt", "5") endif If $msg = 1 Then exit endif $data = $data * 1000 sleep($data) EndSelect Until $msg = $GUI_EVENT_CLOSE or $msg = $cancel3 Exit<{POST_SNAPBACK}>here you go man, had to make a few changes...expandcollapse popup#include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) MsgBox(0,"Sleep","sleeping for " & $data & " seconds.") sleep($data*1000) ToolTip("Sleep done") Case $msg = $Combo_4 $data = GUICtrlRead($Combo_4) MsgBox(0,"Sleep","sleeping for " & $data & " seconds.") sleep($data*1000) MsgBox(0,"Sleep","sleep done") Case $msg = $cancel3 ExitLoop EndSelect WEnd Exit
danusko Posted August 26, 2005 Author Posted August 26, 2005 yes its good, but i want hide (close) msgbox and show it after selected time...and after then, anywhere i press enter or click on "OK" button ps: messege box about time i forgot delet, its only for my info is it so possible? thanks
seandisanti Posted August 26, 2005 Posted August 26, 2005 yes its good, but i want hide (close) msgbox and show it after selected time...and after then, anywhere i press enter or click on "OK" buttonps: messege box about time i forgot delet, its only for my infois it so possible?thanks<{POST_SNAPBACK}>here ya goexpandcollapse popup#include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) Case $msg = $Combo_4 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop EndSelect WEnd Exit
danusko Posted August 26, 2005 Author Posted August 26, 2005 thanks thats what i need realy thanke you for your good advise
seandisanti Posted August 26, 2005 Posted August 26, 2005 thanks thats what i needrealy thanke you for your good advise<{POST_SNAPBACK}>no problem. glad i could help
danusko Posted August 26, 2005 Author Posted August 26, 2005 no problem. glad i could help<{POST_SNAPBACK}>please one question yet, how can i make that msgbox no hide when i click on concrete time on combo, but so as i choose the time and press enter .simply at any moment when i press enter - the msgbox will by posted (hiden at selected time)is this possible?thanks
Valuater Posted August 26, 2005 Posted August 26, 2005 please one question yet, how can i make that msgbox no hide when i click on concrete time on combo, but so as i choose the time and press enter .simply at any moment when i press enter - the msgbox will by posted (hiden at selected time)is this possible?thanks<{POST_SNAPBACK}>like thisexpandcollapse popup#include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) ;Case $msg = $Combo_4 ; $data = GUICtrlRead($Combo_4) ; GUISetState(@SW_HIDE) ; sleep($data*1000) ; GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop EndSelect WEnd Exithope that helps8)
SupraNatural Posted August 26, 2005 Posted August 26, 2005 #include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop EndSelect WEnd Exit Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!
danusko Posted August 26, 2005 Author Posted August 26, 2005 sorry but it still doesnt work, is the same as before i need this i run script write any text, press tab and default is there 1 minute. when i want remind this text for a 1 minute a press only enter and my cursor is on combobox no on "OK", or Cancel this script doesnt make this or?
Valuater Posted August 26, 2005 Posted August 26, 2005 sorry but it still doesnt work, is the same as beforei need thisi run scriptwrite any text, press tab and default is there 1 minute. when i want remind this text for a 1 minute a press only enter and my cursor is on combobox no on "OK", or Cancelthis script doesnt make this or?<{POST_SNAPBACK}>like thisexpandcollapse popup#include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) GUICtrlSetState( -1, $GUI_DEFBUTTON) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) ;Case $msg = $Combo_4 ; $data = GUICtrlRead($Combo_4) ; GUISetState(@SW_HIDE) ; sleep($data*1000) ; GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop EndSelect WEnd Exit8)
SupraNatural Posted August 26, 2005 Posted August 26, 2005 (edited) #include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,$BS_defpushbutton) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop EndSelect WEnd Exit Edited August 26, 2005 by SupraNatural Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!
Valuater Posted August 26, 2005 Posted August 26, 2005 (edited) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])<{POST_SNAPBACK}>i got an error on yoursthis "["???8)OK..... i see your edit 8) Edited August 26, 2005 by Valuater
danusko Posted August 26, 2005 Author Posted August 26, 2005 i got an error on yoursthis "["???8)OK..... i see your edit 8)<{POST_SNAPBACK}>i dont understudi have to put your script in my?but when i insert this script $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])makes me errori have to delete "]"???iam stupid
Valuater Posted August 26, 2005 Posted August 26, 2005 i dont understudi have to put your script in my?but when i insert this script $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])makes me errori have to delete "]"???iam stupid <{POST_SNAPBACK}>That message was for "SupraNatural" only.... not youremove the line above8)
danusko Posted August 26, 2005 Author Posted August 26, 2005 That message was for "SupraNatural" only.... not youremove the line above8)<{POST_SNAPBACK}>oki removed it, but valueter you know how i make what i wantwhen aj press enter on combo is the same as i click on "OK"?
Valuater Posted August 26, 2005 Posted August 26, 2005 oki removed it, but valueter you know how i make what i wantwhen aj press enter on combo is the same as i click on "OK"?<{POST_SNAPBACK}>yespressing enter actually presses the "ok" button, because it was set as the default button with this lineGUICtrlSetState( -1, $GUI_DEFBUTTON)8)
danusko Posted August 26, 2005 Author Posted August 26, 2005 yespressing enter actually presses the "ok" button, because it was set as the default button with this lineGUICtrlSetState( -1, $GUI_DEFBUTTON)8)<{POST_SNAPBACK}>BUT IT DOESNT WORK AS I WONTI WANT ONLY PRESS ENTER WHEN I AM ON COMBO....NOW IT WORK ONLY, WHEN I WRITE TEXT, MOVE TO "ok" AND THEN, WHEN I PRES ENTER MSG BOX HIDE...BUT I WANT MSG HIDE WHEN I PRESS ENTER ON COMBOCAN I DO IT ANYTHING WITH THIS COMMAND?$BS_DEFPUSHBUTTON
danusko Posted August 26, 2005 Author Posted August 26, 2005 MY SCRIPT NOW: expandcollapse popup#include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) TrayTip("", "cas " & $data, 5) GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop GUICtrlSetState( -1, $GUI_DEFBUTTON) ; $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR]) ; ; GUICtrlCreateButton ( "text", left, top [, width [, height [, style [, exStyle]]]] ) EndSelect WEnd Exit
Valuater Posted August 26, 2005 Posted August 26, 2005 (edited) just use this.... it works expandcollapse popup#include <GUIConstants.au3> AutoItSetOption ( "SendKeyDelay", 300 ) ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $text = GuiCtrlCreateEdit("", 10, 10, 250, 70) $Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110) $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20) GUICtrlSetState( -1, $GUI_DEFBUTTON) $cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20) GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1") while 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok2 $data = GUICtrlRead($Combo_4) GUISetState(@SW_HIDE) sleep($data*1000) GUISetState(@SW_SHOW) ;Case $msg = $Combo_4 ; $data = GUICtrlRead($Combo_4) ; GUISetState(@SW_HIDE) ; sleep($data*1000) ; GUISetState(@SW_SHOW) Case $msg = $cancel3 ExitLoop EndSelect WEnd Exit 8) Edited August 26, 2005 by Valuater
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