Thanks to everyone. It's making a lot more sense now.
I just didn't see the declaration for
mmFormScreenCenter.
Actually, I wasn't interested in it
per se; I had run into something similar (I forget which constant) and was just using
mmFormScreenCenter as an example since it was used near the top. The discussion has been very helpful, none the less.
I (incorrectly?) guessed that Steegy wrote his declarations near the bottom of the file so that they would be outside any Sub (and therefore not just local to it) and because I thought (perhaps incorrectly) it was written somewhere that the first statement in a script file must be "Sub
ProcName", where
ProcName matches what was in the
Scripts\Scripts.ini file. Now I can't find where I read that. Was I just imagining things? If that requirement doesn't exist, why do so many scripts files start out that way?
@trixmoto: The
Scripting.doc documentation says:
“MediaMonkey init.vbs” file is always executed before your script and therefore it contains some constants that can be later used in your script.
(I missed that earlier.
) That must mean it is safe to assume it exists. It's too bad they didn't put many of the constants from the documentation in there.
@Maaspuck: You probably don't need to be told this, but if you start messing with MediaMonkey init.vbs, you are asking for trouble if you try to upgrade MM or share your scripts with anyone else later on. Have you considered writing to a custom .ini (SDB.IniFile) or other flat file? That's the old-fashioned way of doing non-volatile data storage. (Using SDB.Objects is over my head, and not relevant for what I'm doing. EDIT
Maybe that's why my script won't "compile"!!! I need to look into that more.)
@Everyone: The wiki looks like a good resource. I missed it in part because it isn't mentioned here:
http://www.mediamonkey.com/developers.htm , or on any of the other main MM web pages (unless I'm missing something, which I've been doing a lot lately
). If anyone has control over that, it would be a worthwhile addition, IMHO. @Steegy, your resources page looks great and mentions the wiki - I must have been a bit overwhelmed when I read it.
@Steegy: Is there any particular reason you didn't "Set WB = Nothing" in CloseDown?
Thanks to everyone. It's making a lot more sense now.
I just didn't see the declaration for [i]mmFormScreenCenter[/i]. :oops: Actually, I wasn't interested in it [i]per se[/i]; I had run into something similar (I forget which constant) and was just using [i]mmFormScreenCenter[/i] as an example since it was used near the top. The discussion has been very helpful, none the less.
I (incorrectly?) guessed that Steegy wrote his declarations near the bottom of the file so that they would be outside any Sub (and therefore not just local to it) and because I thought (perhaps incorrectly) it was written somewhere that the first statement in a script file must be "Sub [i]ProcName[/i]", where [i]ProcName[/i] matches what was in the [i]Scripts\Scripts.ini[/i] file. Now I can't find where I read that. Was I just imagining things? If that requirement doesn't exist, why do so many scripts files start out that way?
@trixmoto: The [url=http://www.mediamonkey.com/sw/webhelp/Scripting.doc]Scripting.doc[/url] documentation says: [quote]“MediaMonkey init.vbs” file is always executed before your script and therefore it contains some constants that can be later used in your script.[/quote] (I missed that earlier. :-? ) That must mean it is safe to assume it exists. It's too bad they didn't put many of the constants from the documentation in there. :(
@Maaspuck: You probably don't need to be told this, but if you start messing with MediaMonkey init.vbs, you are asking for trouble if you try to upgrade MM or share your scripts with anyone else later on. Have you considered writing to a custom .ini (SDB.IniFile) or other flat file? That's the old-fashioned way of doing non-volatile data storage. (Using SDB.Objects is over my head, and not relevant for what I'm doing. EDIT :o Maybe that's why my script won't "compile"!!! I need to look into that more.)
@Everyone: The wiki looks like a good resource. I missed it in part because it isn't mentioned here: http://www.mediamonkey.com/developers.htm , or on any of the other main MM web pages (unless I'm missing something, which I've been doing a lot lately :-?). If anyone has control over that, it would be a worthwhile addition, IMHO. @Steegy, your resources page looks great and mentions the wiki - I must have been a bit overwhelmed when I read it.
@Steegy: Is there any particular reason you didn't "Set WB = Nothing" in CloseDown?