1) You don't need any batchfile.
You already use the
Shell.Exec function so you know how to use it. With that same function you can simply perform your 2 steps needed to create a PNG right from the scripting language. So instead of executing a batch file which executes some other command line tools on its turn, why not simply execute the two command line tools directly with the proper parameters using the Shell object?
However, you can also use the
Shell.Run for that. The reason it didn't worked at first is because you didn't used the function properly (you used it asyncroniously and thus it returned immediatly, thus before the PNG was created). For more information see the
Windows Script Documentation > Index > 'Run method'.
Also remember to always add the proper path strings to the filenames (and enclose them in quotes if you use those files as parameters).
2) Don't use the
WScript.Sleep() function!!!! This function will actually halt execution and will stop Messenger for a few milliseconds which can cause all sorts of bad things.
WScript.Sleep() is acceptable in standalone scripts which you run in Windows, but certainly not in an integrated scripting language.
Instead learn to use timers (see the
Plus! Scripting documentation).
Or, use
Shell.Run as I said in previous point. In that way you don't need to wait for the function to finish since the Run method has that build in by using a boolean parameter (see Windows Script Documention). However, I do recommend using
Shell.Exec, but as you have noticed it requires more programming and the proper use of timers.
But if you don't know how to use timers at this point, it is better to stick to the syncronious
Shell.Run method.
-----
3) About the inline editor;
Yes, you can use any editor you like since the scripts are simply open-source text files. But the integrated editor is not as limited as you think. There are a few options which will greatly help you. When you use an external editor you wont have those options or you need to constantly switch between windows.
a) Show the debug window below the editor. In that way you immediatly see if everything is ok and if there is an error you'll see immediatly on which line and what the error is.
b) Intellisense: Just like in the Visual Studio editor there is a IntelliSense option which shows you possible function names.
c) Collapsable functions (outlining), line numbering
d) When you save a script from the inline editor it is immediatly restarted. However, there is a registry option for Messenger Plus! which will also restart the script whenever something has changed in its source. In that way you could edit your script in an external editor and whenever you save the source the script is restarted in Messenger Plus!.
See
http://www.msgpluslive.net/help/registry/ and look for the
ScriptDebugReloadOnChange setting.
So, first turn on debugging mode:
Plus! > Preferences & Options > General > Scripts > Enable debugging options
Then in the inline scripting editor go to the Options menu and turn on all the available options.
All in all I do recommend learning to use the inline editor though. Because especially debugging will be a lot easier and you don't need to switch between windows all the time.
3)4) There is an Interface Tester application, also made by Patchou. Using that tool you can immediatly see how your own created window will look like. You can download the Interface Tester here:
http://www.msgpluslive.net/scripts/browse/9/Tools...Script-Developers/