Clever1mba Posted May 23, 2005 Share Posted May 23, 2005 hello i want to promte user for Reboot and Next Buttons if user select reboot system restart and if user click Next Button then go for this Func OKButton() Link to comment Share on other sites More sharing options...
scriptkitty Posted May 23, 2005 Share Posted May 23, 2005 You can do it with the gui functions, or just the standard msgbox if you like: $msg=msgbox(4,"Reboot, or continue?", "Click yes to reboot, no to continue") if $msg=7 then okbutton() if $msg=6 then msgbox(1,"info","I would reboot now") ;Shutdown(6) ;Force a reboot remove; in front of shutdown EndIf Func OKButton() msgbox(1,"info","Pressed ok") EndFunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Clever1mba Posted May 23, 2005 Author Share Posted May 23, 2005 Thanks scriptkitty and how with gui Link to comment Share on other sites More sharing options...
scriptkitty Posted May 23, 2005 Share Posted May 23, 2005 most right from help file: #include <GUIConstants.au3> GUICreate("Reboot, or continue?", 200, 100) ; will create a dialog box that when displayed is centered Opt("GUICoordMode",2) $reboot=GUICtrlCreateButton ("Reboot", 10, 30, 50) $next=GUICtrlCreateButton ( "Next", 0, -1) 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 or $msg = $reboot or $msg = $next Then ExitLoop Wend GUIDelete () If $msg = $reboot Then reboot() If $msg = $next then OKButton() func reboot() msgbox(1,"info","I would reboot now") ;Shutdown(6) ;Force a reboot remove; in front of shutdown Endfunc Func OKButton() msgbox(1,"info","Pressed ok") EndFunc AutoIt3, the MACGYVER Pocket Knife for computers. 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