Jump to content
Sign in to follow this  

AutoIt Inputting Content Into IFRAME

Recommended Posts


The title basically explains what I need and am beyond frustration at trying to figure this one out... is there anyway I can input text into an IFRAME (specifically an FCKEditor instance, using autoit's "ie.au3" library)??? I think this should be very simple to do, but am pulling my hair out - the project I am working on is 100% complete except for this very minor detail (and giving up is not an option this late in the game heh).

I posted a similar thread a few weeks ago but nobody seemed to know anything about the matter. I have tried a lot of different things, such as just removing the iframe instance and putting a textarea with the correct name in the HTML. Guess what? IE errors with some weird errors that make no sense whatsoever (considering what it is erroring about wasn't altered at all in the actual html). Firebug works perfectly for this solution, but I don't know why its not working in IE....

All I need is a way to click the stupid iframe. I have tried "_IEAction" and using "click" and "focus" to no success. I cannot use a mouseclick because the client needs the window minimized while the script is running.

EDIT: For those who don't know, FCKEditor is one of the popular WYSIWYG javascript editors.

Edited by Sonolin

Share this post

Link to post
Share on other sites

Here's an example:

#include <IE.au3>

$oIE = _IECreate("[url="http://www.fckeditor.net/demo"]http://www.fckeditor.net/demo[/url]", 1)
$oFrame = _IEFrameGetCollection($oIE, 1)
$oFrameEdit = _IEFrameGetCollection($oFrame, 0)
;ConsoleWrite(_IEBodyReadHTML($oFrameEdit) & @CRLF)
_IEBodyWriteHTML($oFrameEdit, "You are using <A href='http://www.autoitscript.com/'>AutoIt</A>.")


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

Thank you very much, it worked as expected. I didn't think of that at all >_

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