Jump to content

Recommended Posts

Posted (edited)

Hi,

i am trying to send a key to a minimized window using controlsend, i can send all keys but {RIGHT down}...

ControlSend("My Window", '', '', "{RIGHT DOWN}")

is there a workaround or other method i could use ?

Also i have noticed that while it is sending keys it mess up if i use the keyboard in some cases ....

Edited by namedrisk
Posted

Will this work?

Hi,

i am trying to send a key to a minimized window using controlsend, i can send all keys but {RIGHT down}...

ControlSend("My Window", '', '', "{RIGHT}",0)
ControlSend("My Window", '', '', "{DOWN}",0)

is there a workaround or other method i could use ?

Also i have noticed that while it is sending keys it mess up if i use the keyboard in some cases ....

Posted (edited)

Will this work?

inst default 0 and raw 1?

trying

yes it does not work as i tough it sends any key fine but RIGHT KEY DOWN

Edited by namedrisk
Posted (edited)

Can you send them separate? With two different controlsend lines, like I had?

like i said on the update it does not work i tried it the way you asked me to, but thanks a lot man ... every key works just fine but keys i send as DOWN or UP when the window is minimized

Edited by namedrisk
Posted

Try ControlSend("My Window", '', '', "{RIGHT} {DOWN}"). I assume you are trying to hold the right arrow key down for some reason.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted

Try ControlSend("My Window", '', '', "{RIGHT} {DOWN}"). I assume you are trying to hold the right arrow key down for some reason.

Thanks man i will try it out but from my understanding it will send both, the RIGHT key and the DOWN key and will not work as i want but i will try it right now... and update this topic

Posted

Not sure what you are trying to do, what keys are you trying to simulate?

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted

im just trying to send RIGHT DOWN for 500 miliseconds then RIGHT UP to a game window... but it does not work, i mean all keys works but if i want it to be {KEY down} or {KEY up} it will not work

Posted

You could try Opt("SendKeyDownDelay", 500). Only thing is, it also makes other key presses last 500ms.

thx will try that out, i mean i could make it before and change it after so it would not affect the others keys...

will post back a feed back thanks

Posted (edited)

try

Send("{down 500}")

send down arrow keystroke x 500...

I wonder why Send("{down down}") is not working... In the help file it states that:

To hold a key down (generally only useful for games)

Send("{a down}") ;Holds the A key down

Send("{a up}") ;Releases the A key

but if you run Send("{a down}"), "a" key will be pressed(and released) just once... just like Send("a").. why? a bug?

Edited by Mison

Hi ;)

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
  • Recently Browsing   0 members

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