• Re: twapi send_keys LWIN not working

    From The Rickster@21:1/5 to The Rickster on Fri Aug 25 17:40:05 2023
    On Friday, August 25, 2023 at 5:24:43 PM UTC-7, The Rickster wrote:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick
    Apologies, the 'H' should be lower case...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to The Rickster on Fri Aug 25 17:32:29 2023
    On Friday, August 25, 2023 at 5:24:43 PM UTC-7, The Rickster wrote:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick
    Update:
    Changed code to the following, which I believe is correct.
    after 5000 {twapi::send_keys "{LWIN}+H"}

    However, the ui does not appear. Instead it invokes the windows ui that occures when the window icon on the task bar is selected.
    Rick

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to All on Fri Aug 25 17:24:40 2023
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to The Rickster on Fri Aug 25 17:37:49 2023
    On Friday, August 25, 2023 at 5:24:43 PM UTC-7, The Rickster wrote:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick
    and, lastly,
    after 5000 {twapi::send_keys "{LWIN}H"}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to The Rickster on Fri Aug 25 21:12:05 2023
    On Friday, August 25, 2023 at 5:24:43 PM UTC-7, The Rickster wrote:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick
    Correction! Depression of the left windows key (LWIN) and the 'h' key.

    My understanding of the docs specifies the use of the + after a braced escape sequence in the release of both after the 'h' is sent.

    after 5000 {twapi::send_keys {{LWIN}+h}

    The result is still the same - the start menu opens and 'H' appears in the entry box. It seems as if the 'h' is being ignored.

    Please advise on how the voice type ui can be opened with twapi.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From greg@21:1/5 to The Rickster on Sat Aug 26 00:28:44 2023
    The Rickster schrieb am Samstag, 26. August 2023 um 02:24:43 UTC+2:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick
    from https://wiki.tcl-lang.org/page/MS+Windows%3A+assistive+technology%2C+code+signing%2C+send+keystrokes+to+other+applications+and+Windows+login+password+field#7f682fe6c2c515786183fd9907b9c64012ff3017d02d76f24f8071bec44e2ad5

    and
    https://learn.microsoft.com/de-de/windows/win32/inputdev/virtual-key-codes

    # VK_LWIN 0x5B
    # 0x48 H
    twapi::send_input {"keydown 0x5B 0" "key 0x48 0" "keyup 0x5B 0"}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From greg@21:1/5 to The Rickster on Sat Aug 26 06:18:36 2023
    The Rickster schrieb am Samstag, 26. August 2023 um 02:24:43 UTC+2:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document. However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick

    from
    twapi source code input.tcl
    ...
    SHIFT {0x10 0}
    CONTROL {0x11 0}
    ALT {0x12 0}
    ENTER {0x0D 0}

    proc twapi::_parse_send_keys {keys}
    array set modifier_vk {+ 0x10 ^ 0x11 % 0x12}

    {ENTER] as default

    ...

    As far as I understand the code, there are only these 4 modifiers for pressed keys.


    That's why the LWIN Key + H doesn't work

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to greg on Sat Aug 26 14:07:07 2023
    On Saturday, August 26, 2023 at 12:28:48 AM UTC-7, greg wrote:
    The Rickster schrieb am Samstag, 26. August 2023 um 02:24:43 UTC+2:
    The manual depression of the Windows key + H results in the appearance of the ms voice type ui. This does not occur when using tkcon as follows:

    after 5000 {twapi::send_keys [list {LWIN} H]}

    Waiting 5 seconds allows for the placement of the cursor in a .txt document.
    However, the only (apparent) result is the presentation of "LWIN H" in the text document.

    Please advise as to how to achieve the intended result - the appearance of the voice type ui.
    Rick
    from https://wiki.tcl-lang.org/page/MS+Windows%3A+assistive+technology%2C+code+signing%2C+send+keystrokes+to+other+applications+and+Windows+login+password+field#7f682fe6c2c515786183fd9907b9c64012ff3017d02d76f24f8071bec44e2ad5

    and https://learn.microsoft.com/de-de/windows/win32/inputdev/virtual-key-codes

    # VK_LWIN 0x5B
    # 0x48 H
    twapi::send_input {"keydown 0x5B 0" "key 0x48 0" "keyup 0x5B 0"}
    Greg, thanks so much..I looked as send_input but didn't get the 0 part of the syntax. Seemed the key code vs scan code part confused me. Again, thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)