Custom Query
Results (37 - 39 of 3834)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#102 | Fixed | ControlCommand(SelectString) - wrong selection order again | Jpm | Zedna |
Description |
When there is value ABC|ABC_DEF in ComboBox then ControlCommand($gui,,$h_combo1,'SelectString','ABC') --> problem: selects ABC_DEF and not ABC As workaround I used: _GUICtrlComboBox_SelectString($h_combo2, 'ABC') --> OK: selects ABC Note: Here is link to very similar BUG which was fixed already - http://www.autoitscript.com/forum/index.php?showtopic=54738 That older bug is fixed but now in 3.2.10 version doesn't work this new testing example: both comboboxes are the same on the first one is applied ControlCommand(SelectString) on the first one is applied _GUICtrlComboBox_SelectString() as workaround #include <GUIConstants.au3> #Include <GuiComboBox.au3> $gui = GUICreate("SelectString test", 212, 212) $combo1 = GUICtrlCreateCombo('',10, 20, 100, 100) GUICtrlSetData($combo1, '|ABC|ABC_DEF', 'ABC_DEF') GUICtrlCreateLabel('Problem',130, 20, 100) $combo2 = GUICtrlCreateCombo('ABC|ABC_DEF',10, 70, 100, 100) GUICtrlSetData($combo2, '|ABC|ABC_DEF', 'ABC_DEF') GUICtrlCreateLabel('OK',130, 70, 100) GUISetState(@SW_SHOW) $h_combo1 = ControlGetHandle($gui, "", $combo1) $h_combo2 = ControlGetHandle($gui, "", $combo2) ; TEST: should select first row in ComboBox ControlCommand($gui,'',$h_combo1,'SelectString','ABC') ; problem: selects ABC_DEF _GUICtrlComboBox_SelectString($h_combo2, 'ABC') ; OK: selects ABC While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd OS: WINXP SP2 CZ |
|||
#104 | Fixed | Problem with _GUICtrlListView_RegisterSortCallBack and WM_NOTIFY | Gary | Wooltown <sven.ullstad@…> |
Description |
If you in the same script use _GUICtrlListView_RegisterSortCallBack and WM_NOTIFY just one of them will work, the latest in the code will work. In the attached example if I put _GUICtrlListView_RegisterSortCallBack first, then WM_NOTIFY will work, if I put WM_NOTIFY first then _GUICtrlListView_RegisterSortCallBack will work. Is there a solution for this ? Running AutoIt 3.2.11.0 on English Windows 2000 SP4 #AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) _Example1() Func _Example1() Local $hImage, $hListView, $aIcons[3] = [0, 3, 6] Local $iExWindowStyle = BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE) Local $iExListViewStyle = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER) GUICreate("ListView Register Sort Callback", 300, 200) $hListView = GUICtrlCreateListView("Column1|Col2|Col3", 10, 10, 280, 180, -1, $iExWindowStyle) _GUICtrlListView_SetExtendedListViewStyle($hListView, $iExListViewStyle) ; Load images $hImage = _GUIImageList_Create(18, 18, 5, 3) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -7) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -12) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -3) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -4) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -5) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -6) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -9) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -10) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -11) _GUICtrlListView_SetImageList($hListView, $hImage, 1) _AddRow($hListView, "ABC|000666|10.05.2004", $aIcons) _AddRow($hListView, "DEF|444|11.05.2005", $aIcons, 1) _AddRow($hListView, "CDE|555|12.05.2004", $aIcons, 2) GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events") _GUICtrlListView_RegisterSortCallBack($hListView) ;GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _GUICtrlListView_UnRegisterSortCallBack($hListView) GUIDelete() EndFunc ;==>_Example1 Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event $tagNMHDR = DllStructCreate("int;int;int", $lParam) ;NMHDR (hwndFrom, idFrom, code) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) Switch $event Case $NM_RCLICK msgbox(0,"WM_NOTIFY","",2) EndSwitch EndFunc Func _AddRow($hWnd, $sItem, $aIcons, $iPlus = 0) Local $aItem = StringSplit($sItem, "|") Local $iIndex = _GUICtrlListView_AddItem($hWnd, $aItem[1], $aIcons[0] + $iPlus, _GUICtrlListView_GetItemCount($hWnd) + 9999) _GUICtrlListView_SetColumnWidth($hWnd, 0, $LVSCW_AUTOSIZE_USEHEADER) For $x = 2 To $aItem[0] _GUICtrlListView_AddSubItem($hWnd, $iIndex, $aItem[$x], $x - 1, $aIcons[$x - 1] + $iPlus) _GUICtrlListView_SetColumnWidth($hWnd, $x - 1, $LVSCW_AUTOSIZE) Next EndFunc ;==>_AddRow |
|||
#108 | Fixed | IE.AU3 _IEAttach windowtitle using not existing registry entry | Gary | junkew@… |
Description |
within _IEAttach when searching on windowtitle a registry entry is read which by default does not exist and as such $s_tmp is empty $s_tmp = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Window Title") Whereas actually after - in windows title is Windows Internet Explorer $s_tmp = $o_window.name is a better match for whats needed code becomes Case "windowtitle" ;$s_tmp = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Window Title") $s_tmp = $o_window.name If StringInStr($o_window.document.title & " - " & $s_tmp, $s_string) > 0 Then SetError($_IEStatus_Success) Return $o_window EndIf |