Sign in to follow this  
Followers 0
fluffman

How do I pause script and wait for user input?

4 posts in this topic

Apologies for my first post being a question but hey I can't help others yet anyways :)

I need to put in the middle of my script a little pause function that stays paused until I have completed an action and then will probably have to click continue to continue.

I only know how to use the sleep function so far.

I've been reading a lot in the help file and know how helpful it is however I have not found help in it for this. I'm sure there is something for this in there but it probably needs to be pieced together from a few functions which I'm not clever enough to do.

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Have you heard of a while loop?

They look like this:

While (condition)

do something

Wend

The 'do something' will keep happening as long as the condition is true.

For the condition you could check a variable, like 'while $x = 1'

While $x=1

do functions

Wend

This specific statement means that it will do the functions between while $x =1 and wend, if x is equal to one.

Remembering that a dollar sign symbolizes a variable/pronumeral...

But you would like in your condition for it to be while the click is not pressed.

So look at the _ispressed function or similar, and don't forget to prefix it with 'not' so that it loops/waits while the button is not pressed, not while it is.

Edited by hyperzap

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Share this post


Link to post
Share on other sites

Thanks hyperzap this really gets me somewhere! I had not head much about loops and not at all about the while loop.

I will of course have to go to the help file and read about everything you mentioned though.

But I have a much better idea of where I can go from here now. Ty.

Share this post


Link to post
Share on other sites

Thanks hyperzap this really gets me somewhere! I had not head much about loops and not at all about the while loop.

I will of course have to go to the help file and read about everything you mentioned though.

But I have a much better idea of where I can go from here now. Ty.

Try Msgbox(0,"Operation halted","Continue?")


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

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