cramaboule Posted December 28, 2010 Share Posted December 28, 2010 (edited) Hello all,Just a small example on how I managed to get TinyMCE into AutoIt.1. Download TinyMCE and unzip it. http://tinymce.moxiecode.com/download/download.php2. Copy the HTML code to make the 'TinyMCE.html'expandcollapse popup<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head> <script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js" ></script > <script type="text/javascript"> tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "emotions,spellchecker,advhr,insertdatetime,preview", // Theme options - button# indicated the row# only theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect", theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true }); function getText() { var y = tinyMCE.get('content').getContent(); window.clipboardData.setData('Text',y) //alert(y); } </script> </head> <body> <form name="test" METHOD="POST"> <textarea name="content" cols="50" rows="15" > This is some content that will be editable with TinyMCE. </textarea> </form> <input name="123" id="123" type="submit" value="123" onclick="getText()"> </body>3. Copy the au3 code #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #Include <IE.au3> $oIE =_IECreateEmbedded () Global $infos GUICreate("test", 500, 500) GUICtrlCreateObj($oIE, 2, 5, 495, 450) $button=GUICtrlCreateButton("validate", 2,460,80,30) Global $Button_Next= GUICtrlCreateButton("Ok",500,620,100,40) GUISetState() _IENavigate($oIE, "C:\testau3\TinyMCE.html") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button $obutt = _IEGetObjByName($oIE, "123") _IEAction($obutt ,"click") Sleep(5) $clipboard=ClipGet() MsgBox(0,"", $clipboard) EndSelect WEnd Exit4. Change the path in the html file according to your folder you unzipped TinyMCE. <script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js" ></script >5. Change the path in the au3 file according to your folder where your 'TinyMCE.html' is. _IENavigate($oIE, "C:\testau3\TinyMCE.html")That's it !!! Edit: add picture Edited December 29, 2010 by cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
hench Posted December 29, 2010 Share Posted December 29, 2010 oh wow, got a project that was missing this little magic trick!! Thanks for sharing! Link to comment Share on other sites More sharing options...
cramaboule Posted December 29, 2010 Author Share Posted December 29, 2010 No Problem, hench ! I know, it is a bit wired to copy paste into the clipboard... but that's the only way to do it easily ! Cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
hench Posted January 2, 2011 Share Posted January 2, 2011 Hehe, I don't mind the copypasting, it keeps the reflexes up and running Bonne année, et vive la Suisse! hench Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now