hoffmn Posted September 23, 2009 Posted September 23, 2009 I know someone must have asked this before, but I could not find it while I was searching the forums. I want to create a custom dialog box that will pop-up and ask the user to make a choice. I have a script I created to configure a laptops wireless so that students can gain access to the secure wireless on campus. Problem is now we have two campus and two different wireless configurations. I want to offer them a choice as to which campus they would primarily be on so that it does not have to install both. This is what I found for a simple dialog box that offers yes or no as the choices and continues. Instead of offering yes or no, I want to offer Campus A or Campus B. ; Prompt for proper campus so the correct settings will be configured $confirm = MsgBox(4, "Confirmation", "Campus A or Campus B?") If $confirm = 6 Then ; Checks for 'Yes' MsgBox(0, "Yes", "You clicked 'Campus A'") EndIf If $confirm = 7 Then ; Checks for 'No' MsgBox(0, "No", "You clicked 'Campus B'") EndIf Right now, for testing I have it pop up a window to show which campus was selected. For the final product, I want it to run the necessary code to configure the computer accordingly. Essentially, I want to be able to label the buttons 'Campus A' and 'Campus B' and then execute my code that I have for each campus.
Minikori Posted September 23, 2009 Posted September 23, 2009 I know someone must have asked this before, but I could not find it while I was searching the forums. I want to create a custom dialog box that will pop-up and ask the user to make a choice. I have a script I created to configure a laptops wireless so that students can gain access to the secure wireless on campus. Problem is now we have two campus and two different wireless configurations. I want to offer them a choice as to which campus they would primarily be on so that it does not have to install both. This is what I found for a simple dialog box that offers yes or no as the choices and continues. Instead of offering yes or no, I want to offer Campus A or Campus B. ; Prompt for proper campus so the correct settings will be configured $confirm = MsgBox(4, "Confirmation", "Campus A or Campus B?") If $confirm = 6 Then ; Checks for 'Yes' MsgBox(0, "Yes", "You clicked 'Campus A'") EndIf If $confirm = 7 Then ; Checks for 'No' MsgBox(0, "No", "You clicked 'Campus B'") EndIf Right now, for testing I have it pop up a window to show which campus was selected. For the final product, I want it to run the necessary code to configure the computer accordingly. Essentially, I want to be able to label the buttons 'Campus A' and 'Campus B' and then execute my code that I have for each campus. You're going to have to make a GUI. MsgBox can't do custom buttons. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
dantay9 Posted September 23, 2009 Posted September 23, 2009 (edited) This script from ProgAndy does what you are asking. I think that making your own GUI would be the easiest way, though. Edited September 23, 2009 by dantay9
hoffmn Posted September 25, 2009 Author Posted September 25, 2009 Thanks for the replies. I will try this, but I almost feel like I am better off doing this with VB.Net. I am much more comfortable using that as my GUI programming language.
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