Searching Script Content

My naming conventions for scripts leave a LOT to be desired, to say the least. In 10.3.9 at least, the Finder’s “Find” is nigh on useless at finding script content in the ~/Library/Scripts folder, so I’m forever recalling some snippet of code and not being able to find it. Is there a better way in Panther? How do the gurus here keep an orderly record of their scripts?

[I do have Tiger, but have to install a Pioneer DVR-109 in my old B&W G3/1100 before I can install it and haven’t gotten around to that because I’m busy on a project].

Sadly, any snippets of code I save that are related to this forum are just stuffed into a folder called “bbs”. :expressionless:

However, for almost everything else, I take advantage of what appears to be a new feature in Tiger. :smiley: Inside your Scripts folder, you can have a folder called Applications, which contains folders named after applications. When scripts are placed inside one of these folders, they only appear when that application is the frontmost application.

Pictures:
Scripts Folder
Script Menu

Are you trying to search inside compiled script contents? (as if they were plain text files)

If so, you could try adaptating the “search-replace in place” script in the “kapullo” package (“AppleScripter” category): http://scriptbuilders.net/files/kapulloscripts1.0b5.html

  • NOTE: you may need Jon’s Commands to make it work

Thanks, jj; I’ll try that. Sounds a lot easier than saving text copies of all my scripts.

Hmmm… Perpahs is faster generating copies as text files (1 time), then using really fast tools for the search function (spotligth, grep), if you will be searching regularly (appart from the fact that “uncompiling” scripts may launch certain applications to get dictionary terminology, as Mail or Safari, perhaps dozens if you use applescript to “applescript” anything in your system)…

You’ve identified the problem, jj. Running your script soon had every second scriptable application I own open and generated some “where is application xxx” stuff for apps I don’t use any more. Clearly, I’ll have to edit the files myself first, and think of some way to get rid of the applications that are opened or I end up with heavy swapping.

A little more work will tell.

The problem is that to get the text, applications will be launched anyway (also if you open in the Script Editor, I think). The only workaround would be creating lots of applets with names as “PhotoShop CS” and imposting the original’s dictionary. But this workaround would involve also lots of work to be worth :confused:

It has been around since at least Panther (10.3). :smiley:

Yeah. It’s in Jaguar too :smiley: ” but the folder doesn’t get hidden in the Script Menu.