Jump to content

Recommended Posts

Posted

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
Posted (edited)

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
Posted

thx for the help, was exactly what is was looking for (btw, had to remove the double quotes around ClipGet() to make it work.

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
  • Recently Browsing   0 members

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