![]() So, while it would be a pain, I don’t think it would be a disaster, for me anyway… However, learning AppleScript has given me the start I needed to learn other things too. But, whatever the opposite of vanilla is (I’m gonna say Neapolitan AppleScript), including Script Debugger, FastScripts, all the third party libraries, and all the shared knowledge going back 20+ years… that is pretty amazing. ![]() Long story short, vanilla AppleScript sucks. So, while I have no doubt that Apple would shut down AppleScript at some point for brute commercial reasons, I very much doubt they’d do the same for accessibility functions. AppleScript has become absolutely integral to my life for that reason. I suffered really terrible RSI and had to figure out a way of working. In fact, that’s basically how I got into Mac automation. If, in some wild nightmare, I had to make a pitch for AppleScript’s continued existence to an Apple exec, I would probably emphasise how important this integration is for accessibility purposes. Also, while Apple is a vast, ruthless, profit-pursuing machine, one thing that they have given much greater attention to in the past than would be strictly necessary for business purposes is accessibility. ![]() However, there are quite a few mainstream apps out there that rely on AppleScript for their feature set. Obviously AppleScript users are a fringe of a fringe of a fringe from a commercial point of view. It was all a big black box to me until one day I looked at the Script Debugger Explorer View, and realised ‘Ah! So that’s how it works!’ It got me over that hump in the learning curve that had always defeated my curiosity in the past. But also that I could do these things with these tools. It was really a revelation when I realised what I could do with these tools. What I can say for sure is that I would never have learned to code if it wasn’t for AppleScript, but then I would never have learned AppleScript if it wasn’t for Script Debugger. What that means for AppleScript/Apple Events, I have no idea. Its future seems to be as services ecosystem that uses its hardware for user lock-in. ![]() Low skills, complex needs, willingness to learn.ĪppleScript seems to me to be an amazing idea that was about 70% realised by the mid-2000s, and is about 69% realised now… Since then, Apple has gone from being a computer company that happens to make phones to a phone company that happens to make computers. I’d say that I am pretty much exactly the target market for AppleScript. Until just over a year ago, I’d never written a script in my life. It would provide a clear path forward for those of us who love AppleScript for what it can do (even if we don’t love the language itself). Proper Swift scripting support would at least address a lot of the pain points of AppleScript while waiting for Apple to get their automation strategy sorted (if indeed that ever happens). I think Swift would be the obvious way forward, if Apple was able to provide better support for scripting using Swift, with a proper Apple Event bridge, tooling, and some minor additions to the language that would take away the friction of using it for scripting (some sort of source “import” function, support for loading local swift packages similar to swift-sh, a more permissive syntax mode, etc). It really is a pig of a language, and a lot of its “magic” comes from the first-class Apple Event support it receives from applications & its integration with macOS as a whole. returns 2.3334445557E+10, rather than erroring out if "as integer" is usedĪ silly example here, perhaps, but I only came across double integer because the above handler choked with a regular integer.įor what it’s worth, I understand a lot of the sentiment here, but agree with Mark (and Hamish) that AppleScript doesn’t really have a viable future. Set rounded_n to rounded_n * (10 ^ -decimal_places) Set rounded_n to rounded_n as double integer Set rounded_n to n * (10 ^ decimal_places) If decimal_places is 0 or less, the return type is integer, otherwise it is real. Return n rounded to the nearest decimal position specified by decimal_places. (example of the only place I've ever used it) to roundTo(n, decimal_places) I believe they’re referring to the fact that the integer type has a maximum positive or negative value of 536,870,911 (which would make it a 30-bit value…) 64-bit values are needed in many places nowadays.ĪppleScript actually has a double integer class that should hold a wider range of values, but it’s not implemented properly & is not very useful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |