Jump to content

Simple Notepad Automation not working


Recommended Posts

Hi,

I am new to scripting world.

When i tried tutorial for Simple Notepad Autonation, i face the problem that i does not quit.

It wait for the inputs.

Script is as below

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("This is some text.")

WinClose("Untitled - Notepad")

WinWaitActive("Notepad", "Save")

;WinWaitActive("Notepad", "Do you want to save") ; When running under Windows XP

Send("!n")

As per example, it should be close without asking "Do you wan to Save"

Thanks in Advance.

Edited by AmolBhosale
Link to comment
Share on other sites

Hello,

I come to know that there is mistake in 5th line.

Instead of "Save" there should be "&No".

Can u pls send the script which will check current hostname then it will change that hostname from mention file in which it will search for current hostname & then it will copy next cell information for new hostname.

Link to comment
Share on other sites

  • Moderators

AmolBhosale, your request is not making much sense. Check the @ComputerName macro in the help file for how you would check current host name. Beyond that, you need to state specifically what you are trying to do so we can help.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...