lsakizada Posted February 7, 2007 Share Posted February 7, 2007 (edited) I am trying to understand whether its will be possible to embed any script interpretor such as Ruby, perl inside an edit control. Doe's someone did it before with any kind of script interpretor? I am actually trying to accomplish a tool that would be able to use interpretor inside autoit. Thanks Edited February 8, 2007 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
DaleHohm Posted February 7, 2007 Share Posted February 7, 2007 Search the forums for "ScriptControl". You'll find examples with Javascript -- same can be done with vbscript and perlscript (if you have activestate installed) and ant other installed languages that support the ActiveX Scripting Specification. 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 More sharing options...
lsakizada Posted February 8, 2007 Author Share Posted February 8, 2007 Thanks DaleHohm!Search the forums for "ScriptControl".I was aware of the interpreter engine but I did not know it's name.Yes this certainely can help to embed language scripting into autoit.I am trying to figure how how to use perl and other scripting engines beside of Jscript and VBScriptsince I need multithread environment.I will be glad If anyone else knows which other script engine can do this job. Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
nobbe Posted February 8, 2007 Share Posted February 8, 2007 (edited) hii have done some test with perl toothe perl evalutation code needs to be all in ONE line which is hard to read now so far i guess its only good for little script helps , but not to integrate BIG perl programs.. if you use a PM Module its not such a problem , can be called from the embedded perl too.perl and autoit variables can be exchanged now nicely.more information here http://thomaslauer.com/comp/Calling_PerlnobbeCODE#include <perl.au3>If (Not PerlInit ()) Then ; first thing MsgBox(0, "", "Perl not found..."); ExitElse; my perl variable now.. PerlSetStr ("filename", 'test.wma')PerlEval ("use Audio::WMA;print ""("";print $filename;print "")\n"";$wma=Audio::WMA->new($filename);$info=$wma->info();$drm=$info->{drm};$tags=$wma->tags();$tt=$tags->{TITLE};$ta=$tags->{AUTHOR};$talb=$tags->{ALBUMTITLE};$t_year=$tags->{YEAR}")$tta = ps("ta") ; artist $ttt = ps("tt"); title $talbum = ps("talb");$year = ps("t_year");$tdrm = ps("drm")MsgBox(0, "From PERL", "artist =" & $tta & @CRLF & "title = " & $ttt & @CRLF & "Album = " & $talbum & @CRLF & "Year = " & $year & @CRLF & "DRM = " & $tdrm & @CRLF)PerlSetStr ("filename", 'test1.wma')PerlEval ("use Audio::WMA;$wma=Audio::WMA->new($filename);$info=$wma->info();$drm=$info->{drm};$tags=$wma->tags();$tt=$tags->{TITLE};$ta=$tags->{AUTHOR};$talb=$tags->{ALBUMTITLE};$t_year=$tags->{YEAR}")$tta = ps("ta") ; artist $ttt = ps("tt"); title $talbum = ps("talb");$year = ps("t_year");$tdrm = ps("drm")MsgBox(0, "From PERL", "artist =" & $tta & @CRLF & "title = " & $ttt & @CRLF & "Album = " & $talbum & @CRLF & "Year = " & $year & @CRLF & "DRM = " & $tdrm & @CRLF); exit Perl PerlExit () ; last thingEndIf Edited February 8, 2007 by nobbe Link to comment Share on other sites More sharing options...
DaleHohm Posted February 8, 2007 Share Posted February 8, 2007 I am trying to figure how how to use perl and other scripting engines beside of Jscript and VBScriptsince I need multithread environment.Regarding Perl, as I mentioned before, if you install the ActiveState Perl distribution you will get an ActiveX Scripting compliant variant of Perl installed called "perlscript". You can then use language=perlscript with the ScriptControl just as you do Javascript and VBScript (just like you can with ASP web pages).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 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