Jump to content
Sign in to follow this  

Best way to execute this

Recommended Posts


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)

Func _Clicked()
    While(_IsPressed("01") = 1 And $Count < 2)
        $Count += 1
        If $Count=2 Then
            Send ("^c")
            Call ("_Start")

Share this post

Link to post
Share on other sites

Probably you can use rather than trying to catch mouse events by looping.

Share this post

Link to post
Share on other sites

What's the utility of your script ? Posted Image

You should use _Start () instead of call ("_Start")

AutoIt X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.