Sign in to follow this  
Followers 0
MrTieDye

Copy and paste into a variable?

4 posts in this topic

Lets say you want to have AutoIt go click and drag over some text and then press ctrl+c to copy it it. Is there some way to dump that info into a string variable in the program? Thanks for any help you can provide.

Share this post


Link to post
Share on other sites



clipget() and clipput() may be what your looking for.

Share this post


Link to post
Share on other sites

clipget() and clipput() may be what your looking for.

And you just may be my bestest friend! Thanks for the quick reply. That is exactly what I was looking for.

Peace

Share this post


Link to post
Share on other sites

Here's a little example if you needed it :3

Source :

Global $Clip = ''; Variable to store Clipboard data
HotKeySet ('!{Esc}','_Exit'); Alt+Esc = Exit 
HotKeySet ('!c','_Clip'); Alt+C = Set Clipboard data to $Clip
While '1'
Sleep ('100'); Makes CPU usage 0% 
WEnd
Func _Clip ()
$Clip = ClipGet (); Get data from the clipboard and set it to $Clip
ConsoleWrite ('$Clip : ' & $Clip & @CRLF); Log $Clip to console (?For debugging?)
EndFunc
Func _Exit ()
Exit 
EndFunc

Hope this helps! :)

- John


Latest Projects :- New & Improved TCP Chat

Share this post


Link to post
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
Sign in to follow this  
Followers 0