This is what I am doing now:
Code:
'Scan to see if it is already in array Array Scan g_IEhWnd(), = hWndChild, To g_UrlIndexPtr If IsFalse g_UrlIndexPtr Then 'Handle is new and has not been caught yet Incr g_URLIndex g_UrlIndexPtr = g_URLIndex 'Bring it up to date with index g_IEhWnd(g_UrlIndex) = hWndChild g_IEAddress(g_URLIndex) = Left$(wintext,wer) ListBox Add hDlg,%IDMAIN_LISTBOX1,g_IEAddress(g_URLIndex) Exit Function End If 'Otherwise assume it's in here and modify it only. 'Go to the position of the window handle inside the listbox and select text, then grab text ListBox Select hDlg, %IDMAIN_LISTBOX1,g_UrlIndexPtr ListBox Get Text hDlg, %IDMAIN_LISTBOX1 To sTmp If sTmp <> g_IEAddress(g_UrlIndexPtr) Then ListBox Delete hDlg,%IDMAIN_LISTBOX1, g_UrlIndexPtr ListBox Add hDlg,%IDMAIN_LISTBOX1,g_IEAddress(g_UrlIndexPtr) End If
Scott
Leave a comment: