Eambo Posted April 8, 2011 Share Posted April 8, 2011 Hi Everyone! This is more a fact gathering/brain storming post than anything. I have written a short script that'll allow me to automatically copy highlighted text to clipboard. Simples! What I'm wondering is: Is there a more efficient way of doing this? I noticed sometimes it wouldn't copy, and I'm thinking due to too much looping. But I could also be crazy? Does anyone have any insight or suggestions on how this could be better implemented? Nothing urgent or major, I'd just be interested to know how I could do things better :-) #Include <Misc.au3> call ("_Start") Func _Start() While not _IsPressed("01") Sleep (20) WEnd _Clicked() EndFunc Func _Clicked() $Count=0 While(_IsPressed("01") = 1 And $Count < 2) $Count += 1 Sleep(500) WEnd If $Count=2 Then Send ("^c") Call ("_Start") EndIf _Start() EndFunc Link to comment Share on other sites More sharing options...
smartee Posted April 8, 2011 Share Posted April 8, 2011 Probably you can use rather than trying to catch mouse events by looping. Link to comment Share on other sites More sharing options...
wakillon Posted April 9, 2011 Share Posted April 9, 2011 What's the utility of your script ? You should use _Start () instead of call ("_Start") AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
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