Sign in to follow this  
Followers 0
Hobo

A very simple problem. D:

4 posts in this topic

#1 ·  Posted (edited)

When I first ran the script the message box that I had it open telling the user Bye closed via the Send("OK") function, but after that first time I have to manually click the OK button. Did I do something wrong that's causing it to not work?

I just starting using AutoIt so it's a pretty simple script. D:

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Sleep(500)

Send("I made this program using AutoIt as well as its' example scripts that came with it.")

Sleep(1000)

Send("{ENTER}I think it's pretty cool.")

MsgBox(0,"Attention.", "Good Bye!")

WinWaitActive("Attention.")

Send("OK")

WinWaitActive("Untitled - Notepad")

Sleep(1000)

Send("!f")
Send("x")

WinWaitActive("Notepad")
Send("y")

WinWaitActive("Save As")

Send("I made this.{ENTER}")
Edited by Hobo

Share this post


Link to post
Share on other sites



The message "Attention" box gets clicked by the user and goes away. Then this line

WinWaitActive("Attention.")

is waiting and waiting for that title that will never show

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

The message "Attention" box gets clicked by the user and goes away. Then this line

WinWaitActive("Attention.")

is waiting and waiting for that title that will never show

8)

I think that I might be understanding what you're saying. =(

But, once I start the script even if I don't even move the cursor or push any keys the OK command still fails to close the message box, and I know that it's used, because when it gets stuck on the message box and I hit the OK button the text OK isn't sent to the notepad that's open. D:

Share this post


Link to post
Share on other sites

I think that I might be understanding what you're saying. =(

But, once I start the script even if I don't even move the cursor or push any keys the OK command still fails to close the message box, and I know that it's used, because when it gets stuck on the message box and I hit the OK button the text OK isn't sent to the notepad that's open. D:

If the O is underlined then its &OK but why not judt get the control ID and do it that way? Use the AutoIt window Spy to get the control information

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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