Newbi3 Posted February 19, 2010 Posted February 19, 2010 Code:#include <GuiConstantsEx.au3>#include <IE.au3>MainGui()Func MainGui() Local $Run, $Button_2, $msg GUICreate("Short Cuts") ; will create a dialog box that when displayed is centered Opt("GUICoordMode", 2) $Run = GUICtrlCreateButton("Run Somthing", 0, 0, 100) $Button_2 = GUICtrlCreateButton("Go to a website", 0, -1) GUISetState() ; will display an dialog box with 2 button ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Run $program = InputBox ("What program?", "Type program name and extestion here") Run($program) Case $msg = $Button_2 $program = InputBox ("Which website?", "Type website name here") Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Ready?","Do you have Internet Explorer running?") Select Case $iMsgBoxAnswer = 6 ;Yes Case $iMsgBoxAnswer = 7 ;No WEndEndSelect Run($program) EndFunc----------------------------------------------------------------------------------------------------------------------------I made this program today to make it easier to do things. I am going to add MANY more things you can do . I can not run it though because it says there is no While for the WEnd or no WEnd for the While ??? . I was wondering if any of you people can help me out. Thanks for ANY help in advance P.S. There is a download if you prefer to download the code AMP.au3
kaotkbliss Posted February 19, 2010 Posted February 19, 2010 endselect should go before your wend 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
enaiman Posted February 19, 2010 Posted February 19, 2010 (edited) Indentation (TAB use) has a very good purpose: to help with such cases (If/EndIf, Select/EndSelect, Switch/EndSwitch ...) USE IT and think a little before asking for help. You had 1x EndSelect missing and WEnd position was wrong in relation to your EndSelect. Use "autoit" tags to post your code. Here is the fixed code: Func MainGui() Local $Run, $Button_2, $msg GUICreate("Short Cuts") ; will create a dialog box that when displayed is centered Opt("GUICoordMode", 2) $Run = GUICtrlCreateButton("Run Somthing", 0, 0, 100) $Button_2 = GUICtrlCreateButton("Go to a website", 0, -1) GUISetState() ; will display an dialog box with 2 button ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Run $program = InputBox ("What program?", "Type program name and extestion here") Run($program) Case $msg = $Button_2 $program = InputBox ("Which website?", "Type website name here") Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Ready?","Do you have Internet Explorer running?") Select Case $iMsgBoxAnswer = 6 ;Yes Run($program) Case $iMsgBoxAnswer = 7 ;No EndSelect EndSelect WEnd EndFunc Edited February 19, 2010 by enaiman SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
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