Sign in to follow this  
Followers 0
flyfamilyguy

MsgBox! The little guy is giving me a HeadAche!

4 posts in this topic

Hello everyone.

My very first post. I'm Happy to be here and excited as well. All my scripting has been in batch up until a few weeks ago

when I started getting board with the command line and began browsing for another language that would be easy enough

to run on Windows 8 without a lot of configuring and scratching my head for hours.

Hence, here I am. Autoit installed pretty much out of the box. All I had to do was point to it in the system environment and it was ready

to go. I have to say I'm liking it a lot! Easy to understand and if bumps occur it doesn't take a lot to get them smoothed out.

I almost fell over then wanted to hug ummm that guy, Autoit when the first error from my syntax occurred and Scite was telling me

exactly what I did wrong and where! That's an awesome addition to this language kudos!

Anyway, I'm struggling a bit with a MsgBox of all things. I know this is an easy one for you guys but as I said, I come from a black

screen where all one pretty much gets is 'Choice' for any user interaction.

I'm using this message box to inform me 30 seconds out from performing an archive and back up routine I've written in batch.

(Only because I have not learned how to archive and back up with autoit yet). The reason being is that there may be times when I want

to cancel the back up.

So, I have it set up at the moment with the 3 flag [ yes no and cancel ]. I would like to remove the cancel button, add a timer and then if I'm away when it pops up, it times out then another box pops up, and stays with a message informing me that I did not respond and that

it went ahead and started the back up.

I'm stuck on what syntax to use telling the first message box that there was no response so that it knows to execute the appropriate

"no response" message.

Thanks everyone!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Checkout the help file (click this link):

msgbox

Then, you can play around to get your options set:

$i = MsgBox(1,1,1,5)
ConsoleWrite($i & @CRLF)

When timeout occurs, the return is -1...so perform logic based on that.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

I used this...

MsgBox(262192, "MaXoFF - Start-Up Initiated", "MaXoFF will automatically start in 10 seconds!     " & _                 @CRLF & @CRLF & "** PLEASE CLOSE ALL PROGRAMS **      ", 10)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thank you both very much! I'm on my way

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