Jump to content

CLASS:ad_win#2


 Share

Recommended Posts

Try this. 

WinActivate("[CLASS:ad_win#2]")
If WinActive("[CLASS:ad_win#2]") Then MsgBox(0, "test", "Is Active.", 10)

or

If WinWaitActive("[CLASS:ad_win#2]") Then MsgBox(0, "test", "Is Active.", 10)

If this doesn't work. 

Show a screen shot of Au3info screen. 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

 

This works

Local $hWnd = WinGetHandle("[title:AnyDesk]")
$a=_WinAPI_GetClassName($hwnd)
If WinActive("[CLASS:"& $a &"]") Then MsgBox(0, "test", "Is Active.", 10)

But this is not working
 

 Local $hWnd = WinGetHandle("[title:AnyDesk]")
 $a=_WinAPI_GetClassName($hwnd)
 
IniWrite ( @ScriptDir & "\screen.ini", "Capture", "x1",$a)
$m=IniRead ( @ScriptDir & "\screen.ini", "Capture", "x1", "")
If WinActive("[CLASS:"& $m &"]") Then MsgBox(0, "test", "Is Active.", 10)

I did not solve my problem

Link to comment
Share on other sites

Just to clerify this works?

If WinActive("[REGEXPCLASS:ad_win#3]") Then MsgBox(0, "test", "Is Active.", 10)

Can you show a screen shot of the control tab when the button is selected? (Au3info screen)

Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

Probably not exactly what you need. However, this should get you on the right path at the very least. 

$Title = "AnyDesk"
$ListAnyDesk = WinList($Title)

For $i = 1 To $ListAnyDesk[0][0]
    $hwnd = $ListAnyDesk[$i][1]
    If $hwnd = WinActivate($Title) Then
        ControlClick($hwnd, "", "basic_button#91")
    EndIf
Next

 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

#include <Array.au3>
#include <WinAPIDlg.au3>
#include <MsgBoxConstants.au3>

Local $WinTitle ="[REGEXPCLASS:ad_win#3]" ;

$aInfo = _CtrlInfo($WinTitle) ; Sort Array method

WinActivate("[REGEXPCLASS:ad_win#3]")
$a=$aInfo[27][0]

$hnd="[REGEXPCLASS:ad_win#3]"
ControlEnable ($hnd, "",$a)
MsgBox($MB_TOPMOST, $aInfo[27][0], $a, 30)
_ArrayDisplay($aInfo, "ArrayDisplay", "", 0, 8, "ClassnameNN")


Func _CtrlInfo($WinTitle)
    Local $iCount = 0
   $class = StringStripWS(WinGetClassList($WinTitle, ""), 2) ;   $STR_STRIPTRAILING (2) = strip trailing white space
   $aClass = StringSplit($class, @LF, 2) ; $STR_NOCOUNT (2) = disable the return count in the first element - effectively makes the array 0-based.
   Local $aArray[UBound($aClass)][1] ; New 2D array.

     _ArraySort($aClass)
    For $i = 0 To UBound($aClass) - 1
        $iCount = (($i = 0 Or $aClass[$i] == $aClass[$i - 1]) ? $iCount + 1 : 1)
        $aArray[$i][0] = $aClass[$i] & $iCount                            ; ClassnameNN

      Next
    Return $aArray
EndFunc   ;==>_CtrlInfo

It chooses the ClassnameNN but it still doesn't work

Edited by Gavriels
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...