Jump to content

[Resolved]_IE functions: Deal with in-frame editor


Recommended Posts

Hello all,

I'm making a utility to post something to blog, forum. Thank god i did it, i can post to there.

But problem comes out when I'm making text area for type text to post, but the edit control of GUI is too simple, some rich edit require dll and don't perfect also.

I'm going to use editor of blog (Like editor right now I'm typing to you) and here it's: http://space.livevn.com/editor.php?charset...&allowhtml=

I make a IE object and navigate it to here, run the GUI, and ... wow, you can type into it like you are in blog but problem is... HOW can i get data from this text area? Of course It should includes same format to post same format to blog.

How can i do it?

Thanks,

$ieInput = _IECreateEmbedded()
$EditorGUI = GUICtrlCreateObj ( $ieInput,40, 360 , 450 , 225 )
$ieInput.navigate("http://space.livevn.com/editor.php?charset=utf-8&allowhtml=")
_IELoadWait($ieInput)
$ieInput.document.body.Scroll = "no"
Edited by nguyenbason
UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

The text is located within the iframe HtmlEditor. You will have to drill down to it.

You will want to get a handle to the tag that contains the text then use something like IEFormElementGetValue.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

The text is located within the iframe HtmlEditor. You will have to drill down to it.

You will want to get a handle to the tag that contains the text then use something like IEFormElementGetValue.

You're on the right track, but...

#include <IE.au3>
$oIE = _IECreate("http://space.livevn.com/editor.php?charset=utf-8&amp;allowhtml=")
$oEditor = _IEFrameGetObjByName($oIE, "HtmlEditor")
_IEBodyWriteHTML($oEditor, "The time has come for all good men to come to the aid of their country.")

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

Thanks for your reply Dale,

But as i said on first post. I can write to it that why i can post to blog.

Look at this:

Posted Image

You can see editor in my program, my question is: When users write data to this editor, how can i get it to post to blog?

The text is located within the iframe HtmlEditor. You will have to drill down to it.

You will want to get a handle to the tag that contains the text then use something like IEFormElementGetValue.

Tried but don't work. Can you give a example with above link?
UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

Not sure I understand your question. You want to figure out how to get the text OUT of the editor to post it somewhere else?

$sHTML = _IEBodyReadHTML($oEditor)

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

Not sure I understand your question. You want to figure out how to get the text OUT of the editor to post it somewhere else?

$sHTML = _IEBodyReadHTML($oEditor)

Dale

Yes, that's what i want and $sHTML = _IEBodyReadHTML($oEditor) is working too. I'm asking myself that why yesterday i tried but i didnot work

Thank so much Dale,

UnderWorldVN- Just play the way you like it
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...