Jump to content
Sign in to follow this  
manewman

Script Help!

Recommended Posts

manewman

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")

Share this post


Link to post
Share on other sites
CodyBarrett

you need a While wend loop

Share this post


Link to post
Share on other sites
manewman

you need a While wend loop

What 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!!

Share this post


Link to post
Share on other sites
CodyBarrett

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

Share this post


Link to post
Share on other sites
manewman

Thanks!!!

Share this post


Link to post
Share on other sites
DrKovra

:D

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]--------------- __________------------------------------ __________---------------

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  

×