Sign in to follow this  
Followers 0
daniel02

problem with send keys ctrl+a

6 posts in this topic

#1 ·  Posted (edited)

Hi,

I have a problem sending ctrl+a keys to a program.

That is NOT working:

send ("^a")

Next example is only partial working. The "down" is working the "up" not as all programms which are minimzied can not be maximized again until pressing strg again manually.

Send("{LCTRL down}{a down}")

Sleep(1000)

Send("{LCTRL up}{a up}")

So in the last example the ctrl+a is working but not released again.

Any idea?

Thanks

Daniel

Edited by daniel02

Share this post


Link to post
Share on other sites



Hi,

what is now working:

Send("^{a}")

Cheers

Daniel

Share this post


Link to post
Share on other sites

Hi,

I am wrong. It is also not working properly. It is working if I just start this single funktion. But is it not working ALLWAYS in the whole prog. Sometimes it does.

Very strange,

Any thoughts?

Thanks

Daniel

Share this post


Link to post
Share on other sites

You should either use ControlSend, or activate the window with WinActivate() before the keys are sent. The window has to be active for the keys to be sent to that program.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Thanks for that hint but I am allready doing this :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Maybe your program is slow in recognizing key presses? Try using:

Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 50)

Stick it in the start of your script, then just do:

Send("^a")
Edited by omikron48

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  
Followers 0