5.0b bug report:: Script names must start with uppercase character, otherwise icon/keyboard binding is lost

dust wrote on 7/11/2004, 11:36 PM
I think there's another bug in 5.0b concerning upper- and lowercase script names (this is getting annoying...).

Observation: if I create a file "a.js" (all lowercase) and configure a keystroke to it, plus create an icon in the toolbar and then leave and start Vegas again, both (icon and keystroke) are forgotten.

Next I just rename "a.js" to "A.js". As soon as I start Vegas again, the icon (which was added for "a.js" is back there - but not the keystroke.

It seems to me that now script names _MUST_ start with an uppercase character. What's behind doesn't matter, so something like "A_abc.js" woud be fine. Then Vegas seems to remember icon and keystroke. I don't know what the exact behaviour is, maybe it's even better to keep the whole script name uppercase?

This is particularely annoying because in 5.0a script names had to be all lowercase, and now in 5.0b, the first letter in a name must be uppercase. Meaning, there is not even a common denominator...

Can other users confirm this behaviour?

Comments

dust wrote on 8/4/2004, 5:32 AM
I must bring this topic to the top list again... this is bcoming REALLY ANNOYING!! I didn't get any reaction on this from Sony (or, for this, from any other user here so maybe I'm the only one with this problem?)

Am I the only one with this problem?

Background: for my nested group script set I have to assign a dozen scripts to keystrokes and I'm currently using a .ini file like:


[Global]
Script.Hgroups.Group=Num +,Num 0
Script.Hgroups.Leaf=Num +,Num 1
Script.Hgroups.Child=Num +,Num 2
Script.Hgroups.Extract=Num +,Num 3
Script.Hgroups.Prev=Num +,Num 4
Script.Hgroups.Hull=Num +,Enter
Script.Hgroups.Next=Num +,Num 6
Script.Hgroups.Root=Num +,Num 7
Script.Hgroups.Up=Num +,Num 8
Script.Hgroups.Restore=Num +,Num 9
Script.Hgroups.Gui=Num +,Num +
Script.Hgroups.Reset=Num +,Num -
Script.Hgroups.Ungroup=Num +,Num Del


This only seems to work if upper-lowercase is PRECISELY this way... it ALWAYS has to start with one uppercase letter, followed by all lowercase letters. Thsi is true for the subdirectory ("Hgroups") as well as for the script names ("Gui.js" etc). Please Sony, this is not normal behaviour, this is worse than it used to be in 5.0a! If you assign to a script not following this naming convention, you loose the assignment (as well as toolbar icon if you assigned one) at the next session. If you misname one of the scriptnames, other scripts (themselves following this scheme) seem to be disabled as well from time to time (not following any obvious scheme).

And there's more... Try to assign anything (whatever you like) to "Num +, Num 5". This can be a script, a command (like Edit.Select.All). If you then press Num-+,Num 5 nothing happens. The keystroke appears in the list in Preferences/Keyboard, but seems to be ignored. All other digits work (Num+,Num0 up to Num+,Num9), just Num+,Num5 is bugged. And maybe others as well? Is this the case with you too? I'm asking because I have a Swiss keyboard layout and so I'm not sure if it's the same with US keyboards (but the numblock should not be impacted by this).

Sorry Sony, but I'd be grateful if you could check if the keyboard assignment/icon assignment procedure is still bugged, and in what way.
BrianStanding wrote on 8/4/2004, 7:58 PM
I had a similar experience with trying to assign Ed Troxel's Tsunami script to a toolbar button. I had to adjust the capitilization of the script and the jpg to make it work.
_TJ wrote on 1/17/2005, 10:58 PM
ugh, that was a stupid bug. Ok here's the deal. the keybinding name tables are assumed to be sorted, so a binary search is used to convert command names to id's when we load keyboard.ini.

However, due to a silly oversight, the keybinding tables are sorted case sensitive, but the binary lookup code assumes that they are case-insensitve. This happens to work fine with all of the built in command names, but not so good with script names unless they also happen to be consitently capitalized.

Your stuff is going to sort under Script.HGroups.xxxxx which should work even with the broken sort code so long as

1) you always start with Script. (i.e. capitalized).
2) you are consistent in the way you capitalize Hgroups
and (assuming that you control all of the scripts in the hgroups folder).
3) you use all lowercase Or all uppercase or all Capitalized for your script filenames

Basically, you need to make sure to name all of your scripts and folders (including EVERYTHING) in the Script Menu folder so that they sort the same case sensitively and case insensitively.

at least until we can get this bug fixed.

I believe that this is complicated by Window's prediliction for auto-capitalizing filenames that are all one case. So your best bet is to consistently capitalize the first word of everything. (as you discovered). Although all lowercase should work as well - SO LONG AS YOU APPLY THAT RULE TO ALL FILES and folders in the Script Menu folder.

<sigh>
tj


BrianStanding wrote on 1/24/2005, 9:24 AM
Thanks for bird-dogging this.