Jump to content

Embedded IE/ActiveX


Spogie
 Share

Recommended Posts

I have been working on a script (and for security purpose change the websites, but they still react the same).

I am trying to create a fix tab browser with no extras.

Using the basic code

$tab3=GUICtrlCreateTabitem ("tab name")
$oIE3 = _IECreateEmbedded ()
$GUIActiveX = GUICtrlCreateObj($oIE3, 10, 35, 998, 720)
_IENavigate ($oIE3, "http://some.website.com/",0)oÝ÷ Ù8^Ë.zËZÛ-«Hq©ç¢Ûzk-¢ënëm¢{(Ç­Èij¬è(¢ ^jwm«b|µª]~ØZ¶Zvȧ¶axIyÙج©à²Ø^±©©æÞ0Yl¢Øh~Ø^±è¬²ç¬jëh×6#NoTrayIcon
#include <GUIConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister ()

GUICreate("Test Tool Browser",1024,768)
GUISetFont(9, 300)
$tab=GUICtrlCreateTab (10,10, 1000,677)

ProgressOn ("Test Tool Browser","Loading...","Initialing Startup",-1,-1,16)
$m=6
$n=1
func pro($nam)
    $a=$n/$m*100
    ProgressSet ($a,$nam)
    $n=$n+1
    sleep (250) ;for visualization only
EndFunc

pro("Google")
   $tab0=GUICtrlCreateTabitem ("Google")
   $oIE = _IECreateEmbedded ()
   $GUIActiveX = GUICtrlCreateObj($oIE, 10, 35, 998, 720)
   _IENavigate ($oIE, "http://www.google.com",0)

pro("DogPile")
   $tab1=GUICtrlCreateTabitem ("DogPile")
   $oIE1 = _IECreateEmbedded ()
   $GUIActiveX = GUICtrlCreateObj($oIE1, 10, 35, 998, 720)
   _IENavigate ($oIE1, "http://www.dogpile.com/",0)

pro("Wikipedia")
   $tab2=GUICtrlCreateTabitem ("Wikipedia")
   $oIE2 = _IECreateEmbedded ()
   $GUIActiveX = GUICtrlCreateObj($oIE2, 10, 35, 998, 720)
   _IENavigate ($oIE2, "http://en.wikipedia.org/wiki/Main_Page",0)

pro("IMDB")
   $tab3=GUICtrlCreateTabitem ("IMDB")
   $oIE3 = _IECreateEmbedded ()
   $GUIActiveX = GUICtrlCreateObj($oIE3, 10, 35, 998, 720)
   _IENavigate ($oIE3, "http://www.imdb.com/",0)

pro("US People Search")
   $tab4=GUICtrlCreateTabitem ("US People Search")
   $oIE4 = _IECreateEmbedded ()
   $GUIActiveX = GUICtrlCreateObj($oIE4, 10, 35, 998, 720)
   _IENavigate ($oIE4, "http://www.usa-people-search.com/?view=PE&advanced=1",0)

pro("W4 Form")
   $tab5=GUICtrlCreateTabitem ("W4 Form")
   $oIE5 = _IECreateEmbedded ()
   $GUIActiveX = GUICtrlCreateObj($oIE5, 10, 35, 998, 720)
   _IENavigate ($oIE5, "www.irs.gov/pub/irs-pdf/fw4.pdf",0)

ProgressOff ()

GUICtrlSetState(-1,$GUI_SHOW)
GUISetState ()

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

All of the search pages seem not to work for me (links do work, but buttons do not)

and the last tab (the pdf) hangs the script, but will resume if i flush acrobat.exe, and the embedded object is empty.

Are there limitation to embedded size? Frame or Form issues with the IE.au3?

Help/Feedback is greatly appreciated.

Link to comment
Share on other sites

im gonna take a look and see whats going on and see if i can help

all the buttons work fine for me, i would suggest that you not use tabs if possible that may reslove the problem, and i'm on XP SP2 some OS's and IE ver's may give a different outcome.... I have IE 6.0

Edited by DBak

[center][/center]

Link to comment
Share on other sites

im gonna take a look and see whats going on and see if i can help

all the buttons work fine for me, i would suggest that you not use tabs if possible that may reslove the problem, and i'm on XP SP2 some OS's and IE ver's may give a different outcome.... I have IE 6.0

I am putting this together at work with some work tools, and thats why I notices the google (and others) search button on the form does not seem to respond; links are fine. I am also using IE6, XPSP2, latest ver of AutoIt. I am behind a corp firewall and normal IE and firefox have no problems with the websites/pdf.

I have stripped the code down to the gui window, and embedded IE (no tabs or anything else), same issue. If you done have a problem with the code, then I am to believe the corp firewall/proxy may have an impact on it (i hope not)

Edited by Spogie
Link to comment
Share on other sites

When you say "the buttons don't work" do you mean that clicking on the "Google Search" button does nothing? It works for me.

I don't know what the issue is with the PDF... your script is still running (the event loop is still trying to process events - #AutoIt3Wrapper_run_debug_mode=Y will prove this) but it appears taht GUI events are no longer being generated.

My guess would be that the acrobat plugin is stealing focus and preventing the GUI from functioning. You'll find some discussions in the forum of GUICtrlCreateObj and focus, but I'm not sure what to suggest.

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

Link to comment
Share on other sites

Ya, the buttons in google, and other pages seems not to respond. With the pdf, I think it may not be a focus issue, but more of a memory issue. It locks up the script, until i kill the "acrobat.exe"task, and then the GuiObj just remains empty.

Oh well, I will have to play with it more. TY

Link to comment
Share on other sites

Not sure what kind of a "memory issue" you are implying. The GUI interface quits sending events to the script, but the script itself is still humming away trying to process events that don't ever arrive (again, #AutoIt3Wrapper_run_debug_mode=Y will prove this to you).

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...