manewman Posted April 9, 2009 Share Posted April 9, 2009 I am new to scripting and put together a basic script using notepad. I can't figure out how to get the script to continue after I add text. It fails after the "Send" command. Run ("notepad.exe") WinWaitActive ("Untitled - Notepad") Sleep (2000) WinSetTitle("Untitled - ", "", "Phase1_Mark") Sleep (2000) Send ("This is a Test Script created by Mark A. Newman.") WinClose ("Phase1_Mark - Notepad") WinWaitActive ("Phase1_Mark - Notepad", "Do you want to save") Sleep (5000) Send ("!n") Link to comment Share on other sites More sharing options...
CodyBarrett Posted April 9, 2009 Share Posted April 9, 2009 you need a While wend loop [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
manewman Posted April 9, 2009 Author Share Posted April 9, 2009 you need a While wend loopWhat would that look like in my script?I went to the "Help" in AutoIt but I did not understand where to add it.If you have time!! Link to comment Share on other sites More sharing options...
CodyBarrett Posted April 9, 2009 Share Posted April 9, 2009 Run ("notepad.exe") WinWaitActive ("Untitled - Notepad") Sleep (2000) WinSetTitle("Untitled - ", "", "Phase1_Mark") Sleep (2000) Send ("This is a Test Script created by Mark A. Newman.") WinClose ("Phase1_Mark - Notepad") WinWaitActive ("Phase1_Mark - Notepad", "Do you want to save") Sleep (5000) ;YOU COULD just Winwait() for the popup Send ("!n") While 1 Sleep (1000) Msgbox (0,'','Would you like to End your script?') If @Error then Exit wend and just add more code whenever you want [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
manewman Posted April 9, 2009 Author Share Posted April 9, 2009 Thanks!!! Link to comment Share on other sites More sharing options...
DrKovra Posted April 9, 2009 Share Posted April 9, 2009 K O O L ! [s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________--------------- 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