Sign in to follow this  
Followers 0
saltytaco

Copy And Paste

5 posts in this topic

Hi, I am trying to build a program that will copy and paste. I want it to use SHIFT+arrowkey to highlight. Basically SHIFT+downarrow to highlight he whole document, then CTRL+X. Then have it ALT+TAB to the next program and CTRL+V to paste. Once I get this basic concept down I will alter it to suite my needs more, but I am really stuck on getting to this point.

Thank you

Share this post


Link to post
Share on other sites



Okay great, CTRL+A would work nice, heh I never knew of that :/. How do I make it so that AutoIt will do that command? would it be Send ('CTRL+A');? I'm sorry but I am trying to learn alot of this now, and not sure if I'm doing it right.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Ok, this should start you off on the right foot.

I put it in a function to let you learn these wonderful time savers.

hotkeyset("{pause}","dosomething"); pause key starts it like a hot key
While 1
    sleep(10)
Wend
    
Func DoSomething()
    send("^a") ; ^ is control so ^a is ctrl+a
    send("^x")
    send("!{tab}"); ! is ALT, so !{tab} is Alt+Tab key
    send("^v")
EndFunc

or if you really wanted to use down arrow select

hotkeyset("{pause}","dosomething")
While 1
    sleep(10)
Wend
    
Func DoSomething()
    send("{shiftDOWN}")
Send("{down 50}")
    send("{shiftUP}")
    send("^x")
    send("!{tab}")
    send("^v")
exit; if you want it to end after one test, if not, remove this line
EndFunc
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

the whole thing could be put in one line, but I thought you might like it broken down into smaller bites.

send("^a^x!{tab}^v")

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Oh wow, thank you so much, I am going to use this and run with it. If I have nay more questions I will let you know. Thanks!

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