Jump to content
Sign in to follow this  
muzle6074

Is it possible to ControlSend Shift to 1 app?

Recommended Posts

muzle6074

Is it possible to ControlSend Shift to 1 app so that anything else running on the system is not effected?

I tried this but it failed :)

ControlSend($window, "", "", "{SHIFTDOWN}")

Share this post


Link to post
Share on other sites
SmOke_N

Is it possible to ControlSend Shift to 1 app so that anything else running on the system is not effected?

I tried this but it failed :)

ControlSend($window, "", "", "{SHIFTDOWN}")
Try sending it to the control that requires it.

ControlSend($window, "", "ControlID/ClassNameNN", "+")

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.

Share this post


Link to post
Share on other sites
muzle6074

@zackrspv

By failed, i mean it didn't work. The reason i use controlsend is because the window does not have the specify control since it's a game.

Share this post


Link to post
Share on other sites
PsaltyDS

Per the helpfile and our mod, who posted right below me, you DO need to specify a control, if you are using 'CONTROL' send :(. If you just want to send a key to a window, such as a game, just use the SEND() function after you activate it with WinActivate()

You misunderstand. ControlSend() specifically allows you to send keystrokes to a window without specifying the control so you can just send them to a specified window, which doesn't have to be active (as it would have to for Send).

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
zackrspv

You misunderstand. ControlSend() specifically allows you to send keystrokes to a window without specifying the control so you can just send them to a specified window, which doesn't have to be active (as it would have to for Send).

:)

I'm easily one to admit that i'm wrong; from the wording of the help file, and the fact that the controlID is not marked as optional, I made that assertion. I do apologize that the information i portrayed was wrong. Post deleted :(

ControlSend ( "title", "text", controlID, "string" [, flag] )

led me to believe that it was required, and

ControlSend works in a similar way to Send but it can send key strokes directly to a window/control, rather than just to the active window.

Looked like a typo :D

However, perhaps he should just use the key type, instead of name, as smoke stated:

ControlSend($window, "", "", "+")

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

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  

×