Sign in to follow this  
Followers 0
Destiner

Silly one

11 posts in this topic

#1 ·  Posted (edited)

Hi guys. I am new here and I am new in AutoIt. I did learned quietly all that I need from autoscript.com and it was OK. But now I have a problem with key press simulation. So if I want you Ctrl+Alt+R I write 

Send("^!{R}") but it's just type R in currently active textbox. Or if I want to paste from clipboard I write Send("!{v}") but it's just type V in currently active textbox.

Edited by Destiner

Share this post


Link to post
Share on other sites



Hi, Destiner, welcome to the forum. What application are you trying to send the keys to? Usually there is a much easier way to do what you're trying to accomplish, like with ControlSend.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

JLogan3o13, at least I try to paste text from clipboard by using Send("^v"). I didn't know about ControlSend() and now it's do not works for me. I wrote

ControlSend ("Notepad", "Untitled - Notepad", 15(id? which id? got 15 from window info on 2nd tab), "^{v}"), and nothing happened in notepad window. Send() typed letter at least =(

Jos, I did both. Same result.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You really need to crack open the help file and read through how Send works. Try this:

WinActivate("[CLASS:Notepad]", "")
    Send("1234567890")
    Send("^a") ;Ctrl + a
    Send("^c") ;Ctrl + c
    Send("{END}{ENTER}")
    Send("^v") ;CTRL + v



 

As I mentioned, if you let us know which application you're trying to automate, it will be easier to help.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

JLogan3013, dude…

It's okay when you all guys love talking about help file but it's not when I said that I already did that. I ALREADY talked about Send("^v") and I ALREADY did this and even run this script :o

And now I just copied your code into notepad, save as .au3, run script and you know what? He wrote 1234567890, then wrote LETTER a, LETTER c, LETTER v. It's strange but I already had this problem and I already discribed that in first post.

I just want to take some data from webpage by copy/paste and type it in some application.

Edited by Destiner

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Well then, Destiner, dude... How about providing some more information? What OS are you running this on? What version of AutoIt? The example I supplied works on XP 32 bit, and WIN7 both 32 and 64 bit. The fact that you're encountering a problem is why we're asking for more info.

"I just want to take some data from webpage by copy/paste and type it in some application" doesn't really describe in detail what your end goal is. Not to mention that you didn't mention until now that you're trying to pull data from a webpage and not notepad. If you had, we would have suggested the built in IE functions. You're asking us to first guess at what you're trying to do, and then troubleshoot for you. How about you help us help you ;)

Edited by JLogan3o13
1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

At first:

OS: Windows 7 Professional 32-bit

AutoIt v. 3.3.8.1

At second:

You can not understand. I programming a bit so I have a bit different method to fix problems than common users. At first I wanted write script to myself. But now when I got problems I just, JUST want to paste text in notepad from clipboard. And nothing else. Can you give me script that paste text from clipboard in notepad? Send("^v") works like Send("v").

And please, JLogan3013 or anyone else… I talked only about notepad in post 4 and 6 and I don't want questions about what script will be. I even don't need script more than just paste text to notepad.

Edited by Destiner

Share this post


Link to post
Share on other sites

Thanks, my main problem solved, now I just ask 1 question and then stop discussion.

Can I do same with Ctrl+V simulation?

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

It should work with the other code examples already given above by others. Perhaps you didn't set it up right earlier. If this doesn't work, then I don't know what's wrong.

Run ("Notepad.exe")
WinWaitActive("[CLASS:Notepad]", "")
Send("^v")
Edited by czardas

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