Sign in to follow this  
Followers 0
Corbana

looping

4 posts in this topic

Hi

I very new to this and am struggling, I have wrote a script to move some data around for me and now I want it to ask at the end, are there any more requests yes/no? and then if yes then start again and if no then quit. I know the quit command is Then Exit but thats about as much as I have been able to find.

Also I am looking to replace:

If $details1 = "" Then Exit

With something that asks if the user would like to start again, if so go to the start of the script else quit.

Thanks

Share this post


Link to post
Share on other sites



Can you give a sample of the script you made ?

I firstly think to have a big loop in the whole script, at the end you can ask the user if he want restart the script (MsgBox) then (depending on the result) if the user want to quit use "ExitLoop" else continue the loop or do what you want...

Share this post


Link to post
Share on other sites

Use MsgBox for the last part with a flag of 36 for yes and no buttons, and a question mark icon. Its in the help file...look it up.

$var = MsgBox(36, "Query", "Are there any more requests?")

There are a few ways you can go about the looping part...Do, While, or a simple if. The message box will return a value depending on which button is clicked. 6 = yes, 7 = no.


Pink Floyd - The Wall

Share this post


Link to post
Share on other sites

You can check d flag of d msgbox by looking at d help menu...it's really2 help you


AUTOIT[sup] I'm lovin' it![/sup]

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