Jump to content

Click on a changing menu


Recommended Posts

Hi,

I am trying to do a script to auto start the preview of OBS studio  ( https://obsproject.com/ ).

Here my current script :

#include <GuiToolBar.au3>
StartOBS()

Func StartOBS()
   ; Run Obs
   FileChangeDir ("C:\Program Files (x86)\obs-studio\bin\64bit")
   Run("C:\Program Files (x86)\obs-studio\bin\64bit\obs64.exe")
   Local $hWnd = WinWait("[CLASS:Qt5QWindowIcon]", "", 10)
   WinSetState($hWnd, "", @SW_MAXIMIZE )
   ; Sleep(2000)
   ControlClick($hWnd, "", "[CLASS:Qt5QWindowIcon; INSTANCE:8]", "right")

   ; MouseClick("Right" , $WinLoc[0]+($WinLoc[2]/2), $WinLoc[1]+($WinLoc[3]/2))
   Send("{DOWN}")
   Send("{DOWN}")
   Send("{RIGHT}")

EndFunc   ;

Here my problem : after the right click, there is a menu :

2016-06-16_233206.png

This menu show my 3 displays.

Displays order is completely RANDOM.

What i want to choose is the display with the resolution 1280x720.

The window info tool gives me nothing, just Class : Qt5QWindowPopupDropShadowSaveBits

How can i choose the display 1280x720 and send the enter command please ?

Like i said, the order is random each time, so i have to read the text of each sub menu popup and find the one that have 1280x720 and click on it.

Shearching for hours since 2 days but nothing work (WinMenuSelectItem, ControlGetHandle...)

 

Thank you

Link to comment
Share on other sites

16 hours ago, pranaynanda said:

Welcome to the AutoIt forum.

Can't the window info tool read any text or something?

Hi,

Nop, they is no any information :/

14 hours ago, AutoBert said:

Maybe

is able to solve your problem.

 

I will try (and try to understand, i am a noob on AutoIt)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...