ekiben
(Lurker)
2005-12-06 01:41 AM
sendkeys help


I'm trying to get KiXtart to maximize windows by sending an F11 keypress, but the applications I target keep bringing up help menus, as if I'd pressed F1. Am I doing something wrong or is this a bug? Here's the code I'm using:

Code:


setfocus ("MSN.com - Microsoft Internet Explorer")
sendkeys ("{F11}")




Thanks in advance.


ShawnAdministrator
(KiX Supporter)
2005-12-06 02:02 AM
Re: sendkeys help

idk - unless anyone disagrees, this seems like a bug to me. this might be a work-around in the short-term though (assuming english menus here):

sendkeys("~ x")

can someone else confirm this as a bug (or get it working) ?


Les
(KiX Master)
2005-12-06 02:35 AM
Re: sendkeys help

I don't get F1 help but I don't get F11 fullscreen either. I think it is an IE thing, not KiX.

SendKeys() is a kludgy way to do it anyway. Should use COM instead.


ShawnAdministrator
(KiX Supporter)
2005-12-06 02:45 AM
Re: sendkeys help

ja, i thought it might be just an IE thing too - so I tried it using Firefox (F11 maximizes there too), same thing is occuring. I know that F5 works to notepad (insert datetime) - thinking maybe its just an F11 thing, where Kixtart is maybe truncating that last "1"

Les
(KiX Master)
2005-12-06 02:55 AM
Re: sendkeys help

Ja, well... must confess, I did not do a good test.

Like I said, I did not get help cuz my test code was flawed.

Here is proper test code and it is spawning help now.
Code:
Break on
Run 'cmd /c start www.kixtart.org'
while SetFocus('KiXtart')<>0
"."
sleep 1
$Index = $Index + 1
if $index > 20
$RC = MessageBox("NOTICE!" + Chr(13) + "Korg did not open within a reasonable time!"
+ Chr(13),"SendKeys example",48,60)
goto finish
endif
Loop

$RC=Sendkeys('{F11}')



ShawnAdministrator
(KiX Supporter)
2005-12-06 02:59 AM
Re: sendkeys help

Are saying this used to work at one time ? Any clue which version got broke ?

Les
(KiX Master)
2005-12-06 03:04 AM
Re: sendkeys help

Nope. No such claim.

Les
(KiX Master)
2005-12-06 03:09 AM
Re: sendkeys help

Not sure about your [Alt][space][x] workaround. Does nothing for me.
Sendkeys('~VF') works.


LonkeroAdministrator
(KiX Master Guru)
2005-12-06 03:24 AM
Re: sendkeys help

I vote for bug.
anyone care testing on older kixtart version.
say 4.20?


ShawnAdministrator
(KiX Supporter)
2005-12-06 03:30 AM
Re: sendkeys help

idk man, went all the way back to 3.63 - same thing. Are we missing something obvious here ? Is there something "special" about F11 ?

LonkeroAdministrator
(KiX Master Guru)
2005-12-06 03:32 AM
Re: sendkeys help

nope.

nothing more special than that it's larger than 9, but so is 10 and 11 as well.


Les
(KiX Master)
2005-12-06 03:56 AM
Re: sendkeys help

Well, F10 gives the same result as F1 so there may be something to Shawn's theory about truncating.

LonkeroAdministrator
(KiX Master Guru)
2005-12-06 04:00 AM
Re: sendkeys help

that's what I think too.
does F12 and F10 result in help popping up too?


ShawnAdministrator
(KiX Supporter)
2005-12-06 04:18 AM
Re: sendkeys help

ok - hitting F12 manually in Microsoft Word brings up the SAVE AS dialog - using sendkeys in Kixtart - F12 brings up the Help (like hitting F1 would).

NTDOCAdministrator
(KiX Master)
2005-12-06 04:59 AM
Re: sendkeys help

Well can't find anything on the Web to back it up, but I thought the F10,F11,F12 originally on the 101 keyboard were new and had limited support. Not that this is or would be an issue with KiXtart on todays computers.

What about AutoIt, has anyone tried it with that program to see how it functions?
 


ShawnAdministrator
(KiX Supporter)
2005-12-06 05:04 AM
Re: sendkeys help

I think your right Ron ... think there's something funky about those keys especially.

LonkeroAdministrator
(KiX Master Guru)
2005-12-06 05:15 AM
Re: sendkeys help

I place my bet on the truncate part.

Les
(KiX Master)
2005-12-06 05:17 AM
Re: sendkeys help

Well, F11 and F12 may have been new to the 101 key AT-style kbd, but AFAIK, the 83 key XT-style kbd had a F10 key.


NTDOCAdministrator
(KiX Master)
2005-12-06 06:27 AM
Re: sendkeys help

Not sure why but would have to agree that TRUNCATE or just plain NOT SUPPORTED is the issue. Sending F4 works, or sending ALT-O with the F11 which in reality brings up help as though F1 were pushed - Enables the Option's menu of the help file.

Richard H.Administrator
(KiX Supporter)
2005-12-06 09:52 AM
Re: sendkeys help

Test script (run in a DOS session):
Code:
Break ON
Dim $,$i,$sKey
$=SendKeys("{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{F13}{F14}{F15}{F16}Q")
While $sKey<>"Q"
Get $sKey
If Not $sKey $i=$i+1 "Function key F"+$i+" generated: "+@ERROR+@CRLF EndIf
Loop



Produces:
Quote:

Function key F1 generated: 59
Function key F2 generated: 60
Function key F3 generated: 61
Function key F4 generated: 62
Function key F5 generated: 63
Function key F6 generated: 64
Function key F7 generated: 65
Function key F8 generated: 66
Function key F9 generated: 67
Function key F10 generated: 59
Function key F11 generated: 59
Function key F12 generated: 59
Function key F13 generated: 59
Function key F14 generated: 59
Function key F15 generated: 59
Function key F16 generated: 59




Ruud van Velsen
(Hey THIS is FUN)
2005-12-27 04:45 PM
Re: sendkeys help

In short: yes, you have found a bug in SendKeys() here. F10 and up are all incorrectly recognized as F1...

I will fix this in the next build of 4.52.

Thanks for the report!

Ruud


ekiben
(Lurker)
2006-01-29 01:57 PM
Re: sendkeys help

The special character handling for sendkeys now seems to be completely broken with 4.52 beta 2. This code:

Code:
run "c:\windows\notepad.exe"
sleep 1
setfocus ("Untitled - Notepad")
sendkeys ("F1 {F1}; ")
sendkeys ("F2 {F2}; ")
sendkeys ("F3 {F3}; ")
sendkeys ("F4 {F4}; ")
sendkeys ("F5 {F5}; ")
sendkeys ("F6 {F6}; ")
sendkeys ("F7 {F7}; ")
sendkeys ("F8 {F8}; ")
sendkeys ("F9 {F9}; ")
sendkeys ("F10 {F10}; ")
sendkeys ("F11 {F11}; ")
sendkeys ("F12 {F12}; ")
sendkeys ("enter {enter}")



Yeilds this result in notepad:

F1 F; F2 F; F3 F; F4 F; F5 F; F6 F; F7 F; F8 F; F9 F; F10 F; F11 F; F12 F; enter e


Les
(KiX Master)
2006-01-29 03:43 PM
Re: sendkeys help

While I concur that those results are valid, that code should not work as you might expect. Had the [F1] key worked as advertised, the remaining keys would have been sent to the Help screen, not the editor workspace.

Les
(KiX Master)
2006-01-29 03:48 PM
Re: sendkeys help

I would have expected Richard's code to yeild plausible results but it now returns nothing.