Jump to content

REGEXPTITLE bug report


Go to solution Solved by pixelsearch,

Recommended Posts

I could not find any specific place in the forum for bug reports,

so, I will post it here:

; Open the standard file properties for AutoIt3.exe upfront,
; it's window title is "AutoIt3.exe Properties"

#include <MsgBoxConstants.au3>
Local $hwnd

; use of REGEXPTITLE in any function receiving "title" parameter
; has following problem:

; these WORK in 3.3.16:
; $hwnd = WinGetHandle( "[TITLE:AutoIt3.exe Properties]" )
; $hwnd = WinGetHandle( "[REGEXPTITLE:utoIt3\.exe Properties]" )
; $hwnd = WinGetHandle( "[REGEXPTITLE:(?i)utoit3\.exe properties]" )

; these DOES NOT WORK in 3.3.16:
; $hwnd = WinGetHandle( "[REGEXPTITLE:AutoIt3\.exe Properties]" )
$hwnd = WinGetHandle( "[REGEXPTITLE:(?i)autoit3\.exe properties]" )

; so, REGEXPTITLE processing is 1 character off from the beginning of title
; string somewhere in the AutoIt3 code

MsgBox( $MB_SYSTEMMODAL, "", "$result: " & $hwnd )

 

Link to comment
Share on other sites

2 hours ago, Arbez said:

I could not find any specific place in the forum for bug reports, ...

It's not that hard to find  ;):

Bugtracker.jpg.816b3217987cfcc9c0cb0de3f7cf71a2.jpg   NewTicket.jpg.4d91b6b57d0ab2d04edf373582f376f7.jpg

However, the feature may not be available for "New Members" . Just give it a try.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

  • Solution

@Arbez it didn't work in 3.3.16.0, then it was fixed in versions 3.3.16.1-rc1 and 3.3.16.1-rc2

If you install the last version (3.3.16.1-rc2) then the following script won't show errors.
I tested it : errors with 3.3.16.0 , no errors with 3.3.16.1-rc1 or 3.3.16.1-rc2

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()

    Local $hWnd, $aTest[] = [ _
        "[TITLE:AutoIt3.exe Properties]", _
        "[REGEXPTITLE:utoIt3\.exe Properties]", _
        "[REGEXPTITLE:(?i)utoit3\.exe properties]", _
        "[REGEXPTITLE:AutoIt3\.exe Properties]", _
        "[REGEXPTITLE:(?i)autoit3\.exe properties]" _
        ]

    Local $hGUI = GUICreate("AutoIt3.exe Properties", 380, 200)
    Local $idButton_Test = GUICtrlCreateButton("Get Handle", 150, 70, 80, 25)
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

            Case $idButton_Test
                For $i = 0 To Ubound($aTest) - 1
                    $hWnd = WinGetHandle($aTest[$i])
                    MsgBox($MB_TOPMOST, $aTest[$i], (@error ? ("@error = " & @error) : $hWnd), 0, $hGUI)
                Next
        EndSwitch
    WEnd

    GUIDelete($hGUI)

EndFunc   ;==>Example

Good luck

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...