Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScript auto-capitalization puzzle

Hello all -


I think the AppleScript Editor is trying to tell me something and I'm not quite sure what. I need your help, please. :-)


I have decent coding experience (as a hobby), but I'm rusty. I'm new to AppleScript and getting into it. I'm writing a few simple handlers and for at least one of them the AppleScript Editor accepts my "camel font" capitalization, e.g.:


on ParseIndReg(input)

...

end ParseIndReg


If I type in that last line as "end parseindreg", and compile the code, the AppleScript Editor picks up my capitalization from the first line and we're all good. But a few lines later in my code, I have another handler that isn't quite so obedient. I want to call it "parseIRF", and I type it that way in the "on" and "end" statements.


But every time I do that, and then compile the code, the editor makes it "parseirf". I can't get it to keep the capital "IRF" no matter how hard I press on the keys. 😝


If this was all just about how my code looks, I wouldn't really care (OK maybe a bit). But something in my brain tells me that the AppleScript Editor either recognizes that word, or doesn't recognize it, or something, and so it will decide the case, not me.


I wondered whether I was inadvertently using a reserved word (like "set" etc.) but I can't imagine that "parseirf" has some deeper meaning to the editor.


Should I just get a life and not worry about losing this battle of capitalization? Or is there a deeper meaning that I'm missing? Any thoughts or hints would be welcome. Thanks.

Automator-OTHER, OS X Mountain Lion (10.8.2)

Posted on Nov 2, 2012 8:10 PM

Reply
Question marked as Best reply

Posted on Nov 2, 2012 8:14 PM

Go through your code, find the place where the handler was called from, correct the capitalization there, and without compiling, copy the entire script to the clipboard, quit the AppleScript Editor, and relaunch it.


(71265)

2 replies

AppleScript auto-capitalization puzzle

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.