===
-The only graphics in combination with TSE I have seen was a New Year greeting macro from Carlo. I have not looked in the details. But it looked really nice and was a big surprise that was possible. So you never know ;-)
===
-So probably one has to stick to using workarounds:
===
PROC Main()
StartPgm( "yourExternalPictureViewer.exe", "yourPictureFilename.jpg" )
END
===
or similar
PROC Main()
Dos( "yourExternalPictureViewer.exe yourPictureFilename.jpg" )
END
===
If wanting to combine TSE with passive HTML (browser), one can get much more control by embedding ('active') JavaScript in HTML.
That should maybe not be so difficult, but indeed one has to look a bit more at that program language, which might be a barrier.
To start with write the following in TSE
PROC Main()
EditFile( "c:\foo.htm" )
AddLine( "<SCRIPT>" )
AddLine( 'alert( "Hello world" );' )
AddLine( "</SCRIPT>" )
SaveFile()
StartPgm( "c:\foo.htm" )
END
save it as "c:\bar.s",
compile it,
and there you are controlling your browser already a bit more.
Similar you could create almost any program (be it HTML, JavaScript, Perl, Python, Ruby, Java, C++, Total Commander, other text editors (Emacs, ...), even TSE itself (use e.g. sc32.exe to compile that text, that will on th fly create a new macro), ...) by printing (e.g. to file) (using e.g. AddLine()) the source code.
This method is a special case of the 'automatic program generation technique' (that is just 'print your source code to file' using some tool). And I use that method a lot to use TSE to control other programs.
Any program that has a text language (e.g. script language do by design) and allows to be started from the outside world (e.g. the command line) can be controlled like that from TSE.
You could thus similarly even print from TSE your own picture viewer program in e.g. JavaScript and e.g. HTML that way, and control it (a bit more).
So combining the best of both or all worlds.
with friendly greetings,
Knud van Eeden
proc main()
lReplace("^.*$",'<img src="\0"><br>\0<br>',"gnx")
BegFile()
InsertLine("<html><head><title>Pictures</title></head>")
AddLine('<body bgcolor="#FFFFF8"><center>')
EndFile()
AddLine("</center></body></html>")
// SaveAndQuitFile()
// AbandonEditor()
end
My problem is in CREATING that list, but that's in another thread.
Just run the "capture.mac" macro.
menu Macro > Execute then type
capture dir c:\*.jpg
that will load in the editor a listing of all .jpg files in c:\.
In a macro itself you can use
ExecMacro( "capture dir c:\*.jpg" )
then edit that page further.
And so on...
with friendly greetings,
Knud van Eeden