I understand applescripts are complied so search might not be possible through spotlight. What is the best way to search in scpt files?
like an AppleScript.mdimporter spotlight extension…
thanks
I understand applescripts are complied so search might not be possible through spotlight. What is the best way to search in scpt files?
like an AppleScript.mdimporter spotlight extension…
thanks
There was a mention of an AppleScript mdimporter in snow leopard here Applescript Spotlight plugin for Snow Leopard but unable to find it. Anyone have a working version?
I wouldn’t call this the best way but when I have a script that I may wish to reference later, I dump a text version (ie .applescript) in a folder. I have an applescript that exports .applescript to this folder.
Then, when I’m looking for whatever, I run a command-line tool called ‘ack’ —which is sort of a beefed-up grep— to find any scripts with matching contents. If there are variations, then I can add some surrounding lines for context. It works well enough.
I do this because, for various reasons, I have disabled spotlight indexing on my computer.
If I wanted to use a gui tool, then I would probably use EasyFind, which can search file contents.
Specific to your second question… I think that I read somewhere that the spotlight plugin stopped working with a particular version of the OS, although perhaps I am confusing one thing with another.
thanks for the reply. I find it interesting apple’s own scripting language can’t be used with spotlight. I understand it’s compiled but still. Very strange.
I heard script debugger had mdimporter plugin but I’ve installed it and doesn’t seem like it does. Can anyone else confirm script debugger doesn’t allow searching?
AppleScript (.scpt) files are compiled binaries and that prevents Spotlight indexing of their contents. I don’t use third-party tools for searching in binary files, and I typically have the corresponding AppleScript source files present for Spotlight queries on kind:script.
I happen to have a binary .scpt handy on my Desktop and if I want to find a string in it, I use the Terminal:
egrep -aio "(integerForKey)" *.scpt