sinafoye Posted January 20, 2007 Share Posted January 20, 2007 I was trying out the tutorial script npad, which was working great, except the final line of code Send("!n") does not work. The message box comes up, but the yes button is highlighted and it just hangs there. I have noticed there is an icon on the taskbar, and when I right click on it, it shows the script is paused. Can anyone tell me what I have done wrong? I wasn't able to find anything in the help on pausing or unpausing a script - Thanks! Link to comment Share on other sites More sharing options...
Helge Posted January 20, 2007 Share Posted January 20, 2007 Well, what language is your OS ? If it's non-English you will have to modify it to the corresponding titles and text. Regarding the pause-issue, the script isn't paused before you actually click the tray-icon, so there's nothing wrong there. Link to comment Share on other sites More sharing options...
sinafoye Posted January 20, 2007 Author Share Posted January 20, 2007 Well, what language is your OS ? If it's non-English you will have to modify it to the corresponding titlesand text. Regarding the pause-issue, the script isn't paused before you actually click the tray-icon, sothere's nothing wrong there.I am using Windows XP Pro - English. This is a complete copy of the code I typed:Run ("notepad.exe")WinWaitActive ("Untitled - Notepad")Send ("This is some text")Winclose ("Untitled - Notepad")WinWaitActive ("Notepad", "The text in the Unititled file has changed")Send("!n")The code just before the last Send executes beautifully. Any ideas what I am doing wrong? Link to comment Share on other sites More sharing options...
_Kurt Posted January 20, 2007 Share Posted January 20, 2007 Perhaps adding a small sleep before the "!n" ? Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
sinafoye Posted January 20, 2007 Author Share Posted January 20, 2007 Perhaps adding a small sleep before the "!n" ?I'm sorry to sound so dense, but what do you mean? Or was that a haha? Link to comment Share on other sites More sharing options...
_Kurt Posted January 20, 2007 Share Posted January 20, 2007 I'm sorry to sound so dense, but what do you mean? Or was that a haha?Of course it wasn't a haha. I just ment that perhaps the script requires a short sleep (as in a "wait") before it presses ALT+N, so like this: Run ("notepad.exe") WinWaitActive ("Untitled - Notepad") Send ("This is some text") Winclose ("Untitled - Notepad") WinWaitActive ("Notepad", "The text in the Untitled file has changed") Sleep(250) Send("!n") Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 20, 2007 Developers Share Posted January 20, 2007 It is exact sience:you have:WinWaitActive ("Notepad", "The text in the Unititled file has changed")should be WinWaitActive ("Notepad", "The text in the Untitled file has changed") SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Helge Posted January 20, 2007 Share Posted January 20, 2007 Unititled ? How about Untitled instead ? WinWaitActive ("Notepad", "The text in the Untitled file has changed") If you copied that script directly from the helpfile without modifying it then you might have a old version of AutoIt installed, where this typo hadn't been fixed. Link to comment Share on other sites More sharing options...
sinafoye Posted January 20, 2007 Author Share Posted January 20, 2007 Of course it wasn't a haha. I just ment that perhaps the script requires a short sleep (as in a "wait") before it presses ALT+N, so like this: Run ("notepad.exe") WinWaitActive ("Untitled - Notepad") Send ("This is some text") Winclose ("Untitled - Notepad") WinWaitActive ("Notepad", "The text in the Untitled file has changed") Sleep(250) Send("!n") Kurt Sorry, I didn't know there was a sleep command. Anyway, I inserted that command and it is still doing the same thing. By the way, why does the script add an icon to the tray and not remove it when the script finishes (which it may not be doing?) Link to comment Share on other sites More sharing options...
sinafoye Posted January 20, 2007 Author Share Posted January 20, 2007 Thanks everyone. I didn't notice the typo. Once I corrected it, it ran beautifully. Is there any place where I can get more sample code to help me learn the commands? Thanks again! Link to comment Share on other sites More sharing options...
_Kurt Posted January 20, 2007 Share Posted January 20, 2007 The best place to start with autoit scripting, is AutoIt 1-2-3. You will learn the basics http://www.autoitscript.com/forum/index.php?showtopic=21048Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now