Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

twapi can't right click the taskbar in win 10

64 views
Skip to first unread message

two...@gmail.com

unread,
Aug 7, 2018, 4:17:29 PM8/7/18
to
I can't get twapi to right click the taskbar to bring up the menu. I need to automate this when windows screws up the taskbar color, which it does frequently.


I've got this far,

package require twapi
proc wait .... just does a delay
wait 500
twapi::move_mouse 1222 1063 ;# this works
wait 1200
twapi::click_mouse_button left ;# tried this first but it doesn't help any
wait 1200
twapi::click_mouse_button right ;# does nothing


At this point the menu should come up but doesn't.

two...@gmail.com

unread,
Aug 7, 2018, 4:34:20 PM8/7/18
to
On Tuesday, August 7, 2018 at 1:17:29 PM UTC-7, two...@gmail.com wrote:


I found an alternate way to do it, but can't figure out how in twapi to send the windows key+i

There's a way to hold down shift, alt, and control, before sending a key, but I can't figure out how to use the windows key as a modifier to be held down, then send the i, then windows key up

Ashok

unread,
Aug 9, 2018, 12:48:07 AM8/9/18
to
The following works for me on Windows 10, Tcl 8.6.8, Twapi 4.3.5

move_mouse 1418 1054 ; click_mouse_button right

The following also works

% move_mouse 1418 1054
% send_input {{mouse 0 0 -rdown -relative} {mouse 0 0 -rup -relative}}

So not sure why it does not work on your system.

/Ashok

two...@gmail.com

unread,
Aug 9, 2018, 12:34:54 PM8/9/18
to
On Wednesday, August 8, 2018 at 9:48:07 PM UTC-7, Ashok wrote:
> The following works for me on Windows 10, Tcl 8.6.8, Twapi 4.3.5
>
> move_mouse 1418 1054 ; click_mouse_button right
>
> The following also works
>
> % move_mouse 1418 1054
> % send_input {{mouse 0 0 -rdown -relative} {mouse 0 0 -rup -relative}}
>
> So not sure why it does not work on your system.
>
> /Ashok


I don't know why it didn't work either, copy/pasting your code into a console window worked just now.

At any rate, I found a shorter way to get the taskbar settings windows up in one step:

exec cmd /c start ms-settings: &

Thanks

0 new messages