PDA

View Full Version : sendkeys question



cpdlink
May 31st, 2006, 12:43 PM
hi,

it probably sounds very silly, but i don't know how to send "ctrl+alt+g" to a window using:
gir.SendKeys(win.FindWindow([classname],[title]), [keycodes])

i am able to send "g" or any other character or any special key "<F1>", "123<ENTER>" etc and it's working, but none of the following works:
"*@g"
"*" .."@".."g"
"*@G"
"@*g"
"@*G"
"<CTRL_DOWN><ALT_DOWN>g"
"<CTRL_DOWN><ALT_DOWN>G"

i did try sending only one special character at a time, "alt+p" to notepad (edit) - you know, to popup the print dialog but still nothing. the status bar said keys sent succcesfuly but ...

same goes for the keyboard action...

i don't know what to try anymore...

any idea would be greatly appreciated
thanks!
chris.

blubberhoofd
June 4th, 2006, 12:44 PM
Hi,

does the program that has to receive the keys discriminate between left-alt and right-alt for example?

if that's the case the modifier "@" never worked for me

a workaround could be to change the hotkeys if possible

However, my advice would be to try a different method for controlling the application, methods like sendmessage (command capture) have proven to be more reliable.

hope this helps ;)