Jump to content

[Help]|Trying my first autoit script


Recommended Posts

I got a problem with this script:-

WinWaitActive("Document - WordPad")

HotKeySet("{End}","MyExit")

HotKeySet("{PGUP}","BlueTxt")

Func MyExit()

Exit

EndFunc

Func BlueTxt()

Send("Hello World{Enter}")

EndFunc

What i am trying to do is if WordPad is running, then if i press PageUp key, it will type Hello World and then press Enter. If End key is press then it will exit.

But the main problem is the script auto exit when WordPad is active. How to solve this?

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...