Ashass said:
Nick, may I suggest, instead of win, maybe change it to "window name" in your samples so it's a little more intuitive?
Glad you got it working.
I hope you are reading the help files, I usually read them myself, and I wrote the stuff:
In there, it makes it clear that the first argument is the window name:
Prototype
long WindowFont(BSTR WindowName, BSTR FontId, BSTR FontName, double Size, BOOL Bold, BOOL Italic, BOOL Underline, BOOL Strikeout, short Charset, short PitchAndFamily);
It also says "WindowName - the name of an existing miniwindow.".
Virtually every miniwindow function needs a window name, this lets you have multiple windows at once. For example "inventory", "chat".
Also it suggests that you append the plugin ID so that the window names are unique between plugins. So for example:
win = "inventory_" & PluginID ' VBscript
win = "inventory_" .. PluginID () -- Lua
This means the actual window name might be "inventory_21448b31e497a95a36ee5173".
I just used "win" to save typing.
It is useful to use the function-name completion in MUSHclient. Even if you do it in the command window and copy and paste into your script. For example, typing "windowfo" and then hitting Shift+Tab you see offered a menu with WindowFont / WindowFontInfo / WindowFontList.
Choose WindowFont and it gives you the correct spelling and capitalization, and suggests the arguments:
WindowFont ( WindowName , FontId , FontName , Size , Bold , Italic , Underline , Strikeout , Charset , PitchAndFamily )
Now all you have to do is replace words like "WindowName" with, well, the window name.