Sign in to follow this  
Followers 0
xzaz

Vertical border IE

27 posts in this topic

#1 ·  Posted (edited)

hi guys!

#include <GUIConstants.au3>
#include <IE.au3>

$oIE = ObjCreate("Shell.Explorer.2")
$serverweb = "http://netsoft"
$winw = 1024
$winh = 768
$Main_App = GUICreate('Label Application',$winw,$winh,0,0,$WS_POPUP)
$GUIActiveX = GUICtrlCreateObj($oIE, 5, 100, $winw-10, $winh-120)
GUISetBkColor(0xb5bab3)
GUISetState (@SW_SHOW)

$oIE.navigate($serverweb)
$oIE.document.body.scroll = "no"
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Exit

(ofcourse) is searched the forum for answers and this would be the correclty answer, but the scrollbar isn't going away. And is there a way to get rid of the "3d" border? Someone got any ideas?

Edited by xzaz

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

certainly you can set a local files body border and scroll properties, but i couldn't get a remote url to do it.

here is a workaround....there's probably a better way

#include <GUIConstants.au3>
#include <IE.au3>

$oIE = ObjCreate("Shell.Explorer.2")
$serverweb = "http://google.com"
$winw = 800
$winh = 600
$Main_App = GUICreate('Label Application',$winw,$winh,-1,-1)
$GUIActiveX = GUICtrlCreateObj($oIE, 5, 100, $winw-10, $winh-120)
GUISetBkColor(0xb5bab3)
GUISetState (@SW_SHOW)
$oIE.navigate("about:blank")

;$oIE.navigate($serverweb)
$oIE.document.body.style.border="0"
$oIE.document.write("<body style='border:0'><iframe scrolling=no frameborder=0 src =" & $serverweb & " width=100% height=100%></iframe></body>")
$oIE.navigate($serverweb)

$oIE.refresh
$oIE.document.body.scroll = "no"

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

btw, #include <IE.au3> is a different thing than using ObjCreate("Shell.Explorer.2") ...check the help files for more on that...

Edited by Will66

Share this post


Link to post
Share on other sites

well tnx, I know i was searching the forum and some guys used IE2.au3 but couldn't find the UDF anyware. Hope that DaleHohm could take a look at it. Tnx anway, i'm gonna use this.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$oIE.document.body.scroll = "no" after the document load is complete

#include <GUIConstants.au3>
#include <IE.au3>

$oIE = ObjCreate("Shell.Explorer.2")
$serverweb = "http://www.autoitscript.com"
$winw = 600
$winh = 768
$Main_App = GUICreate('Label Application',$winw,$winh,0,0,$WS_POPUP)
$GUIActiveX = GUICtrlCreateObj($oIE, 5, 100, $winw-10, $winh-120)
GUISetBkColor(0xb5bab3)
GUISetState (@SW_SHOW)

$oIE.navigate($serverweb)
_IELoadWait($oIE)
$oIE.document.body.scroll = "no"
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Exit

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

$oIE.document.body.scroll = "no" after the document load is complete

#include <GUIConstants.au3>
#include <IE.au3>

$oIE = ObjCreate("Shell.Explorer.2")
$serverweb = "http://www.autoitscript.com"
$winw = 600
$winh = 768
$Main_App = GUICreate('Label Application',$winw,$winh,0,0,$WS_POPUP)
$GUIActiveX = GUICtrlCreateObj($oIE, 5, 100, $winw-10, $winh-120)
GUISetBkColor(0xb5bab3)
GUISetState (@SW_SHOW)

$oIE.navigate($serverweb)
_IELoadWait($oIE)
$oIE.document.body.scroll = "no"
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Exit

Dale

I swear i put scroll = no on that position once, but it didn't worked. Well anyways tnx :) <3

Share this post


Link to post
Share on other sites

The _IELoadWait($oIE) is the key.

Sorry I didn't highlight that as I could have.

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

Unfortunately, I don't understand what you are trying to get rid of. I see no 3d effects.

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)

Posted Image

That "3D" effect.

Alsow when i connect localy to my webserver, the border is still there. Wierd XD

Edited by xzaz

Share this post


Link to post
Share on other sites

The only 3d effect I see is in the Google logo... you don't mean that do you? It is in the graphic image.

Regarding the local file, the DOM does not care what the source of the document is... there is something else diffent in the scenario that is causing that -- you'll need to provide an example.

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

#11 ·  Posted (edited)

Sry for beeing so short, i will make it clear:

Posted Image

Its the border arround "GUICtrlCreateObj($oIE, 5, 100, $winw-10, $winh-120)"

This is the simple html/css file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css"><!--body {   background-color: #9CCE2E;}--></style></head><body>This is a test </body></html>

Edited by xzaz

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>
#include <IE.au3>

$oIE = ObjCreate("Shell.Explorer.2")
$serverweb = "http://www.google.com"
$winw = 600
$winh = 768
$Main_App = GUICreate('Label Application',$winw,$winh,0,0)
$GUIActiveX = GUICtrlCreateObj($oIE, 5, 100, $winw-10, $winh-120)
GUISetBkColor(0xb5bab3)
GUISetState (@SW_SHOW)

$oIE.navigate($serverweb)
_IELoadWait($oIE)
$oIE.document.body.scroll = "no"
$oIE.document.body.style.border = 0

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

Share this post


Link to post
Share on other sites

$oIE.document.body.scroll = "no"
$oIE.document.body.style.border = 0
Right. It's part of the page style sheet. There are margins and border that affect the appearance. Debug Bar (and other tools) make it easy to examine the style sheet,

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

#14 ·  Posted (edited)

Hey Dale,

off topic:

_IEFormElementCheckBoxSelect ( ByRef $o_object, $s_string [, $s_name = "" [, $f_select = 1 [, $s_mode = "byValue" [, $f_fireEvent = 1]]]] )

One can't use the above function without knowing the value attribute.

If i already now the checkbox name...but not the value or value is empty....eg <input type=checkbox value="" name="mycheckbox" checked>

As a workaround:

$oForm = _IEFormGetObjByName ($oIE, "timesheet")

$oText = _IEFormElementGetObjByName ($oForm, $fieldname)

$oText.checked = "checked"

Edited by Will66

Share this post


Link to post
Share on other sites

Hey Dale,

off topic:

Better to start a new topic but...

That is what the byIndex parameter it for. Checkboxes come in groups of the same name. If there is only one with a particular name, its index is 0.

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

MSDN. See my sig.


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

#18 ·  Posted (edited)

Sry for being such a pain, but this works not the way i want it. With www.google.com it works great, but when i use a html file (just a standard blank html file) the borders and the "3d" effect don't go away. And i can't figure it out why.

[css]

html,body{

border: none;

}

[/css]

dosn't seems to work, should it?

Edited by xzaz

Share this post


Link to post
Share on other sites

Sry for being such a pain, but this works not the way i want it. With www.google.com it works great, but when i use a html file (just a standard blank html file) the borders and the "3d" effect don't go away. And i can't figure it out why.

[css]

html,body{

border: none;

}

[/css]

dosn't seems to work, should it?

<style>

body {border:0;}

</style>

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

<style>

body {border:0;}

</style>

Sry to disapoint you, but that doesn't seems to work. I think its because its a embedded IE window.

Something like this:

<script type="text/javascript">
document.body.style.border='none' 
</script>

Doesn't working either.

edit:

http://www.google.nl/search?hl=nl&clie...oeken&meta=

LOL @ 3th link

Edited by xzaz

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