Jump to content

Keep A Script Running


 Share

Recommended Posts

i want to make a simple script that will paste text from the clipboard with an alternative shortcut

the problem is that the script runs through once and exits immediately... i want it to sit and wait for my hotkey...

any help is greatly appreciated

HotKeySet("^+v", "parse")

Func parse()
HotKeySet("^+v")
Send("ClipGet()")
HotKeySet("^+v", "parse")
EndFunc
Link to comment
Share on other sites

Welcome eNtoS,

Just use a While loop with a Sleep inside it.

HotKeySet("^+v", "parse")

While 1
    Sleep(100)
WEnd

Func parse()
    HotKeySet("^+v")
    Send("ClipGet()")
    HotKeySet("^+v", "parse")
EndFunc

Edit:

Remove the quotes around ClipGet() if you want the contents from the clipboard instead of a string "ClipGet()".

Edited by MHz
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...