Sign in to follow this  
Followers 0
mrrlg

What Is The Message?

6 posts in this topic

I am trying to make my script as user friendly as possible. To that end I need to capture a user name early on in the scripting process and save it to be applied in an Oracle SQL Plus application later on. I set up the following scripts: I get the message box with the prompt to enter the user name as specified, however the third message box displays You have entered the user name $username instead of the information typed in the previous window, What have I done wrong? Also, if I click no I do not get a chance to correct the typed in information and the script does not stop.

$__msgbox = MsgBox ( 4, 'AOOA MIS Dept', 'This Script will install the Latest Version of Passport for Windows. Do you want to Continue?' )

if NOT ( $__msgbox = 7 ) then

BlockInput ( 0 )

$Username = InPutBox ("AOOA MIS Dept", "Please enter your user name for Passport for Windows. This is your first initial, last name.", (" "))

MsgBox (4, "AOOA MIS Dept", "You entered the user name" & "$username")

if not ($__msgbox = 7) Then

Share this post


Link to post
Share on other sites



anything between " " or ' ' is a literal....

so it should be :

MsgBox (4, "AOOA MIS Dept", "You entered the user name" & $username)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

FAQ #9 in the help file.

Share this post


Link to post
Share on other sites

take the quotes off $username that'd do it. you don't put quotes around $variables or @macros


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Thanks, you guys are great, this board responds faster than any other board I post on! Two things, how do I insert a space between the text "You entered the user name" and the name the user typed in and how do I loop back if they discover that they typed in the wrong name?

Share this post


Link to post
Share on other sites

Thanks, you guys are great, this board responds faster than any other board I post on! Two things, how do I insert a space between the text "You entered the user name"

are you serious ???

ok lets assume you are...

change:

"You entered the user name" & $username

to

"You entered the user name " & $username

loop till ok is clicked

$__msgbox = 7
While $__msgbox = 7
  $Username = InPutBox ("AOOA MIS Dept", "Please enter your user name for Passport for Windows. This is your first initial, last name.", (" ")) 
  $__msgbox = MsgBox (4, "AOOA MIS Dept", "You entered the user name " & "$username")
wend


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0