Sign in to follow this  
Followers 0
DarkAngel

Need help with IE obj.

9 posts in this topic

while creating the normal IE obj in forms by _iecreateembedded() function, is there anyway of disabling the right click ? The right click can be blocked by using the js script in the <head></head> tags . But how to do it here ? Any ideas ? Can the source code of the function be altered in a way so that the default page used in the example scripts can have js in the head tags ?

thanks :)

Share this post


Link to post
Share on other sites



See _IEHeadInsertEventScript and here for an example of what you want:

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I did something like this .

Global $oIE = _IECreateEmbedded()

Global $history = GUICtrlCreateObj($oIE, 24,40, 610, 288)

_IEHeadInsertEventScript($oIE, $history, "oncontextmenu", "return false")

and i get the following error messages

C:\Program Files\AutoIt3\Include\ie.au3 (2178) : ==> Variable must be of type "Object".:

Local $o_head = $o_object.document.all.tags("HEAD" ).Item(0)

Local $o_head = $o_object.document^ ERROR

:)

Edited by DarkAngel

Share this post


Link to post
Share on other sites

You must first use _IENavigate - see the remarks for _IECreateEmbedded

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks .. :) Till now i wasnt aware that css can be used with embedded IE ... It works like a charm !!

Theres one more thing i would like to know ..

i was doing a google search in a embedded IE and i wanted the loader gif to show till the page gets completely loaded.

I did something like this .

$body=_IEBodyReadHTML($oIE2)

_IEBodyWriteHTML($oIE2,$body & '<br><br><center><img src="loader.gif" ></center>')

Sleep(2000)

$AVSite = "http://www.google.com/search?hl=en&q=" & $search & ""

_IENavigate($oIE2,$AVSite)

_IELoadWait($oIE2)

However the desired idea doesnt work. The Gif shows for a sec and then there is a blank screen ( i use dialup so the net is a bit slow ) and then the page loads after some time .

Any ideas ? Can mutiple tabs each running ie instances be run as seperate processes ?

Edited by DarkAngel

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

So, the Gif is shown for 2 seconds, right? The length of your Sleep? Then the page blanks when the _IENavigate begins. Not certain what you expected to happen... an embedded IE control works pretty much like regular IE.

Say more about what you are trying to accomplish and then perhaps someone will have other ideas for you.

Dale

Edited 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

Share this post


Link to post
Share on other sites

Errr here's what i want : The gif to show till the page is completely loaded(maybe somewhere in temp) and then the page to be displayed .

Heres what i achieved : The gif shows for a sec .. then freezes .. then the screen turns blank and then exactly after 4 secs the page loads up.

During this entire time my other tabs remains inactive so thats the reason i was asking if the tabs can be executed as seperate processes . :)

Share this post


Link to post
Share on other sites

Why? Certainly can be done, done but seems like a lot of trouble to go to. Why not try Slpash*On functions?

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

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

i was doing a google search in a embedded IE and i wanted the loader gif to show till the page gets completely loaded.

I did something like this .

$body=_IEBodyReadHTML($oIE2)

_IEBodyWriteHTML($oIE2,$body & '<br><br><center><img src="loader.gif" ></center>')

Sleep(2000)

$AVSite = "http://www.google.com/search?hl=en&q=" & $search & ""

_IENavigate($oIE2,$AVSite)

_IELoadWait($oIE2)

However the desired idea doesnt work. The Gif shows for a sec and then there is a blank screen ( i use dialup so the net is a bit slow ) and then the page loads after some time .

 

Sorry for opening an old thread but does anyone found a solution for this problem?

Edited by webxt

Share this post


Link to post
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
Sign in to follow this  
Followers 0