Tarakesh

MoveMouse to the windows Tabbed Position

4 posts in this topic

Hi,

First of all I would like say infinite thanks to the team involved in designing this great tool.

Here is my problem

1. Press windows button

2. ESC

3. TAB

4. It will take me to the first pinned icon in the taskbar

5. If I I do SHIFT F10 which usually opens context menu like  right click of the mouse.

6. For one of the application I am using it does not support  Shift + F10 context menu rather it listens to only mouse right click event.

7. I do a search in a tree view of my application and the search item is selected or focused

8. For eg

     User1

     User2

     User3
Now if I search for User1 the tab or focus move to User 1 (Red)

     User1

     User2

     User3

If I search for User3 the tab or focus moves to User 3

Now my question is how can I move the mouse automatically go to the focused item on the window. Such that during automation I can issue MoveClick("{RIGHT}") as {SHIFT F10} is not working from the keyboard. It is a java app, unfortunately it is not honoring the right click events from keyboard to open the context

WinMinimizeAll();
Send("^{ESC}")
Sleep(200)
Send("{ESC}")
Send("{TAB}")

the above scripts take the tab to the first pinned icon in the taskbar. Now i want
MouseMove( "move to tab" selection")

Regards,
Tarakesh

Share this post


Link to post
Share on other sites



#2 ·  Posted

I can't help much with the Java app automation (no experience), but I do have a couple of comments to offer.

Instead of sending keystrokes to automate launching the pinned app, it may be more reliable and efficient to simply launch the application.
Look up the Run and ShellExecute functions.

For the right click issue, have you tried using the Menu or App key [Send({APPSKEY})] to see if it produces the proper behavior?  I know Shift+F10 usually does the same thing, but I have seen inconsistencies between some applications.  Might be worth trying, but probably no as robust as other methods to automate Java apps/controls.

Share this post


Link to post
Share on other sites

#3 ·  Posted

I think my example is wrong.

Let me explain in another way. I have already an application open. There is a list of users displaying on the left side panel with a search box above that list.

SearchBox

User1

User2

User3

UserP

UserZ

In the search box using keyboard  tab navigation I can take the cursor into the searchbox and type User2. After search if User2 is found instead of hiding other users and displaying only this, it automatically moves tab or the focus or cursor to the User 3 and highlighted with some color.

If I Shift F10 it should shiw some extra context menu items where I can do ALT D to delete that user.

Unfortunately to simulate right click usng shift f10 is not working rather MouseClick right. But to do that mouse click i should get the position the current tab or cursuor or focus and then move the mouse to that position and do MouseRight click.

Here the position of the highlighted item after search in the list. If hightlight always goes to at particualar coordinates then no problem. But if i search for UserP or UserZ the highlight goes else where where I miss those coordinates

These Old java GWT apps some times do not support context menu using keynavigation like shift f10.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

you could probably use wingetpos, wingetclientsize, PixelSearch then finally ControlClick if the highlighted user is visible

a part from that you can check the autoit window tool to see if there are any handles you can work with

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

  • Similar Content

    • Tarakesh
      By Tarakesh
      I have a situation where the desktop is designed in java swings. The nodes JTree is not allowing me to do checkbox selection using "spacebar". I am able to navigate through the nodes using up, down arrow and a tab. When I reach to the desire node selection, mouse left click is not working due a flaw a JTree core. However since it is selected, if mouse cursor auto moved to the position of the selection and send a "click"  then it should be solved. Any ideas much appreciated. 
      the problem with having fixed coordinates are the main windows is divided to 2panels where right panel containing this JTree can be expanded or shrink-ed.

    • myspacee
      By myspacee
      Hello,
      need help to remap '<' button and SHIFT+'<'
      I made a little editor that allows to my users to write using proprietary codes.
      In production we have 2 keys/symbols that i want to 'emulate'. So, when is press on my keyboard :
      < = « SHIFT+< = » Try to use help example _IsPressed :
       
      #include <Misc.au3> #include <MsgBoxConstants.au3> Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("10", $hDLL) Then ConsoleWrite("_IsPressed - Shift Key was pressed." & @CRLF) ; Wait until key is released. While _IsPressed("10", $hDLL) Sleep(250) WEnd ConsoleWrite("_IsPressed - Shift Key was released." & @CRLF) ElseIf _IsPressed("1B", $hDLL) Then MsgBox($MB_SYSTEMMODAL, "_IsPressed", "Close the application.") ExitLoop EndIf Sleep(250) WEnd DllClose($hDLL) but how manage keys combination ?
      thank you for any help,
      m.
    • Skeletor
      By Skeletor
      Hi Developers,
       
      While trying to find a way to actually style/skin the GUICtrlCreateTabItem, I read the help file and stated:
      My question to you guys is will this be updated? or am I hoping for something that will never come to pass?
      I've seen scripts between 2007 to 2009 allowing the tabs to be modified
      Reason for my question is I'm trying to make my GUI Tabs look more modern.
      Thanks in advance for reading my post.
       
    • jannikrendl
      By jannikrendl
      Hey,
      so I was trying to create a script which clicks an option of a dropdown menu but can't find a solution to move the mouse from the current position 50 units down...
      If someone knows how to do this pls help me
      [EDIT: MBY the solution is to just use MouseGetPos and then use MouseMove(MouseGetPos[0],MouseGetPos[1]+50)? but idk... mby there is a better solution...
      Global $aPos = MouseGetPos Sleep(10000) MouseMove($aPos[0],$aPos[1]+50,10) ] Edit 2: NOPE Isn't working...
      Thanks in advance
      Jannik
    • antonioj84
      By antonioj84
      #include <GUIConstantsEx.au3> #include "GUIExtender.au3" $hGUI = GUICreate("Move Example", 250, 230) GUICtrlCreateGroup(" Choose Orientation ", 10, 10, 230, 80) $cRadio_Horz = GUICtrlCreateRadio(" Horizontal ", 20, 30, 100, 20) GUICtrlSetState(-1, $GUI_CHECKED) $cRadio_Vert = GUICtrlCreateRadio(" Vertical ", 20, 60, 100, 20) GUICtrlCreateGroup(" Choose Move Style ", 10, 100, 230, 110) $cRadio_0 = GUICtrlCreateRadio(" Fix Left ", 20, 120, 100, 20) $cRadio_1 = GUICtrlCreateRadio(" Fix Centre ", 20, 150, 100, 20) $cRadio_2 = GUICtrlCreateRadio(" Fix Right ", 20, 180, 100, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cRadio_Horz GUICtrlSetData($cRadio_0, " Fix Left ") GUICtrlSetState($cRadio_0, $GUI_UNCHECKED) GUICtrlSetState($cRadio_1, $GUI_UNCHECKED) GUICtrlSetData($cRadio_2, " Fix Right ") GUICtrlSetState($cRadio_2, $GUI_UNCHECKED) Case $cRadio_Vert GUICtrlSetData($cRadio_0, " Fix Top ") GUICtrlSetState($cRadio_0, $GUI_UNCHECKED) GUICtrlSetState($cRadio_1, $GUI_UNCHECKED) GUICtrlSetData($cRadio_2, " Fix Bottom ") GUICtrlSetState($cRadio_2, $GUI_UNCHECKED) Case $cRadio_0 _Create_GUI(0) Case $cRadio_1 _Create_GUI(1) Case $cRadio_2 _Create_GUI(2) EndSwitch WEnd Func _Create_GUI($iMove) Local $sTitle Switch $iMove Case 0 If GUICtrlRead($cRadio_Horz) = 1 Then $sTitle = "Fixed Left" Else $sTitle = "Fixed Top" EndIf Case 1 $sTitle = "Fixed Centre" Case 2 If GUICtrlRead($cRadio_Horz) = 1 Then $sTitle = "Fixed Right" Else $sTitle = "Fixed Bottom" EndIf EndSwitch GUISetState(@SW_HIDE, $hGUI) $hGUI_Ex = GUICreate($sTitle, 500, 500) If GUICtrlRead($cRadio_Horz) = 1 Then _GUIExtender_Init($hGUI_Ex, 1, $iMove) _GUIExtender_Section_Create($hGUI_Ex, 0, 250) _GUIExtender_Section_Activate($hGUI_Ex, 2, "", "", 220, 10, 20, 20) _GUIExtender_Section_Create($hGUI_Ex, 250, 250) GUICtrlCreateLabel("", 250, 0, 250, 500) GUICtrlSetBkColor(-1, 0xFFCCCC) _GUIExtender_Section_Create($hGUI_Ex, -99) Else _GUIExtender_Init($hGUI_Ex, 0, $iMove) _GUIExtender_Section_Create($hGUI_Ex, 250, 0) _GUIExtender_Section_Activate($hGUI_Ex, 2, "", "", 470, 220, 20, 20) _GUIExtender_Section_Create($hGUI_Ex, 250, 250) GUICtrlCreateLabel("", 0, 250, 500, 250) GUICtrlSetBkColor(-1, 0xFFCCCC) _GUIExtender_Section_Create($hGUI_Ex, -99) EndIf _GUIExtender_Section_Action($hGUI_Ex, 2, False) GUISetState() While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_SHOW, $hGUI) GUIDelete($hGUI_Ex) _GUIExtender_Clear($hGUI_Ex) ExitLoop EndSwitch _GUIExtender_EventMonitor($aMsg[1], $aMsg[0]) ; Check for click on Action control WEnd EndFunc I am trying to implement 2 side window toggle hide and show with 2 different menu.  can someone give me some direction  thanks