Apple made a programming language that is very similar to english, it was once called Hyper Talk and was used inside HyperCard. Then Apple made something similar, called AppleTalk or similar.
Here is a code from it
This actually allowed you to script most of Apple software and software that ran on macOS and even System before that. You could create quite complicated workflows. Take a bunch of images, crop them, do some photoshop, then open word and put the images inside and whatever else was needed. Quite powerful actually.
But the thing about scripting languages that are plain english, they are simply harder to use, not easier. The commands become much more terse, stricter and more complicated.
Coding in any programming language is quite easy, short and concise and you can re-use what you did. Instead of “increase value of counter by 1 except if input is odd number” is quite hard to write, and add a few more cases like that.
Programming actually makes such things easier.
Could not be simpler actually.
I am quite fluent in a lot of programming languages. But I never was able to use Apple Script to any useful measures and whenever I did something, I had forgotten about it as soon as I left the computer. I had a lot of these scripts that I made, planned on using them a lot, bought a lot of books and everything. I never used it. But that is sample size of one, so this does not speak for everyone.
This is selection sort algorithm. It really looks scary, but mostly because all the variables are a single letter.
But it is simple. You send it a list of numbers in no particular order.
It then loops the list, from the first item to the last item. When it starts min, k and i are all zero, as in 0.
So it asks, in the list called a, item j (zero) is it smaller than the min item. If it is smaller then swap them. If it will swap items, it will take a copy of it and then rotate it, swap it’s place.
So, little by little it will sort the list.
This is practically impossible to in anything remotely similar to Apple Script. I mean, you can do it, probably but it would not be done so simply. 10 lines to sort a list.
Leave an answer