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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...