#include Dim $radio[10], $Input[10], $Combo[10] Dim $count = 1, $prg = 0 Dim $wloc = @ScriptDir & "\web.ini" Dim $AutoItBetaLocation, $Dwait $ver = "1.0.4" ; Set a COM Error handler -- only one can be active at a time (see helpfile) $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $AutoItBetaLocation = IniRead(@ScriptDir & "\IE-library.ini","exe","dir","") If $AutoItBetaLocation = "" Then $AutoItBetaLocation = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","betaInstallDir") If $AutoItBetaLocation = "" Then $AutoItBetaLocation = FileSelectFolder("Select Folder where the Beta AutoIt is installed","c:\",4,@ProgramFilesDir & "\AutoIt3\beta") If $AutoItBetaLocation = "" Then $iMsgBoxAnswer = MsgBox(262209, "IE.au3 Error #1", "Autoit3 Beta is required " & @CRLF & "Download from www.Autoit3.com ? ") If $iMsgBoxAnswer = 1 Then $web_loc = "http://www.autoitscript.com/forum/index.php?showtopic=19717#" Run(@ComSpec & " /c Start " & $web_loc, "", @SW_HIDE) MsgBox(262208, "Web Site", "The AutoIt3 Beta Link is at the top of this page... " & @CRLF & @CRLF & "Please Download and Install ", 10) $Dwait = 1 EndIf ;Exit EndIf EndIf IniWrite(@ScriptDir & "\IE-library.ini","exe","dir",$AutoItBetaLocation) EndIf If Not FileExists($AutoItBetaLocation & "\Include\IE.au3") Then $iMsgBoxAnswer = MsgBox(262209, "IE.au3 Error #2", "IE.au3 Library is required " & @CRLF & "Download from www.Autoit3.com ? ") If $iMsgBoxAnswer = 1 Then $web_loc = "http://www.autoitscript.com/forum/index.php?showtopic=13398&hl=#" Run(@ComSpec & " /c Start " & $web_loc, "", @SW_HIDE) MsgBox(262208, "Web Site", "The IE.au3 Library is at the bottom of this page... " & @CRLF & @CRLF & "Save as " & $AutoItBetaLocation & "\Include\IE.au3 ", 10) $Dwait = 1 EndIf ;Exit EndIf #include If Not FileExists(@ScriptDir & "\web.ini") Then Set_web() $Program_2 = $AutoItBetaLocation & "\Autoit3.exe" ;Creates the parent gui $gui = GUICreate(" IE-Builder " & $ver, @DesktopWidth, @DesktopHeight, -1, -1); $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_OVERLAPPEDWINDOW + $WS_MAXIMIZE) ;, $WS_EX_TOPMOST ) $VLabel = GUICtrlCreateLabel("IE-Builder View", 10, 140, 140, 43, $SS_CENTER) GUICtrlSetFont(-1, 16, 700, 4, "MS Sans Serif") $VAbout = GUICtrlCreateButton("", 15, 60, 40, 30, $BS_ICON) $Vimg = GUICtrlCreateButton("", 105, 60, 40, 30, $BS_ICON) $Favr = GUICtrlCreateButton("", 60, 60, 40, 30, $BS_ICON) $back = GUICtrlCreateButton("Back", 15, 20, 40, 30, $BS_BITMAP) $forward = GUICtrlCreateButton("Forward", 60, 20, 40, 30, $BS_BITMAP) $refresh = GUICtrlCreateButton("Refresh", 105, 20, 40, 30, $BS_BITMAP) $GO = GUICtrlCreateButton("GO", 800, 20, 50, 30, $BS_BITMAP) $Mnmz = GUICtrlCreateButton("Min", 855, 20, 50, 30, $BS_ICON) $Exit = GUICtrlCreateButton("Exit", 910, 20, 50, 30, $BS_ICON) $Combo_5 = GUICtrlCreateCombo("http://www.Autoit3.com", 160, 25, 625, 25) Set_combo() ControlSetText(" IE-Builder ", "", $Combo_5, "http://www.Autoit3.com") $Progress_6 = GUICtrlCreateProgress(30, 620, 100, 15) GUICtrlCreateLabel("Ver " & $ver, 60, 640, 100, 15) $Date_8 = GUICtrlCreateDate("Date7", 700, 680, 200, 20) GUICtrlCreateLabel("", 30, 670, 650, 35, $SS_SUNKEN + $SS_CENTER) GUICtrlSetFont(-1, 16, 700, 4, "MS Sans Serif") GUICtrlSetData(-1, " Internet Explorer Automation UDF Library and IE-Builder for AutoIt3 ") ; set button pics GUICtrlSetImage($Favr, "shell32.dll", 208) GUICtrlSetImage($Vimg, "shell32.dll", 220) GUICtrlSetImage($back, "images\back.bmp") GUICtrlSetImage($forward, "images\forward.bmp") GUICtrlSetImage($refresh, "images\refresh.bmp") GUICtrlSetImage($GO, "images\go.bmp") GUICtrlSetImage($Mnmz, "shell32.dll", 217) GUICtrlSetImage($Exit, "shell32.dll", 215) GUICtrlSetImage($VAbout, "shell32.dll", 210) ; View buttons GUICtrlCreateGroup("IE-Builder Center", 20, 200, 120, 390) $VBuilder = GUICtrlCreateButton("IE-Builder", 40, 230, 80, 20) $VInternet = GUICtrlCreateButton("Internet", 40, 270, 80, 20) $VSource = GUICtrlCreateButton("Source Code", 40, 310, 80, 20) $VHtmls = GUICtrlCreateButton("Html Elements", 40, 350, 80, 20) $VAnchors = GUICtrlCreateButton("Anchor Tags", 40, 390, 80, 20) $VImages = GUICtrlCreateButton("Image Tags", 40, 430, 80, 20) $VForms = GUICtrlCreateButton("Form Elements", 40, 470, 80, 20) $VSyntax = GUICtrlCreateButton("IE.au3 Syntax", 40, 510, 80, 20) $VExamples = GUICtrlCreateButton("Examples", 40, 550, 80, 20) GUISetState() ;creates internet objects $B_oIE5 = ObjCreate("Shell.Explorer.2") $B_oIE1 = ObjCreate("Shell.Explorer.2") $B_oIE2 = ObjCreate("Shell.Explorer.2") $B_oIE3 = ObjCreate("Shell.Explorer.2") $B_oIE4 = ObjCreate("Shell.Explorer.2") ;creates the child gui that the internet objects will be held in ;$internetgui = GUICreate("Internet GUI", @DesktopWidth - 200, @DesktopHeight - 200, 160, 80, $WS_CHILD + $WS_BORDER, "", $gui) $internetgui = GUICreate("Internet GUI", @DesktopWidth - 200, @DesktopHeight - 200, 160, 80, $WS_BORDER, -1, $gui) $internetgui1 = GUICtrlCreateObj($B_oIE1, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUICtrlSetState(-1, $GUI_HIDE) $internetgui2 = GUICtrlCreateObj($B_oIE2, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUICtrlSetState(-1, $GUI_HIDE) $internetgui3 = GUICtrlCreateObj($B_oIE3, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUICtrlSetState(-1, $GUI_HIDE) $internetgui4 = GUICtrlCreateObj($B_oIE4, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUICtrlSetState(-1, $GUI_HIDE) $internetgui5 = GUICtrlCreateObj($B_oIE5, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUICtrlSetState(-1, $GUI_HIDE) GUISetState(@SW_HIDE) ; Navigate the IE Objects $B_oIE1.navigate ("about:Html Elements - Get Source First") $B_oIE2.navigate ("about:Anchor Tags - Get Source First") $B_oIE3.navigate ("about:Image Tags - Get Source First") $B_oIE4.navigate ("about:Form Elements - Get Source First") $B_oIE5.navigate ("about:Web Site - Navigate to Desired Web Page First") ;creates the child gui for HTML Source $htmlgui = GUICreate("Html GUI", @DesktopWidth - 200, @DesktopHeight - 200, 160, 80, $WS_CHILD + $WS_BORDER, "", $gui) $htmlLabel = GUICtrlCreateLabel((GUICtrlRead($Combo_5)), 15, 17, 300, 20) $htmlinput = GUICtrlCreateInput("Search word/phrase", 520, 15, 120, 20) $htmlButton1 = GUICtrlCreateButton("Search Source", 650, 15, 100, 20) $htmlButton2 = GUICtrlCreateButton("Display Source", 350, 15, 100, 20) $htmledit = GUICtrlCreateEdit("Reads current web page" & @CRLF & "Updates the following views..." & @CRLF & @CRLF & "Html Elements" & @CRLF & "Anchor Tags" & @CRLF & _ "Image Tags" & @CRLF & "Form Elements", 0, 50, @DesktopWidth - 200, @DesktopHeight - 250) GUISetState(@SW_HIDE) ;creates the child gui for examples $examplesgui = GUICreate("Examples GUI", @DesktopWidth - 200, @DesktopHeight - 200, 160, 80, $WS_CHILD + $WS_BORDER, "", $gui) $EExamples = FileRead(@ScriptDir & "\Examples.txt", FileGetSize(@ScriptDir & "\Examples.txt")) GUICtrlCreateEdit($EExamples, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUISetState(@SW_HIDE) ;creates the child gui for syntax files $syntaxgui = GUICreate("Syntax GUI", @DesktopWidth - 200, @DesktopHeight - 200, 160, 80, $WS_CHILD + $WS_BORDER, "", $gui) $ESnytax = FileRead(@ProgramFilesDir & "\Autoit3\Include\IE.au3", FileGetSize(@ProgramFilesDir & "\Autoit3\Include\IE.au3")) GUICtrlCreateEdit($ESnytax, -1, -1, @DesktopWidth - 200, @DesktopHeight - 200) GUISetState(@SW_HIDE) ;creates the IE-Builder gui. $buildergui = GUICreate("", @DesktopWidth - 200, @DesktopHeight - 200, 160, 80, $WS_CHILD + $WS_BORDER, "", $gui) $Group1 = GUICtrlCreateGroup("Core Functions", 8, 10, 441, 49) $Combo[1] = GUICtrlCreateCombo("", 56, 26, 161, 21) GUICtrlSetData(-1, "_IECreate(|_IEAttach(|_IENavigate(|_IEDocumentGetObj(") $Input[1] = GUICtrlCreateInput("Choose a Function 1", 264, 26, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group2 = GUICtrlCreateGroup("Frame Functions", 8, 66, 441, 49) $Combo[2] = GUICtrlCreateCombo("", 56, 82, 161, 21) GUICtrlSetData(-1, "_IEIsFrameSet(|_IEFrameGetCount(|_IEFrameGetCollection(|_IEFrameGetObjByIndex(|_IEFrameGetObjByName(|_IEFrameGetSrcByName(|_IEFrameGetNameByIndex(") $Input[2] = GUICtrlCreateInput("Choose a Function 2", 264, 82, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group3 = GUICtrlCreateGroup("Link Functions", 8, 122, 441, 49) $Combo[3] = GUICtrlCreateCombo("", 56, 138, 161, 21) GUICtrlSetData(-1, "_IEClickLinkByText(|_IEClickLinkByIndex(") $Input[3] = GUICtrlCreateInput("Choose a Function 3", 264, 138, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group4 = GUICtrlCreateGroup("Image Function", 8, 178, 441, 49) $Combo[4] = GUICtrlCreateCombo("", 56, 194, 161, 21) GUICtrlSetData(-1, "_IEClickImg(") $Input[4] = GUICtrlCreateInput("Choose a Function 4", 264, 194, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group5 = GUICtrlCreateGroup("Form Functions", 8, 234, 441, 49) $Combo[5] = GUICtrlCreateCombo("", 56, 250, 161, 21) GUICtrlSetData(-1, "_IEFormGetCount(|_IEFormGetCollection(|_IEFormGetObjByIndex(|_IEFormGetObjByName(|_IEFormGetNameByIndex(|_IEFormElementGetCount(|_IEFormElementGetCollection(|" & _ "_IEFormElementGetObjByIndex(|_IEFormElementGetObjByName(|_IEFormElementGetTypeByIndex(|_IEFormElementOptionGetCount(|_IEFormElementGetValue(|_IEFormElementSetValue(|_IEFormSubmit(|_IEFormReset(") $Input[5] = GUICtrlCreateInput("Choose a Function 5", 264, 250, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group6 = GUICtrlCreateGroup("Table Functions", 8, 290, 441, 49) $Combo[6] = GUICtrlCreateCombo("", 56, 306, 161, 21) GUICtrlSetData(-1, "_IETableGetCount(|_IETableGetCollection(|_IETableGetObjByIndex(|_IETableWriteToArray(") $Input[6] = GUICtrlCreateInput("Choose a Function 6", 264, 306, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group7 = GUICtrlCreateGroup("Body Functions", 8, 346, 441, 49) $Combo[7] = GUICtrlCreateCombo("", 56, 362, 161, 21) GUICtrlSetData(-1, "_IEBodyReadHTML(|_IEBodyWriteHTML(") $Input[7] = GUICtrlCreateInput("Choose a Function 7", 264, 362, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group8 = GUICtrlCreateGroup("Utility Functions", 8, 402, 441, 49) $Combo[8] = GUICtrlCreateCombo("", 56, 418, 161, 21) GUICtrlSetData(-1, "_IETagNameGetCollection(|_IETagNameAllGetCollection(|_IELoadWait(|_IEAction(|_IEGetProperty(|_IEQuit(") $Input[8] = GUICtrlCreateInput("Choose a Function 8", 264, 418, 161, 21, -1, $WS_EX_CLIENTEDGE) $Group9 = GUICtrlCreateGroup("Command Functions", 8, 458, 441, 49) $Combo[9] = GUICtrlCreateCombo("", 56, 474, 161, 21) GUICtrlSetData(-1, ".GoForward|.GoBack|.Stop|.refresh|.execWB(6,2); print") $Edit1 = GUICtrlCreateEdit("", 474, 32, 329, 515);, -1, $WS_EX_CLIENTEDGE) GUICtrlSetData($Edit1, "#include " & @CRLF & '#Region --- IE-Builder generated code Start ---' & @CRLF & 'Dim $oIE' & @CRLF & '$sUrl = "www.autoit3.com"' & @CRLF & "_IEAttach ($oIE)" & @CRLF & _ 'If Not IsObj($oIE) Then' & @CRLF & _ ' $oIE = _IECreate ()' & @CRLF & _ ' _IENavigate ($oIE, $sUrl)' & @CRLF & 'EndIf' & @CRLF, 1) GUICtrlCreateLabel("IE-Builder Form - Line by Line", 480, 8, 294, 24, $SS_CENTER) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") ; create radios $radio[1] = GUICtrlCreateRadio("", 16, 26, 17, 25) $radio[2] = GUICtrlCreateRadio("", 16, 82, 17, 25) $radio[3] = GUICtrlCreateRadio("", 16, 138, 17, 25) $radio[4] = GUICtrlCreateRadio("", 16, 194, 17, 25) $radio[5] = GUICtrlCreateRadio("", 16, 250, 17, 25) $radio[6] = GUICtrlCreateRadio("", 16, 306, 17, 25) $radio[7] = GUICtrlCreateRadio("", 16, 362, 17, 25) $radio[8] = GUICtrlCreateRadio("", 16, 418, 17, 25) $radio[9] = GUICtrlCreateRadio("", 16, 474, 17, 25) ;create buttons $Button1 = GUICtrlCreateButton("Submit to Form", 16, 520, 129, 33) $Button2 = GUICtrlCreateButton("Test Run Form", 160, 520, 137, 33) $Button3 = GUICtrlCreateButton("Copy to ClipBoard", 312, 520, 137, 33) If $Dwait = 1 Then GUISetState(@SW_MINIMIZE, $gui) Else GUISetState(@SW_SHOW, $gui) GUISetState(@SW_SHOW, $buildergui) EndIf $B_oIE5.navigate ((GUICtrlRead($Combo_5))) Set_progress() While 1 $msg = GUIGetMsg() Select ; Main window controls Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit ExitLoop Case $msg = $Mnmz GUISetState(@SW_MINIMIZE, $gui) Case $msg = $htmlButton1 Search_HTML() Set_progress() Case $msg = $htmlButton2 Set_HTML() Set_progress() Case $msg = $Favr check_web() Set_progress() Case $msg = $VBuilder GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $internetgui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $buildergui) GUICtrlSetData($VLabel, "IE-Builder View") Set_progress() Case $msg = $VInternet Or $msg = $Vimg GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $buildergui) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $internetgui) GUICtrlSetState($internetgui5, $GUI_SHOW) GUICtrlSetState($internetgui5, $GUI_FOCUS) GUICtrlSetData($VLabel, "Internet View") Set_progress() Case $msg = $VHtmls GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $buildergui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $internetgui) GUICtrlSetState($internetgui1, $GUI_SHOW) GUICtrlSetData($VLabel, "Elements View") Set_progress() Case $msg = $VAnchors GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $buildergui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $internetgui) GUICtrlSetState($internetgui2, $GUI_SHOW) GUICtrlSetData($VLabel, "Anchors View") Set_progress() Case $msg = $VImages GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $buildergui) GUISetState(@SW_HIDE, $internetgui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $internetgui) GUICtrlSetState($internetgui3, $GUI_SHOW) GUICtrlSetData($VLabel, "Images View") Set_progress() Case $msg = $VForms GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $buildergui) GUISetState(@SW_HIDE, $internetgui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUISetState(@SW_SHOW, $internetgui) GUICtrlSetState($internetgui4, $GUI_SHOW) GUICtrlSetData($VLabel, "Forms View") Set_progress() Case $msg = $VSource GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $internetgui) GUISetState(@SW_HIDE, $buildergui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $htmlgui) GUICtrlSetData($VLabel, "Source View") Set_progress() Case $msg = $VExamples GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $buildergui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $internetgui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $examplesgui) GUICtrlSetData($VLabel, "Example View") Set_progress() Case $msg = $VSyntax GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $buildergui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $internetgui) GUICtrlSetState($internetgui5, $GUI_HIDE) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $syntaxgui) GUICtrlSetData($VLabel, "Syntax View") Set_progress() Case $msg = $VAbout MsgBox(262208, " About IE.au3 / IE-Builder v" & $ver, "IE.au3 Library for Autoit3, By Dale Hohm " & @CRLF & @CRLF & " IE.au3 IE-Builder, by Valuater " & @CRLF & @CRLF) ; internet window controls Case $msg = $GO ;gets the message of the button GUISetState(@SW_HIDE, $htmlgui) GUISetState(@SW_HIDE, $examplesgui) GUISetState(@SW_HIDE, $syntaxgui) GUISetState(@SW_HIDE, $buildergui) GUICtrlSetState($internetgui1, $GUI_HIDE) GUICtrlSetState($internetgui2, $GUI_HIDE) GUICtrlSetState($internetgui3, $GUI_HIDE) GUICtrlSetState($internetgui4, $GUI_HIDE) GUISetState(@SW_SHOW, $internetgui) GUICtrlSetState($internetgui5, $GUI_SHOW) GUICtrlSetState($internetgui5, $GUI_FOCUS) GUICtrlSetData($VLabel, "Internet View") $B_oIE5.navigate ((GUICtrlRead($Combo_5))) ; tells the object to go to the web page thats in the combobox GUICtrlSetData($htmlLabel, (GUICtrlRead($Combo_5))) Set_progress() Case $msg = $back $B_oIE5.GoBack Set_progress() Case $msg = $forward $B_oIE5.GoForward Set_progress() Case $msg = $refresh $B_oIE5.Refresh Set_progress() Case $msg = $Button1 Set_submit() Set_progress() Case $msg = $Button2 Set_test() Set_progress() Case $msg = $Button3 GUICtrlSetData($Edit1,'#EndRegion --- IE-Builder generated code End ---' & @CRLF, 1) ClipPut((GUICtrlRead($Edit1))) $count = 1 $iMsgBoxAnswer = MsgBox(262212,"Copy to ClipBoard", "The Contents of the Form has been copied to the ClipBoard " & @CRLF & "and the Object count has been re-set" & @CRLF & @CRLF & "Clear IE-Builder Form contents? ") If $iMsgBoxAnswer = 6 Then GUICtrlSetData($Edit1, "") GUICtrlSetData($Edit1, "#include " & @CRLF & '#Region --- IE-Builder generated code Start ---' & @CRLF & 'Dim $oIE' & @CRLF & '$sUrl = "www.autoit3.com"' & @CRLF & "_IEAttach ($oIE)" & @CRLF & _ 'If Not IsObj($oIE) Then' & @CRLF & _ ' $oIE = _IECreate ()' & @CRLF & _ ' _IENavigate ($oIE, $sUrl)' & @CRLF & 'EndIf' & @CRLF, 1) EndIf Set_progress() EndSelect WEnd Exit ; ------------------------------------ Functions ------------------------------------ Func Set_test() $TLoc = @TempDir & "\test.au3" $TInfo = GUICtrlRead($Edit1) FileWrite($TLoc, $TInfo) RunWait($Program_2 & " " & $TLoc) FileDelete($TLoc) EndFunc ;==>Set_test Func Set_submit() Dim $1st = "", $2nd = "", $3rd = "" For $x = 1 To 9 If GUICtrlRead($radio[$x]) = $GUI_CHECKED Then $1st = GUICtrlRead($Combo[$x]) If $1st = "" Then MsgBox(262208, "Functions", "Please *Choose* a Function first ") Return EndIf If $x = 9 Then GUICtrlSetData($Edit1, "$oIE" & GUICtrlRead($Combo[$x]) & @CRLF, 1) Return EndIf If StringInStr($1st, "index") Then $1st = "$o_Index" & $count & " = " & $1st ElseIf StringInStr($1st, "form") Then $1st = "$o_Form" & $count & " = " & $1st ElseIf StringInStr($1st, "text") Then $1st = "$0_Text" & $count & " = " & $1st EndIf $2nd = GUICtrlRead($Input[$x]) If $2nd = "" Then GUICtrlSetData($Edit1, ($1st & ")") & @CRLF, 1) Return EndIf $2nd = StringSplit($2nd, ",") If $2nd[0] > 1 Then For $i = 1 To $2nd[0] - 1 If StringLeft($2nd[$i], 1) = "$" Then $3rd = $3rd & $2nd[$i] & "," Else $3rd = $3rd & '"' & $2nd[$i] & '"' & "," EndIf Next $3rd = $3rd & '"' & $2nd[$i] & '"' Else If StringLeft($2nd[1], 1) = "$" Then $3rd = $3rd & $2nd[1] Else $3rd = $3rd & '"' & $2nd[1] & '"' EndIf EndIf $3rd = $3rd & ")" GUICtrlSetData($Edit1, ($1st & $3rd) & @CRLF, 1); and two outs in the top of the nineth $count = $count + 1 Return EndIf Next MsgBox(262208, "Functions", "Please *Select* a Function first ") EndFunc ;==>Set_submit Func Set_HTML() $wait = 500 ProgressOn("IE-Builder Progress Meter", "Loading Source Code...", "10 percent") Sleep($wait) ; update Source View $body = _IEBodyReadHTML ($B_oIE5) GUICtrlSetData($htmledit, $body) ; Show information for each HTML element $prg = 20 ProgressSet(20, "20 Percent", "Loading Html Elements...") Sleep($wait) $o_all = _IETagNameAllGetCollection ($B_oIE5) $sHTM = _IECollectionTable($o_all, "Characteristics of all HTML Elements on page") _IEBodyWriteHTML ($B_oIE1, $sHTM) ; Show information for each A (anchor) tag $prg = 40 ProgressSet(40, "", "Loading Anchor Tags...") Sleep($wait) $o_all = _IETagNameGetCollection ($B_oIE5.document, "a") $sHTM = _IECollectionTable($o_all, "Characteristics of all 'a' Links") _IEBodyWriteHTML ($B_oIE2, $sHTM) ; Show attributes for each IMG tag $prg = 60 ProgressSet(60, "", "Loading Image Tags...") Sleep($wait) $o_all = _IETagNameGetCollection ($B_oIE5.document, "img") $sHTM = _IECollectionTable($o_all, "Characteristics of all 'img' Links") _IEBodyWriteHTML ($B_oIE3, $sHTM) ; Show information on each form and its elements $prg = 80 ProgressSet(80, "", "Loading Form Elements...") Sleep($wait) $o_all = _IEFormGetCollection ($B_oIE5.document) $icnt = 0 For $form In $o_all $sBody = _IEBodyReadHTML ($B_oIE4) If $icnt = 0 Then $sBody = "" $sHTM = _IECollectionTable($form, "Elements for form " & $icnt) _IEBodyWriteHTML ($B_oIE4, $sBody & $sHTM) $icnt = $icnt + 1 Sleep(5) ProgressSet($prg, $icnt & " Items") Next If $icnt = 0 Then $sBody = "" $sHTM = _IECollectionTable($form, "Elements for form " & $icnt) _IEBodyWriteHTML ($B_oIE4, $sBody & $sHTM) EndIf ProgressSet(100, "Done", "Loading Complete...") Sleep($wait) Set_progress() ProgressOff() EndFunc ;==>Set_HTML Func _IECollectionTable($o_collection, $s_title = "HTML Element Collection") Dim $adata[5] Dim $i = 0 Dim $sHTML = "" $sHTML = $sHTML & "

IE-Builder v" & $ver & "

" & @CR $sHTML = $sHTML & "" & @CR $sHTML = $sHTML & "
Object Type" $sHTML = $sHTML & "Object Count" $sHTML = $sHTML & "
" & ObjName($o_collection) & "" & $o_collection.length & "
" & @CR & @CR ; $sHTML = $sHTML & "

" & $s_title & "

" & @CR $sHTML = $sHTML & "" & @CR $sHTML = $sHTML & "" & @CR For $a In $o_collection ; SetError(0) $tmp = $a.tagname If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[0] = $tmp ; SetError(0) $tmp = $a.name If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[1] = $tmp ; SetError(0) $tmp = $a.id If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[2] = $tmp ; Select Case $a.tagname = "a" SetError(0) $tmp = "Link Text: " & $a.innerText & "
href: " & $a.href If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[3] = $tmp Case $a.tagname = "img" SetError(0) $tmp = "Img SRC: " & $a.src & "
alt Text: " & $a.alt If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[3] = $tmp Case $a.tagname = "input" SetError(0) $tmp = "Form Input Type: " & $a.type & "
Value: " & $a.value If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[3] = $tmp Case $a.tagname = "option" SetError(0) $tmp = "Option index: " & $a.index & "
Value: " & $a.value & "
Selected: " & $a.selected If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[3] = $tmp Case Else $adata[3] = " " EndSelect ; SetError(0) $tmp = ObjName($a) If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " $adata[4] = $tmp ; $sHTML = $sHTML & "" & @CR $i = $i + 1 Sleep(5) ProgressSet($prg, $i & " Items") Next $sHTML = $sHTML & "
Index" $sHTML = $sHTML & "Tag" $sHTML = $sHTML & "Name" $sHTML = $sHTML & "Id" $sHTML = $sHTML & "Extra Information" $sHTML = $sHTML & "Object Type" $sHTML = $sHTML & "
" & $i $sHTML = $sHTML & "" & $adata[0] $sHTML = $sHTML & "" & $adata[1] $sHTML = $sHTML & "" & $adata[2] $sHTML = $sHTML & "" & $adata[3] $sHTML = $sHTML & "" & $adata[4] $sHTML = $sHTML & "
" & @CR Return $sHTML EndFunc ;==>_IECollectionTable Func MyErrFunc() ; Set @ERROR to 1 and return control to the program following the trapped error SetError(1) EndFunc ;==>MyErrFunc Func Search_HTML() $sloc = @TempDir & "\stest.txt" $sBody = GUICtrlRead($htmledit) GUICtrlSetData($htmledit, "") FileDelete($sloc) FileWrite($sloc, $sBody) $sfile = FileOpen($sloc, 0) While 2 $sline = FileReadLine($sfile) If @error Then MsgBox(262208, "Fail", "The string was NOT found ") FileClose($sfile) Return EndIf GUICtrlSetData($htmledit, $sline & @CRLF, 1) If StringInStr($sline, (GUICtrlRead($htmlinput))) Then $iMsgBoxAnswer = MsgBox(262212, "Success", "The string " & (GUICtrlRead($htmlinput)) & " was found " & @CRLF & @CRLF & "Continue Search?") If $iMsgBoxAnswer = 7 Then FileClose($sfile) Return EndIf EndIf WEnd EndFunc ;==>Search_HTML Func Set_web() IniWrite($wloc, "Favorites", "1", "http://www.autoit3.com") IniWrite($wloc, "Favorites", "2", "http://www.autoitscript.com/forum/index.php?showtopic=13398&st=0#") IniWrite($wloc, "Favorites", "3", "http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/objects/internetexplorer.asp") IniWrite($wloc, "Favorites", "4", "http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_document.asp") For $p = 5 To 30 Step 1 IniWrite($wloc, "Favorites", $p, "Available") Next EndFunc ;==>Set_web Func check_web() If GUICtrlRead($Combo_5) = "" Then Return For $w = 1 To 30 $wRead = IniRead($wloc, "Favorites", $w, "Not Found") If $wRead = "Not Found" Then ExitLoop If $wRead = (GUICtrlRead($Combo_5)) Then $iMsgBoxAnswer = MsgBox(262212, "Favorites", "REMOVE the following Web-Site from Favorites? " & @CRLF & @CRLF & (GUICtrlRead($Combo_5)) & @CRLF & @CRLF) If $iMsgBoxAnswer = 7 Then Return Else IniWrite($wloc, "Favorites", $w, "Available") Set_combo() Return EndIf EndIf Next $iMsgBoxAnswer = MsgBox(262212, "Favorites", "ADD the following Web-Site to Favorites? " & @CRLF & @CRLF & (GUICtrlRead($Combo_5)) & @CRLF & @CRLF) If $iMsgBoxAnswer = 7 Then Return Else For $w = 1 To 30 $wRead = IniRead($wloc, "Favorites", $w, "Not Found") If $wRead = "Available" Then IniWrite($wloc, "Favorites", $w, (GUICtrlRead($Combo_5))) $hold = GUICtrlRead($Combo_5) Set_combo() ControlSetText(" IE-Builder ", "", $Combo_5, $hold) Return EndIf Next MsgBox(262208, "Favorites", "The 30 Favorites is full, Please REMOVE a Favorite first ") EndIf EndFunc ;==>check_web Func Set_combo() GUICtrlSetData($Combo_5, "") $w = "" For $w = 1 To 30 $wRead = IniRead($wloc, "Favorites", $w, "Not Found") If $wRead <> "Not Found" And $wRead <> "Available" Then GUICtrlSetData($Combo_5, $wRead & "|", 1) EndIf Next EndFunc ;==>Set_combo Func Set_progress() For $pg = 0 To 100 Step 5 GUICtrlSetData($Progress_6, $pg) Sleep(2) Next EndFunc ;==>Set_progress