ControlGetHandle ($hWnd, "", "[REGEXPCLASS:<>; INSTANCE:<>]")

 RegExpQuickTester 2.5p  will help


  1.  put all the ClassNameNN keys here old and new
  2. here you can put your filter (Search pattern)
    an, in live time, test the pattern, and see which cases it catches, and readjust it
  3. here it shows which cases it catches
  4. here I have put '3 - Retum array of global matches'
  5.  here you can use it as a storage space (for copying and pasting)

 

Until now we use CLASSNN which is CLASS & INSTANCE
ControlClick($hWnd, "", "WindowsForms10.Window.8.app.0.1a52015_r22_ad11")
WindowsForms10.Window.8.app.0.1a52015_r22_ad11 = WindowsForms10.Window.8.app.0.1a52015_r22_ad1 & 1

now we will go to logic

ControlClick($hWnd, "", "[REGEXPCLASS:<>; INSTANCE:<>]")
where
REGEXPCLASS:<> we put the *2 Search pattern
where INSTANCE:<> we put the instance e.g. 1

ControlClick($hWnd, "", "[REGEXPCLASS:WindowsForms10\.Window\.8\.app\.0\..*._r.*._ad1 ; INSTANCE:1]")

 [REGEXPCLASS:WindowsForms10.Window.8.app.0.*_r*_ad1 ; INSTANCE:1]

 

 ; Wait 3 seconds for the ShareX - Editor menu window to appear.
Local $hWnd = WinWait("ShareX - Editor menu", "", 3)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hWnd = ' & $hWnd & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

 ; Retrieve the handle of the MenuBar control in ShareX - Editor menu"
Local $hCtrMenuBar = ControlGetHandle($hWnd, "", "[REGEXPCLASS:WindowsForms10\.Window\.8\.app\.0\..*._r.*._ad1; INSTANCE:1]")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hCtrMenuBar = ' & $hCtrMenuBar & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

ControlClick($hWnd, "", $hCtrMenuBar )

 

here I must emphasize that we behave differently in Handle controls than Handle windows

ShellExecute(@WindowsDir & '\hh.exe', 'ms-its:' _
         & StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 2, -1) - 1) & "\AutoIt.chm" _
         & '::/html/intro/controls.htm')

ShellExecute(@WindowsDir & '\hh.exe', 'ms-its:' _
         & StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 2, -1) - 1) & "\AutoIt.chm" _
         & '::/html/intro/windowsadvanced.htm')


with windows handle:

Until now we use CLASS or TITLE
WinWait("[CLASS:<>; TITLE:<>]
WinWait("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r22_ad1]

now we will go to logic
WinWait("[REGEXPCLASS :<>; REGEXPTITLE :<>]
WinWait("[REGEXPCLASS :<>; TITLE:<>]

 WindowsForms10\.Window\..*808*.\.app\.0\..*._r.*._ad1

 WinWait("[REGEXPCLASS:WindowsForms10\.Window\..*808*.\.app\.0\..*._r.*._ad1]


Comments

Popular posts from this blog

Simple Calculator