Predefined Scripting Constants in MediaMonkey API

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

imd1b4u
Posts: 30
Joined: Tue Oct 02, 2007 10:25 pm

Post by imd1b4u »

Steegy wrote:What I meant is that you can add things to the wiki, or rewrite stuff so it is more understandable. If it's incomplete or not 100% correct, someone else (who might know exactly how it works) will see the updates and complete/correct them. Speaking for myself, I check the wiki's "recently changed" almost every day.
Actually, your meaning was clear. I appreciate you wanting to have new scripters adding material to the wiki. I didn't expect you (or anyone else) to consciously look for changes, though.

I still have a strong preference for people using weasel-words if they are uncertain about something, though. That way I know how to interpret what they write. It's not as if it is difficult to include them or to remove them once the information is checked. I don't think asking for this would discourage anyone from adding to the wiki. My post was intended more as a reminder that it is easy to include them (and improve the accuracy of what you are writing at the same time).

Back to the original subject: There are some constants in the MediaMonkeyScripting.chm file that are not defined in the MediaMonkey init.vbs file (and probably not the .js file, either). When someone tries to use those constants they get an error or have a bug if they don't define the constants themselves.

I extracted MediaMonkeyScripting.chm to text files and greped (grepped?) the results to extract the constants mentioned there. I wouldn't be surprised if I missed some. Also, the results may not be accurate - MediaMonkeyScripting.chm has mistakes, after all.

Here are the results presented in a way that anyone could paste into their VBScript script. It should be easy to convert them to JScript.

Code: Select all

' UI Common Align
Const alNone         = 0
Const alTop          = 1
Const alBottom       = 2
Const alLeft         = 3
Const alRight        = 4
Const alClient       = 5


' UI Common Anchors
Const akLeft         = 1
Const akTop          = 2
Const akRight        = 4
Const akBottom       = 8


' UI Drop Down Style
Const csDropDown     = 0
Const csDropDownList = 2


' UI Border Style
Const bsNone         = 0
Const bsSizeable     = 2
Const bsDialog       = 3
Const bsToolWindow   = 4
Const bsSizeToolWin  = 5


' UI Form Position
Const poDesigned     = 0
Const poDefault      = 1
Const poScreenCenter = 4
This does not include the constants that are already in MediaMonkey init.vbs (some of which are undocumented).

Again, what is in MediaMonkeyScripting.chm is not necessarily accurate (and of course, Garbage_In => Garbage_Out.) Using a constant already in the init files as an example: according to the documentation, mbHelp is 12, but the init file really sets mbHelp to 14 and mbIgnoreToAll to 12. (I just happened to notice that, so I don't know how bad it is.) I have done no testing to verify that anything I provided actually works correctly; it just matches the documentation.
Last edited by imd1b4u on Tue Oct 09, 2007 7:26 pm, edited 2 times in total.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Thanks for doing that, I'm sure many scripters will find it useful.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply