1. whenever you scroll down a page, then switch to another window
2. whenever you select a sorting option when using it to view a local directory
3. whenever it attempts to open a new window through a link
There maybe more but I those are the ones I was able to figure out for sure. This is my first time actually using this UDF library so I might be doing something wrong, but to me at least seems like it might be a problem somewhere deeper.
AutoIt
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <ListViewConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <Array.au3> Const $IE_Home = @ScriptDir & "htmlhome.html" Const $DB_Path = @ScriptDir & "db" Const $Max_Phones = 999 Dim $Resources_Phones[$Max_Phones][2];Storage for phone info ;[0] = ListViewItem ID ;[1] = Index Page $structure = DirGetContents(@ScriptDir & "") _ArrayDisplay($structure) #Region ### START Koda GUI section ### Form= $GUI = GUICreate("GSMdb 0.1", 916, 481, 190, 122) $Tab = GUICtrlCreateTab(0, 0, 465, 473) $Resources_Tab = GUICtrlCreateTabItem("Resources") $Resources_List = GUICtrlCreateList("", 8, 32, 121, 435) $Resources_ListView = GUICtrlCreateListView("Name|Model|Carrier", 136, 32, 320, 433) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 75) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 75) GUISwitch($GUI) $Archives_Tab = GUICtrlCreateTabItem("Archives") GUICtrlSetState(-1,$GUI_SHOW) $Archives_List = GUICtrlCreateList("", 8, 32, 121, 435) $Archives_ListView = GUICtrlCreateListView("Date|Number|Model|MEID", 136, 32, 320, 433) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 60) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 75) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 105) GUICtrlCreateListViewItem ( "12/12/12|(603)789-4356|SPC6000|0xA000001F23EF3", $Archives_ListView ) GUISwitch($GUI) GUICtrlCreateTabItem("") ;Create Display Plane $Display_Home = GUICtrlCreateButton( "Home", 470, 3, 35, 35 ) $Display_Back = GUICtrlCreateButton( "<--", 530, 3, 35, 35 ) $Display_Forward = GUICtrlCreateButton( "-->", 570, 3, 35, 35 ) $Display = GUICreate("Resources_Display", 445, 430, 465, 40, $WS_CHILD + $WS_BORDER, -1, $GUI ) GUISetBkColor ( 0xBBBBBB ) _IEErrorHandlerRegister() Local $Display_IE = _IECreateEmbedded() GUICtrlCreateObj($Display_IE, 0, 0, 445, 430) GUISwitch($GUI) GUISetState(@SW_SHOW) GUISetState(@SW_SHOW, $Display) #EndRegion ### END Koda GUI section ### _IENavigate($Display_IE, $IE_Home, 0); Temporary "Home Screen" GUISwitch($GUI) ;Load Workspace LoadStructure() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_MINIMIZE _IENavigate($Display_IE, $IE_Home, 0) Case $GUI_EVENT_CLOSE Exit Case $Archives_Tab Case $Resources_Tab Case $Display_Back _IEAction($Display_IE, "back") Case $Display_Forward _IEAction($Display_IE, "forward") Case $Display_Home _IENavigate($Display_IE, $IE_Home, 0) Case $Resources_List MsgBox(0,"",GUICtrlRead( $Resources_List ) ) Case $Resources_Phones[0][0] _IENavigate($Display_IE, $Resources_Phones[0][1], 0) EndSwitch WEnd ;------------------------------------------------- ;------------- U D F s ;------------------------------------------------- Func LoadStructure( ) ;Reference loading $contents = DirGetContents( $DB_Path & "reference" ) For $i = 1 To $contents[0];Brands GUICtrlSetData( $Resources_List, $contents[$i] ) $Phones = DirGetContents( $DB_Path & "reference" & $contents[$i] & "" ) If $Phones[0] > 0 Then For $x=1 To $Phones[0];Phones $id = GetNewPhoneID( ) $Resources_Phones[$id][0] = GUICtrlCreateListViewItem( StringReplace( $Phones[$x], ";", "|" ), $Resources_ListView ) $Resources_Phones[$id][1] = $DB_Path & "reference" & $contents[$i] & "" & $Phones[$x] & "index.html" Next EndIf Next EndFunc Func DirGetContents( $dir ) Local $return[2] $return[0] = 0 $search = FileFindFirstFile( $dir & "*" ) If $search = -1 Then FileClose( $search ) Return $return EndIf While 1 Local $file = FileFindNextFile($search) If @error Then FileClose( $search ) Return $return EndIf $return[0] += 1 ReDim $return[$return[0] + 1] $return[$return[0]] = $file WEnd EndFunc Func GetNewPhoneID( ) For $i = 0 To $Max_Phones - 1 If $Resources_Phones[$i][0] = 0 Then Return $i Next MsgBox(42,"Error","Phone array size exceded, recompile with higher $Max_Phones") Exit EndFunc
And the webpage I'm trying to load with it.
Plain Text
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> body { background-color: #333; } body,td,th { color: #06F; } </style> </head> <body link="#00FFFF" vlink="#00FFFF" alink="#0066FF"> <p><img src="../../../../html/images/banner.png" width="400" height="114" /></p> <p>Cheat Sheet</p><table width="400" height="91" border="1"> <tr> <td width="106" height="25">Data Editing</td> <td width="278"><strong>##3282#</strong></td> </tr> <tr> <td>Diag Mode</td> <td><strong>##3424#</strong></td> </tr> <tr> <td>Recovery Boot</td> <td>Vol. Down + Power</td> </tr> </table> </p> <p>Guides</p> <table width="400" height="89" border="1"> <tr> <td width="58" height="23"><strong>Subject</strong></td> <td width="252"><strong>Name</strong></td> <td width="81"><strong>Specification</strong></td> </tr> <tr> <td>Flashing</td> <td><a href="guidestest1.png" target="_new">HTC Evo To Boost Mobile Guide</a></td> <td>CDMA 2.7</td> </tr> </table> <p> </p> <p>Files</p> <p><iframe src="files" width="400" height="300"></iframe> </p> </body> </html>
Any help would be appreciated. Also I'm attaching a link to the full project in case you want to see the buggy-ness in action.
http://www.mediafire.com/?77cs9gfogsbe3io
Edited by BillLuvsU, 26 May 2012 - 10:57 PM.






