sigil Posted May 11, 2005 Posted May 11, 2005 I want to use clipget() to retrieve some text from the clipboard after highlighting and copying it. This is the code that I'm using: ;main body of script func getvalue($x1,$y1,$x2,$y2) mouseclickdrag("left",$x1,$y1,$x2,$y2,5) send("^c") return clipget() endfunc About a third of the time, I get an error message saying that "OpenClipboard Failed". Why is this error happening? I'm using 3.1.1.18.
herewasplato Posted May 11, 2005 Posted May 11, 2005 I want to use clipget() to retrieve some text from the clipboard after highlighting and copying it. This is the code that I'm using:;main body of script func getvalue($x1,$y1,$x2,$y2) mouseclickdrag("left",$x1,$y1,$x2,$y2,5) send("^c") return clipget() endfuncAbout a third of the time, I get an error message saying that "OpenClipboard Failed". Why is this error happening? I'm using 3.1.1.18.<{POST_SNAPBACK}>Try a sleep(50) between ^c and clipget... give the system some time to complete one clipboard operation before asking it to do another. You might also need to add a sleep in the part of your "main body of script" right where the function returns to... before using the returned value. [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now