Sign in to follow this  
Followers 0
Sl4yer

problem with GUIGetMsg

4 posts in this topic

why doesn't GUIGetMsg return anything?? i don't get it ??

my code is the following:

msgbox(0, "", WinGetState ("wnd title"))
_ArrayDisplay(GUIGetMsg(1))

the results are these:

Posted Image

Posted Image

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

What are you truing to do?

$state = WinGetState ("wnd title")
msgbox(0, "", $state)
hi Zedna,

i'm within a function and i created a new window which i want to closed when clicked on the x button on the right top corner but the window doesn't return the $GUI_EVENT_CLOSE

Edited by Sl4yer

Share this post


Link to post
Share on other sites

Your code:

;msgbox(0, "", WinGetState ("Suchergebnis"))
                       ;_ArrayDisplay(GUIGetMsg(1))

                                                While GUIGetMsg(1) <> $GUI_EVENT_CLOSE
                            local $getCurSelection = _GUICtrlListViewGetCurSel($reslistView)
                                                        If _GUICtrlListViewGetCurSel($reslistView) = 1 Then
                                $curSelectedItemText = _GUICtrlListViewGetItemText($reslistView, _GUICtrlListViewGetSelectedIndices($reslistView), 1)
                                RunWait(@ComSpec & ' /c explorer "' & $curSelectedItemText & '\"', "", @SW_HIDE)
                                _GUICtrlListViewSetItemSelState ($reslistView, _GUICtrlListViewGetSelectedIndices($reslistView), 0, 0)
                            EndIf
                        WEnd

Correct code:

;msgbox(0, "", WinGetState ("Suchergebnis"))
                       ;_ArrayDisplay(GUIGetMsg(1))

                                                While 1
  $msg2 = GUIGetMsg(1)
  if $msg2[0] = $GUI_EVENT_CLOSE     And $msg2[1] = $resWnd Then
    GuiDelete($resWnd)
    ExitLoop
End If

                            local $getCurSelection = _GUICtrlListViewGetCurSel($reslistView)
                                                        If _GUICtrlListViewGetCurSel($reslistView) = 1 Then
                                $curSelectedItemText = _GUICtrlListViewGetItemText($reslistView, _GUICtrlListViewGetSelectedIndices($reslistView), 1)
                                RunWait(@ComSpec & ' /c explorer "' & $curSelectedItemText & '\"', "", @SW_HIDE)
                                _GUICtrlListViewSetItemSelState ($reslistView, _GUICtrlListViewGetSelectedIndices($reslistView), 0, 0)
                            EndIf
                        WEnd

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
Sign in to follow this  
Followers 0