Clever1mba 0 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() Share this post Link to post Share on other sites
scriptkitty 1 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. Share this post Link to post Share on other sites
Clever1mba 0 Posted May 23, 2005 Thanks scriptkitty and how with gui Share this post Link to post Share on other sites
scriptkitty 1 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. Share this post Link to post Share on other sites