ptrex Posted February 1, 2006 Posted February 1, 2006 Since I compiled my Firewall Log Analizer script with the lastest beta versions (saying 3.1.1.103 and 106), I see a different behaviour of the COM objects. (See script, IE Object should be showing on the second tab, but initially is showing on the first ?) When the script was compiled with version 3.1.1.8x beta, this script was showing the IE objectl on the second tab of the tab control, when starting. ONLY THE GUI related Script part is included ! expandcollapse popup;Main GUI ;--------- $Gui = GuiCreate("Firewall Log Analyzer for XP v1.2", 975, 571,(@DesktopWidth-797)/2, (@DesktopHeight-571)/2 , _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Helpmenu = GUICtrlCreateMenu ("?") $Helpitem = GUICtrlCreateMenuitem ("Help",$Helpmenu) $Infoitem = GUICtrlCreateMenuitem ("Info",$Helpmenu) $Tab=GUICtrlCreateTab (8,30, 962,520) GUICtrlSetResizing ($Tab,$GUI_DOCKAUTO) ;Tab1 $Tab1=GUICtrlCreateTabitem ("LogData") $ListView = GUICtrlCreateListView("date|time|action| protocol| src-ip| dst-ip| src-port| dst-port| size| tcpflags|tcpsyn| tcpack| tcpwin| icmptype" _ , 10, 60, 957, 483,-1,$LVS_EX_HEADERDRAGDROP+$LVS_EX_FULLROWSELECT);Drag&Drop Columns GUICtrlSetResizing ($Listview,$GUI_DOCKAUTO) GUICtrlSetState($ListView,$GUI_FOCUS) GUICtrlSetimage($ListView, "xpsp2res.dll",73);Set Icons for records _GUICtrlListViewSetColumnWidth ($listview, 0,90);Set Column with $Tab1combo1=GUICtrlCreateCombo ("# Lines", 10,6,60,40) GUICtrlSetData(-1,"100|150|300|500|1000|2000|3000|4000", "100") ;Set default 100 GUICtrlCreateLabel("Select # of lines",80,10) $Tab1combo2=GUICtrlCreateCombo ("Auto Refresh ", 200,6,100) GUICtrlSetData(-1,"1|5|10|20|30") ;Set default none $Refresh = GuiCtrlCreateButton("Refresh", 852, 6, 90, 30) GUICtrlSetTip($Refresh,"Use this button to manually refresh the data") $Button_ON = GUICtrlCreateButton ("FW Status ", 380,5,40,40, $BS_ICON);Check status of FW & set Icon & Label GUICtrlSetTip($button_ON,"Use this button to manually refresh the status") Enabled() $Whois = GuiCtrlCreateButton("Whois", 650, 6, 90, 30) GUICtrlSetTip($Whois,"Select an item in the list, and then use click the WHOIS button") $Status= GUICtrlCreateLabel("Your firewall is " & $Label_ON ,440,10,$SS_SUNKEN);Create Label with variable FW status data $Refresh_label= GUICtrlCreateLabel("Seconds",320,10,$SS_SUNKEN) ;Tab2 $Tab2=GUICtrlCreateTabitem ( "Whois ") $oIE = ObjCreate("Shell.Explorer.2") ;Include Embedded IE Object $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 60 , 952 , 486) GUICtrlSetStyle ( $GUIActiveX, $WS_VISIBLE ) ;Show IE Object on tab2 GUICtrlSetResizing ($GUIActiveX,$GUI_DOCKAUTO) $oIE.navigate("http://www.ripe.net") ;Tab3 $Tab3=GUICtrlCreateTabitem ( "Firewall Config ") $Listbox1 = GUICtrlCreateList("", 10, 70, 930, 225) GUICtrlSetResizing ($Listview,$GUI_DOCKAUTO) GUICtrlCreateLabel("Applications allowed : ",15,55) GUICtrlSetColor(-1,0xff0000) ;Set Red color GUICtrlSetFont (-1,7.5, 100, 4, $font) ;Set Font Open_apps() $Listbox2 = GUICtrlCreateList("", 10, 300, 930, 225) GUICtrlSetResizing ($Listview,$GUI_DOCKAUTO) GUICtrlCreateLabel("Open Ports : ",15,285) GUICtrlSetColor(-1,0xff0000) GUICtrlSetFont (-1,7.5, 100, 4, $font) Open_ports() $Link = GuiCtrlCreateLabel("Click here for more info : Ports Database", 120, 285, 290, 12) GUICtrlSetColor ( -1, 0x0000ff) ;Set Blue color GUICtrlSetFont (-1, 7.5 , 100 , 4 ) ;Set Font GUICtrlSetCursor ( -1, 0 ) ;Activate Hyperlink function GetBrowser() ;Error checking : Test OS = XP/SP2 ;---------------------------------- If $OS <> "Win_XP" Then MsgBox (0, "Your OS is not XP : ", $OS, 3) ElseIf $SP <> "Service Pack 2" Then MsgBox (0, "Your OS is not on SP2 : ", $SP, 3) Else $filename = "C:\WINDOWS\pfirewall.log" ;Open the file and read data EndIf _LockAndWait() Getdata() _ResetLockWait() ;GUI handling ;------------ GuiSetState() Dim $B_DESCENDING[_GUICtrlListViewGetSubItemsCount ($listview)] ;Used by Sort Click Header While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Tab1combo1 ;Read Combo Data GUICtrlRead($Tab1combo1) Status() Case $msg = $Tab1combo2 Do AutoRefresh() ;Run Auto Refresh per Second sleep ($Combo2Item * 1000) DeleteList() Getdata() Status() Until $Combo2Item = 0 Or $msg = $GUI_EVENT_CLOSE Case $msg = $Button_ON ;Read Firewall ON_OFF Status Status() Case $msg = $Whois ReadLine() Status() Case $msg = $Listview ;Sort the list by the column header clicking _LockAndWait() _GUICtrlListViewSort($listview, $B_DESCENDING, GUICtrlGetState($Listview)) _ResetLockWait() Status() Case $msg= $Link ;Active Hyperlink run($HTTP,"",@SW_MAXIMIZE) Case $msg = $infoitem Info() Msgbox(0,"Info",$Info) Case $msg = $Helpitem Help() Msgbox(0,"Help",$Help) Case else If $msg = $Refresh Then DeleteList() _LockAndWait() Getdata() _ResetLockWait() Status() EndIf EndSelect WEnd Exit Now when running the same script with the latest beta, the IE object is shown on the FIRST TAB. Only when clicking the SECOND TAB in the GUI, and back the FIRST TAB, than it is shown correctly (This means it stays on the SECOND TAB). Does anyone know what has changed over time that the behaviour is different these days ? Is this now by design or is there a change in funtionality ? Thanks Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
SvenP Posted February 5, 2006 Posted February 5, 2006 Hello Ptrex,I remembered a similar topic at: http://www.autoitscript.com/forum/index.php?showtopic=14346Didn't you wrote that example script?I tested that script with 3.1.1.105/106: no problems. (I only added a line GUICtrlSetState($tab0 ,$GUI_SHOW) to show the first tab as default trying to simulate your problem).Then I checked your new script...and rechecked again.. aren't you missing a line GUICtrlCreateTabitem ("") to END the tab definition ?? Because, when I remove the 'end tab definition' from the old example script I get exactly the same behaviour you describe with your current script.-Sven
ptrex Posted February 6, 2006 Author Posted February 6, 2006 @SvenP Thanks for noticing the missing statement GUICtrlCreateTabitem ("") I have been working on the script using different versions of AutoIT Beta for 3.1.1.8x to 3.1.1.9x. Never was there this behauvior, because of the missing end statement ?? Anyhow I added the end statement end the behaviour is back to normal. Glad to have you around again Thanks for the help (Bedankt) Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
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