31290 Posted September 28, 2015 Author Posted September 28, 2015 Hi Water.Hope you're fine today.Well, as I though, I need to double click on a result and get only the user id returned for future operations.Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndListView = $g_idListView If Not IsHWnd($g_idListView) Then $hWndListView = GUICtrlGetHandle($g_idListView) Local $tNMHDR = DllStructCreate($tagNMLISTVIEW, $lParam) Local $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_COLUMNCLICK ; A column was clicked _GUICtrlListView_SimpleSort($hWndListView, $g_bSortSense, DllStructGetData($tNMHDR, "SubItem")) ; Sort direction for next sort toggled by default Case $NM_DBLCLK ; MsgBox(0, "", $sTemp) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>_WM_NOTIFYAs you can see, I've added aCase $NM_DBLCLK ; MsgBox(0, "", $sTemp)And the msgbox returns me all the rows.Is there a way to ongly get the second "item" (UserId) and put that in a variable?Thanks ~~~ Doom Shall Never Die, Only The Players ~~~
water Posted September 28, 2015 Posted September 28, 2015 Should be possible. I am on a Business trip right now but will send you a new version then. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
31290 Posted September 28, 2015 Author Posted September 28, 2015 Thanks Water, Have a nice trip! ~~~ Doom Shall Never Die, Only The Players ~~~
31290 Posted September 28, 2015 Author Posted September 28, 2015 Water, I found some kind a a bug. For example, if user name is empty and if I double click on any other items, the msgbox will return me this user info only.I clicked on the first complete result. --> Any clue on that? ~~~ Doom Shall Never Die, Only The Players ~~~
water Posted September 28, 2015 Posted September 28, 2015 Your MsgBox shows a pipe character after each field. As the first field is empty the output starts with a pipe character. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
31290 Posted September 28, 2015 Author Posted September 28, 2015 Ok I understand but how it's possible that a double slick on ANY other users shows that particular one? ~~~ Doom Shall Never Die, Only The Players ~~~
water Posted September 28, 2015 Posted September 28, 2015 Don't know, need to check. Maybe a StringSplit problem. 31290 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
31290 Posted September 29, 2015 Author Posted September 29, 2015 Water,I found a solution to my "issue", more a workaround but nicely working. Case $NM_DBLCLK ; A result was double clicked. Local $sFinalGlobalID $count = ControlListView($summaryGUI, "", $g_idListView, "GetItemCount") For $i = 0 to $count - 1 If ControlListView($summaryGUI, "", $g_idListView, "IsSelected", $i) Then ; If Item is selected $sFinalGlobalID = ControlListView($summaryGUI, "", $g_idListView, "GetText", $i) ; Read Item textJust had to put the user ID as the first row of the Listview and this is it. I can now get the userID and play with your UDF like a little child I'd like to thank you again for all the efforts, advises, time, clues, etc you gave me! ~~~ Doom Shall Never Die, Only The Players ~~~
water Posted September 30, 2015 Posted September 30, 2015 Glad to be of service My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now