Jump to content

how can I save data I copy into a string variable


Recommended Posts

Just one further tip, in addition to what JohnOne gave you. If you find that you are not reliably getting the correct information from the clipboard it may be necessary to add a small delay between copying the data and retrieving it from the clipboard.

For example:

send("^c")
sleep(200)
$mycopy = ClipGet()

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Link to comment
Share on other sites

Yes, best to have some sort of check

Func _Copy()
    ClipPut("")
    Send("^c")
    Sleep(10)
    $var = ClipGet()
    If Not ($var == "") Then
       Return $var
    EndIf
    Return False
EndFunc

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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