Jump to content

Difference between send and controlsend?


xuzo
 Share

Recommended Posts

I want to make sure I have this right.

Send is good for let's say you want to type "Hello World" into notepad, because it mimics someone typing?

ControlSend should be used for menus, and commands like copy (Ctrl+C) and keys?:

File > Save As

What is better to copy a line of text?

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

or

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

Just making sure I understand the best Sends to use! ;)

Link to comment
Share on other sites

  • Moderators

Typically, you would always favor the control commands (including ControlSend) over Send. As Shane0000 mentions, with the Control commands you specify the window you want to interact with, making them much more stable than Send.

"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

Note that ControlSend() can be used to interact with controls that are hidden or that doesn't have focus as well. This, however, is a case by case basis, as there are some applications that require the window to be active in order to interact with the controls.

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

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