Jump to content
bigbossfr

Click on a changing menu

Recommended Posts

bigbossfr

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

Share this post


Link to post
Share on other sites
pranaynanda

Welcome to the AutoIt forum.

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

Edited by pranaynanda

Share this post


Link to post
Share on other sites
AutoBert

Maybe

is able to solve your problem.

Share this post


Link to post
Share on other sites
bigbossfr
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)

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.