Jump to content

Receiving input from multiple GUIs in sequence...


Recommended Posts

I am attempting to chop up a script I've made that has a GUI which has 6 input boxes and a button that calls a function. How would I go about chopping it up so it has 6 GUIs that come up one by one? Basically, I want it to ask for 1 input then click a button, then another GUI pops up with the 2nd input, etc.

Thanks!

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

instead of guis for this why not just use the inputbox for each question?

InputBox ( "title", "Prompt" [, "Default" [, "password char" [, Width, Height [, Left, Top [, TimeOut]]]]] )

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

instead of guis for this why not just use the inputbox for each question?

InputBox ( "title", "Prompt" [, "Default" [, "password char" [, Width, Height [, Left, Top [, TimeOut]]]]] )

Because I like to overcomplicate things instead of looking at the obvious... :(

I'm such a moron, thank you for the help. This is much easier than what I was planning on doing. :)

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

i really wouldn't care much for having 6 different input boxes show up..

maybe if you show us your code we could figure out a better way to go

8)

I actually do want it that way (showing someone a GUI with 6 input fields is more intimidating than 6 separate boxes - this will be for people who are comfortable with IE/email and that's about it), but I do have another problem/question... I am trying to make it check the variables of 2 input boxes for consistency (password and password verification) and I can't seem to find anything on the forums about it. I want it to check the 2 variables and if they are different, then it should prompt for both input boxes again. This is what I've got now:

Global $username
Global $password
Global $password2

$username = InputBox("Network Username","What is your network username?","","")
$password = InputBox("RADIUS Password","What is your RADIUS password?","","")
$password2 = InputBox("Re-Enter RADIUS Password","Please re-enter your RADIUS password:","","")
While 1
    If Not $password = $password2 Then
        $password = InputBox("RADIUS Password","You mistyped your password. What is your RADIUS password?","","")
        $password2 = InputBox("Re-Enter RADIUS Password","Please re-enter your RADIUS password:","","")
    Else
    EndIf
WEnd
$serial = InputBox("Serial Number","Please enter the serial number of the machine you are currently setting up.  Enter it in exactly as displayed on the sticker attached to the machine.  S/N stickers are usually located on the bottoms of notebook computers and on the back of desktop computers.","","")

Exit

It works until the passwords are correct, then the script stops and doesn't prompt for $serial. I know it's got to be something with a While statement... The autoit forums won't allow you to search for the term While, so I tried Wend and still couldn't find anything about it.

Thanks!

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

Global $username
Global $password
Global $password2

$username = InputBox("Network Username","What is your network username?","","")
$password = InputBox("RADIUS Password","What is your RADIUS password?","","")
$password2 = InputBox("Re-Enter RADIUS Password","Please re-enter your RADIUS password:","","")
While 1
    If Not $password = $password2 Then
        $password = InputBox("RADIUS Password","You mistyped your password. What is your RADIUS password?","","")
        $password2 = InputBox("Re-Enter RADIUS Password","Please re-enter your RADIUS password:","","")
    Else
ExitLoop
    EndIf
WEnd
$serial = InputBox("Serial Number","Please enter the serial number of the machine you are currently setting up.  Enter it in exactly as displayed on the sticker attached to the machine.  S/N stickers are usually located on the bottoms of notebook computers and on the back of desktop computers.","","")

Exit

8)

NEWHeader1.png

Link to comment
Share on other sites

Global $username
Global $password
Global $password2

$username = InputBox("Network Username","What is your network username?","","")
$password = InputBox("RADIUS Password","What is your RADIUS password?","","")
$password2 = InputBox("Re-Enter RADIUS Password","Please re-enter your RADIUS password:","","")
While 1
    If Not $password = $password2 Then
        $password = InputBox("RADIUS Password","You mistyped your password. What is your RADIUS password?","","")
        $password2 = InputBox("Re-Enter RADIUS Password","Please re-enter your RADIUS password:","","")
    Else
ExitLoop
    EndIf
WEnd
$serial = InputBox("Serial Number","Please enter the serial number of the machine you are currently setting up.  Enter it in exactly as displayed on the sticker attached to the machine.  S/N stickers are usually located on the bottoms of notebook computers and on the back of desktop computers.","","")

Exit

8)

Wow, now that's a Monday Detail! Exitloop you are the devil! :)
Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...