Jump to content

Silly one


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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.

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...