capt2white Posted July 31, 2007 Posted July 31, 2007 I am trying to use the NO button that is in my message boxes to give the user a way to correct a mistake that they made. I want my script to go back to the previous screen and let the user reenter the information they mesesd up if NO is selected. I am fustrated that I can not achieve this. Is there something someone can suggest to help me learn Autoit? I am totally green in the field of programming, but I have the desire to learn. I am a PC Hardware/Network guy by trade. Thanks in advance for your help!! CODE$Patient_Last_Name = InputBox("Please enter", "Patient Last Name") $Patient_First_Name = InputBox("Please enter", "Patient First Name") $Patient_DOB = InputBox("Please enter", "Patient DOB as YYYY-MM-DD") MsgBox (4, "Is the Patient's last name correct?", $Patient_Last_Name) MsgBox (4, "Is the Patient's first name correct?", $Patient_First_Name) MsgBox (4, "Is the Patient's DOB correct and in the YYYY-MM-DD format?", $Patient_DOB) DirCopy ("C:\Documents and Settings\Eric\Desktop\AIT\Template","C:\Documents and Settings\Eric\Desktop\AIT\" & $Patient_Last_Name & " " & $Patient_First_Name & " " & $Patient_DOB)
Xenobiologist Posted July 31, 2007 Posted July 31, 2007 Hi, make functions. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Gif Posted July 31, 2007 Posted July 31, 2007 (edited) I am trying to use the NO button that is in my message boxes to give the user a way to correct a mistake that they made. I want my script to go back to the previous screen and let the user reenter the information they mesesd up if NO is selected. I am fustrated that I can not achieve this. Is there something someone can suggest to help me learn Autoit? I am totally green in the field of programming, but I have the desire to learn. I am a PC Hardware/Network guy by trade. Thanks in advance for your help!! CODE$Patient_Last_Name = InputBox("Please enter", "Patient Last Name") $Patient_First_Name = InputBox("Please enter", "Patient First Name") $Patient_DOB = InputBox("Please enter", "Patient DOB as YYYY-MM-DD") MsgBox (4, "Is the Patient's last name correct?", $Patient_Last_Name) MsgBox (4, "Is the Patient's first name correct?", $Patient_First_Name) MsgBox (4, "Is the Patient's DOB correct and in the YYYY-MM-DD format?", $Patient_DOB) DirCopy ("C:\Documents and Settings\Eric\Desktop\AIT\Template","C:\Documents and Settings\Eric\Desktop\AIT\" & $Patient_Last_Name & " " & $Patient_First_Name & " " & $Patient_DOB) try this: Global $Patient_Last_Name Global $Patient_First_Name Global $Patient_DOB _first() _second() _third() _loop() DirCopy ("C:\Documents and Settings\Eric\Desktop\AIT\Template","C:\Documents and Settings\Eric\Desktop\AIT\" & $Patient_Last_Name & " " & $Patient_First_Name & " " & $Patient_DOB) Func _first() $Patient_Last_Name = InputBox("Please enter", "Patient Last Name") If @error Then Exit EndFunc Func _second() $Patient_First_Name = InputBox("Please enter", "Patient First Name") If @error Then Exit EndFunc Func _third() $Patient_DOB = InputBox("Please enter", "Patient DOB as YYYY-MM-DD") If @error Then Exit EndFunc Func _loop() $msg = MsgBox (4, "Is the Patient's last name correct?", $Patient_Last_Name) if $msg = 7 Then _first() $msg1 = MsgBox (4, "Is the Patient's first name correct?", $Patient_First_Name) if $msg1 = 7 Then _second() $msg2 = MsgBox (4, "Is the Patient's DOB correct and in the YYYY-MM-DD format?", $Patient_DOB) if $msg2 = 7 Then _third() EndFunc Edited July 31, 2007 by c4nm7
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