Sign in to follow this  
Followers 0
Vindicator209

Edit header html?

12 posts in this topic

How would I change the html of a header of a webpage?

_IEwritehtml or whatever only writes between the body tags...


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites



Where might I find that?


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

uhh.... well I see alot of socket and server stuff, but what I need is editing the html of a webpage.... mind pointing me to where in this UDF that does that for me? thanks.


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

I'm making a little chat program to run IE objects with a chat website, and everyone's name is colored red using css styles. I want to make them blue.

<style type=text/css>

a {color: blue; text-decoration: none;}

a.admin { color: red; text-decoration: none;}</style>

<body starts here>


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

WOW

This is the most stupid overlook I have EVER HAD.

_IEDocReadHTML does what I need.

As opposed to _IEBodyReadHTML

Thanks for your help anyway


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

I lied. rewriting the html doesn't allow it to still be read as if it were loaded on the website (ex. "smile.gif" won't show up anymore, since it doesn't have the full address)


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

I'm making a little chat program to run IE objects with a chat website, and everyone's name is colored red using css styles. I want to make them blue.

<style type=text/css>

a {color: blue; text-decoration: none;}

a.admin { color: red; text-decoration: none;}</style>

<body starts here>

I've just been messing about with something similar to hide scrollbars:

$oIE.document.body.style.overflow = 'hidden'
$oHTMLs = _IETagNameGetCollection($oIE, "html")
For $oHTML In $oHTMLs
    $oHTML.style.overflow = 'hidden'
Next

so perhaps for your example:

$oIE.document.body.a.admin.style.color = 'blue'

or similar...

(my css is a little rusty, so I could be completely out)

Share this post


Link to post
Share on other sites

_IEDocWriteHTML should still work with your graphics and such.

Another way to attack it would be

$oStyle = _IETagnameGetCollection($oIE, "style", 0) ; assuming this is the first style tag

$sStyle = _IEPropertyGet($oStyle, "innerhtml")

_IEPropertySet($oStyle, "innerhtml", StringReplace($sStyle, "red", "blue")

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

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