Zebulon Posted December 17, 2006 Posted December 17, 2006 Hello to all! I'm still have the problem getting mathons actuall tabs url. with the followng code in get back the url of the first tab from the left hand side. #include <IE.au3> Opt("WinTitleMatchMode", 2) $aTitle = "- Maxthon Browser" Do Sleep(10) Until WinExists($aTitle) $oHandle = WinGetHandle($aTitle) WinActivate($oHandle) $aHandle = _IEAttach ($oHandle, "HWND") $uRL = _IEPropertyGet ($aHandle, "locationurl") MsgBox(0, "Actuall Tab's URL", $uRL ) but this is not the actuall tab. anyone a solution?? I nearly have a nervous breakdown. many thx in advance greetings from Germany Zebulon
martin Posted December 17, 2006 Posted December 17, 2006 Hello to all!I'm still have the problem getting mathons actuall tabs url. with the followng code in get back the url of the first tab from the left hand side.#include <IE.au3>Opt("WinTitleMatchMode", 2)$aTitle = "- Maxthon Browser"Do Sleep(10)Until WinExists($aTitle)$oHandle = WinGetHandle($aTitle)WinActivate($oHandle)$aHandle = _IEAttach ($oHandle, "HWND")$uRL = _IEPropertyGet ($aHandle, "locationurl")MsgBox(0, "Actuall Tab's URL", $uRL ) but this is not the actuall tab. anyone a solution??I nearly have a nervous breakdown.many thx in advancegreetings from GermanyZebulonI'm not familiar with IE. What do you mean by the first TAB? If you have have tabbed pages maybe you have a newer version of IE than mine? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Zebulon Posted December 17, 2006 Author Posted December 17, 2006 I'm not familiar with IE. What do you mean by the first TAB? If you have have tabbed pages maybe you have a newer version of IE than mine?Hello Martin,I use Maxthon. (www.maxthon.com) It's a browser substitut that is based on the M$-IE engine ( I still use ie6) but offers a lot of additional functions, for instance tabbed-browsing. I want to get back the actuall shown tabs's url to write it into the registry-secure zone entry. with one mouse click.But i'm still fighting with the problem getting this damn url back. GreetingsZebulon
ptrex Posted December 17, 2006 Posted December 17, 2006 (edited) My favorite is AvantBrowser http://www.avantbrowser.com/Runs on IE7 as well.regardsptrex Edited December 17, 2006 by ptrex 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
DaleHohm Posted December 17, 2006 Posted December 17, 2006 I have never really grasped what you are trying to do. First, this code simply cannot work: $oHandle = WinGetHandle($aTitle) WinActivate($oHandle) $aHandle = _IEAttach ($oHandle, "HWND") $uRL = _IEPropertyGet ($aHandle, "locationurl") You are passing a window handle into the _IE functions and they require a COM object instead. You will get an InvalidDataType error. Can I restate your problem like this: ? I need to determine the current URL of ALL browser windows (they happen to be in tabs in a Maxthon browser) ? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Zebulon Posted December 17, 2006 Author Posted December 17, 2006 I have never really grasped what you are trying to do. First, this code simply cannot work: $oHandle = WinGetHandle($aTitle) WinActivate($oHandle) $aHandle = _IEAttach ($oHandle, "HWND") $uRL = _IEPropertyGet ($aHandle, "locationurl") You are passing a window handle into the _IE functions and they require a COM object instead. You will get an InvalidDataType error. Can I restate your problem like this: ? I need to determine the current URL of ALL browser windows (they happen to be in tabs in a Maxthon browser) ? Dale Hi Dale, you confirmed my thougt about the com-object and the _IE functions. I really got a InvalidDataTypeError. (A lot to lern!! ;-)) I try to restate my problem tu use your words: I need to determine the URL of the currently shown (active) tab-window in Maxthon Browser. All the windows are shown in tabs like in ff or new IE7. BUT i really need only the URL of the active tab that I can see. If I have 35 tabs open, and in tab 20 the URL of, for instance "www.autoitscript.com" is shown, I need this URL to do something with it (write it into the registry - secure zone entry) I managed to determine the URL of the 1st tab (left hand side) but this is only a little success for me. Thanks 4 helping Zebulon
DaleHohm Posted December 17, 2006 Posted December 17, 2006 So the real challenge is getting a reference to the browser embedded in the active Maxthon tab. Will that control also have window/keyboard focus at the time you want to do this? I don't know how to do this in IE7 either -- I have asked in Microsoft forums how to set the active tab and this would be an extention of that -- but I have received no reply and have found no documentation pointing to any functions that help. WHY are you trying to do this? If I knoew a little more about your use case I might be able to offer something. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Zebulon Posted December 17, 2006 Author Posted December 17, 2006 So the real challenge is getting a reference to the browser embedded in the active Maxthon tab.Will that control also have window/keyboard focus at the time you want to do this?I don't know how to do this in IE7 either -- I have asked in Microsoft forums how to set the active tab and this would be an extention of that -- but I have received no reply and have found no documentation pointing to any functions that help.WHY are you trying to do this? If I knoew a little more about your use case I might be able to offer something.DaleHello Dale,> Will that control also have window/keyboard focus at the time you want to do this?Yes - the actuall tab has window/keyboard focus.The reason I try to do this I very simple to explain. Some pages one has to enter into M$'s internet secure zone to make them work all right. It's ok but very unhandy to handle. Copy the actuall URL into clipboard, open internet options, secure zone and copy the URL into the list.So I try to code a sript to do all these steps with one mouse-click.May be there is already a tool for that. But don't mind, I would like to have a try with autoit.GreetingsZebulon
DaleHohm Posted December 17, 2006 Posted December 17, 2006 > So I try to code a sript to do all these steps with one mouse-click. With one mouse click on what? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Zebulon Posted December 17, 2006 Author Posted December 17, 2006 > So I try to code a sript to do all these steps with one mouse-click.With one mouse click on what?DaleI inserted a new plug-in for mython, that means a new button/icon in Maxthon's plug-in-toolbar. but the button is without functionallity so far.Thr script I want to code with AutoIt will be compiled to an exe-file and associated with the button. This already works with a dummy exe-file.
DaleHohm Posted December 18, 2006 Posted December 18, 2006 (edited) I inserted a new plug-in for mython, that means a new button/icon in Maxthon's plug-in-toolbar. but the button is without functionallity so far.Thr script I want to code with AutoIt will be compiled to an exe-file and associated with the button. This already works with a dummy exe-file.OK, you may want to investigate the Maxthox API docs to see if they give you any help.In the mean time, I've looked at the IE tabbed implementation and I discovered that where the main browser window control used to be called "Internet Explorer_Server1", we now have "Internet Explorer_Server2", "Internet Explorer_Server3" etc. based on the multiple tabs. This may give use some tools to manipulate them.Can you please check Maxthon to see if it uses the same control names? Use "AutoIt Window Info" from the AutoIt start menu program group and look at the information under "Control under mouse".thanks,DaleEdit: typo Edited December 18, 2006 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Zebulon Posted December 18, 2006 Author Posted December 18, 2006 OK, you may want to investigate the Maxthox API docs to see if they give you any help.In the mean time, I've looked at the IE tabbed implementation and I discovered that where the main browser window control used to be called "Internet Explorer_Server1", we now have "Internet Explorer_Server2", "Internet Explorer_Server3" etc. based on the multiple tabs. This may give use some tools to manipulate them.Can you please check Maxthon to see if it uses the same control names? Use "AutoIt Window Info" from the AutoIt start menu program group and look at the information under "Control under mouse".thanks,DaleEdit: typoHi Dale,the autoit window info says:Press CTRL-ALT-F to freeze the display.>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Maxthon, actuall tab's url? 2nd try - AutoIt Forums - Maxthon BrowserClass: IEFrameSize: X: -4 Y: -4 W: 1032 H: 742>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 489 Y: 176Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0x4399E4 Dec: 4430308>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 0 Y: 121 W: 1024 H: 43Control ID: 59394ClassNameNN: SysTabControl321Text: Style: 0x5400CE60ExStyle: 0x00000000tha Maxthons API-Docs I first have to look for.I'll drop you some lines ASAP.CUZebulon
DaleHohm Posted December 18, 2006 Posted December 18, 2006 Thanks, but I should have been more explicit in my instructions. I need the control information when the mouse is poised over the main window containing the HTML document, not the tab itself. I'm interested in the control info for the document contained in multiple tabs. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Zebulon Posted December 18, 2006 Author Posted December 18, 2006 Thanks, but I should have been more explicit in my instructions. I need the control information when the mouse is poised over the main window containing the HTML document, not the tab itself. I'm interested in the control info for the document contained in multiple tabs.DaleThis is an actuall shot with the mouse cursor poised directly in the middle of the window with the html-text:Press CTRL-ALT-F to freeze the display.>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Welcome to the MSDN Library - Maxthon BrowserClass: IEFrameSize: X: -4 Y: -4 W: 1032 H: 742>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 628 Y: 510Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0xFFFFFF Dec: 16777215>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 26 Y: 188 W: 996 H: 496Control ID: 59648ClassNameNN: Afx:400000:852Text: Style: 0x50000000ExStyle: 0x00000000(Control is hidden)>>>>>>>>>>> Status Bar Text <<<<<<<<<<<(1): Fertig(2): (3): 1235(4): (5): (6): (7): 192.168.178.21(8): 0 Byte(9): 473M(10): 52>>>>>>>>>>> Visible Window Text <<<<<<<<<<<SucheSuchehttp://msdn.microsoft.com/library/default....g/objectmap.asphttp://msdn.microsoft.com/library/default....g/objectmap.aspFertigList1List2Welcome to the MSDN Library??Because of the API-Docs I've send a mail to the developer-team.Cu :-)
DaleHohm Posted December 18, 2006 Posted December 18, 2006 OK, I'm guessing it is a custom control and is different than what IE7 does. Please let us know what you learn from Maxthon. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
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