Jump to content

How to can I write Ctrl + A in my Code


kater
 Share

Recommended Posts

Hi guys :)

Small Question ;)

How to can I use Ctrl + A And Ctrl + V And Ctrl + C

how to can I write it in my code I want to copy some texts by the sicrpt

Please your advice ;)

Edited by kater
Link to comment
Share on other sites

  • Moderators

If you have a look at the keyword "Send" in the help file index, you'll see a list of keys there right under it "Send Key List"

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I didn't understand what did you mean ? ;)

Please help me more I'm very new in this program and I do not have background in this application :)

Please Explain more to me ;)

Edited by kater
Link to comment
Share on other sites

Hi guys

Small Question

How to can I use Ctrl + A And Ctrl + V And Ctrl + C

how to can I write it in my code I want to copy some texts by the sicrpt

Well, you got to read the help file. ALL the answers are there.

To send Ctrl + A use:

Send("^a")

To send Ctrl + V use:

Send("^v")

and so on...

^=ctrl

+=shift

! = alt

The help file has examples and it's very clear.

Link to comment
Share on other sites

Hi guys :)

Small Question ;)

How to can I use Ctrl + A And Ctrl + V And Ctrl + C

how to can I write it in my code I want to copy some texts by the sicrpt

Please your advice ;)

Several people have pointed you to the help file, I wanted to point out that you might also want to look at the Control functions. Run this code:
Run("notepad")
WinWaitActive("Untitled - Notepad")
Send("This is some sample test.")
TrayTip("", "waiting to send ctrl+a", 10)
Sleep(3000)
TrayTip("", "ctrl+a has been sent", 10)
Send("^a")
Sleep(3000)
TrayTip("", "waiting to send ctrl+c", 10)
Sleep(3000)
Send("^c")
TrayTip("", "ctrl+c has been sent", 10)
Sleep(3000)
TrayTip("", "waiting to send ctrl+x", 10)
Sleep(3000)
Send("^x")
TrayTip("", "ctrl+x has been sent", 10)
Sleep(3000)

TrayTip("", "waiting to set new text via ControlSetText", 10)
Sleep(3000)
ControlSetText("Untitled - Notepad", "", "Edit1", "New text sent by ControlSetText.")
TrayTip("", "text has been set via ControlSetText", 10)
Sleep(3000)


TrayTip("", "waiting to get text from notepad via ControlGetText", 10)
Sleep(3000)
$var = ControlGetText("Untitled - Notepad", "", "Edit1")
TrayTip("", "text retrieved via ControlGetText", 10)
Sleep(3000)

MsgBox(0, "the value of $var equals", $var)
Note, when you set text via ControlSetText, you can exit Notepad without it asking you to save the info.

Late - but hope this helps...

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...