What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Basic Questions - LaTeX

Basic Questions - LaTeX
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Basic Questions - LaTeX
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/

;)

This post was edited on 06-17-2009 at 06:21 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-17-2009 05:54 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Basic Questions - LaTeX - by Flippy on 06-17-2009 at 09:14 AM
RE: Basic Questions - LaTeX - by ryxdp on 06-17-2009 at 09:26 AM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 09:48 AM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 10:01 AM
RE: Basic Questions - LaTeX - by NanaFreak on 06-17-2009 at 10:11 AM
RE: RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 10:14 AM
RE: Basic Questions - LaTeX - by NanaFreak on 06-17-2009 at 10:17 AM
RE: RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 10:25 AM
RE: Basic Questions - LaTeX - by NanaFreak on 06-17-2009 at 10:30 AM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 10:37 AM
RE: Basic Questions - LaTeX - by NanaFreak on 06-17-2009 at 10:51 AM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 10:59 AM
RE: Basic Questions - LaTeX - by Matti on 06-17-2009 at 12:07 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 12:23 PM
RE: Basic Questions - LaTeX - by Matti on 06-17-2009 at 01:49 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 02:41 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 03:07 PM
RE: Basic Questions - LaTeX - by CookieRevised on 06-17-2009 at 05:54 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 06:14 PM
RE: Basic Questions - LaTeX - by CookieRevised on 06-17-2009 at 06:36 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 07:38 PM
RE: RE: Basic Questions - LaTeX - by CookieRevised on 06-17-2009 at 08:27 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 08:32 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 08:38 PM
RE: Basic Questions - LaTeX - by NanaFreak on 06-17-2009 at 09:02 PM
RE: Basic Questions - LaTeX - by CookieRevised on 06-17-2009 at 09:27 PM
RE: Basic Questions - LaTeX - by Flippy on 06-17-2009 at 10:01 PM
RE: Basic Questions - LaTeX - by foaly on 06-17-2009 at 10:42 PM
RE: Basic Questions - LaTeX - by CookieRevised on 06-18-2009 at 01:42 AM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 11:29 AM
RE: Basic Questions - LaTeX - by NanaFreak on 06-18-2009 at 11:43 AM
RE: Basic Questions - LaTeX - by Matti on 06-18-2009 at 12:03 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 01:29 PM
RE: Basic Questions - LaTeX - by Matti on 06-18-2009 at 01:52 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 03:32 PM
RE: Basic Questions - LaTeX - by Matti on 06-18-2009 at 03:56 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 04:21 PM
RE: Basic Questions - LaTeX - by Matti on 06-18-2009 at 05:33 PM
RE: Basic Questions - LaTeX - by matty on 06-18-2009 at 05:36 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 05:47 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 06:11 PM
RE: Basic Questions - LaTeX - by Spunky on 06-18-2009 at 07:11 PM
RE: Basic Questions - LaTeX - by Matti on 06-18-2009 at 07:22 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 07:23 PM
RE: Basic Questions - LaTeX - by Flippy on 06-18-2009 at 08:10 PM
RE: Basic Questions - LaTeX - by CookieRevised on 06-19-2009 at 09:14 AM
RE: Basic Questions - LaTeX - by Matti on 06-19-2009 at 01:43 PM
RE: RE: Basic Questions - LaTeX - by CookieRevised on 06-19-2009 at 10:24 PM
RE: Basic Questions - LaTeX - by Flippy on 06-19-2009 at 02:31 PM
RE: Basic Questions - LaTeX - by sabian2008 on 07-30-2009 at 03:38 PM
RE: Basic Questions - LaTeX - by Flippy on 07-30-2009 at 04:36 PM
RE: Basic Questions - LaTeX - by sabian2008 on 08-07-2009 at 01:01 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On