Jump to content
Sign in to follow this  
Kash

Simulating Key Ctrl C & Ctrl V

Recommended Posts

Kash

Hello,

Can someone tell me how to send copy and paste command to a AutoIt program?

e.g.

send("{ctrl}{V} ")?

Thank you...

Share this post


Link to post
Share on other sites
BrettF
Kash

I am actually simulating screen print button on key board. I am trying to to screen print and then paste it to a word documenet. So normally as a human being

we press print scrreen and then go to work document and press control V to paste that screen print in to document

$oWordApp = _WordCreate ( @ScriptDir & @UserName & "_" & $str_DateTime & ".doc","",0,0)

;$oDoc = _WordDocGetCollection ($oWordApp, 0)

Sleep(3000)

Send("{PRINTSCREEN}")

Send("{ctrl V}")

Share this post


Link to post
Share on other sites
BrettF

Share this post


Link to post
Share on other sites
Kash

So does that mean there is no direct way of simulating key <<ctrl>><<v>>?

Share this post


Link to post
Share on other sites
ProgAndy

"^c" and "^v" should do the trick ^_^


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
pauleffect

actually, no. ^c won't do the trick. for example, in photoshop, if you try it on a layer(a tiny slice), it returns, upon paste, a copy of a "flattened image" (the whole canvas).

Will paste solution here for further googlers (as myself) even though this is dead.

EDIT: Please be mindful of the clearly stated fact that CTRL + c  <>  CTRL + C .

So, don't be idiots (like me) and use uppercase... :headbang:

Edited by pauleffect

Share this post


Link to post
Share on other sites
JuanFelipe

Encontre la solucion, va y copia archivos de Excel y los pega en el espacio que digo... :thumbsup:

I found the solution, and will copy files from Excel and paste them in the space I want ...

 

Send("{CTRLDOWN}c{CTRLUP}")

Send("{CTRLDOWN}v{CTRLUP}")

 

:bye:

  • Like 2

Share this post


Link to post
Share on other sites
cls_1231
El 5/5/2009 a las 0:56 PM, ProgAndy dijo:

"^ C" y "^" hacer el truco ^_^

Gracias

Edited by cls_1231

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.