[X-Unix] Schedule Indexing via Terminal

Doug McNutt douglist at macnauchtan.com
Sun Feb 22 16:21:16 PST 2004


At 15:01 -0700 2/22/04, Spoolman Nancy wrote:
>>Since you mention Terminal. . .
>>
>>man cron
>>
>>You will need to set up a line of text and install it with crontab. It will execute a UNIX executable you specify at any time you want. That can open an application or run an AppleScript one of which ought to have a link to an indexing request. Well - we are talking about OS neXt here. . . How does one do it from System Preferences or Finder?
>
>You Get Info on the folder you want and tell it to Index. I have people who want to have it done automatically. Well, I use Terminal only  when I know the exact script. I'll check out the man cron and see if I can figure it out. Thanks!

I went over to my G4 - it was running YellowDog Linux - and booted into OS neXt - Panther

I opened the AppleScript Editor and set it into Record mode.

I then switched into finder and selected a volume. Get Into suggested that I "Index now" and I said OK and indexing began.

Going back to the Script editor I found nothing at all.  Those functions are not considered recordable as of 10.3.2.  Sigh.

So. . .

I think the only option you have is to use Apple's new scripting capability called "User interface scripting". It's a nightmare that uses an application called "System Events" which can poke buttons in application user interface windows for you. It's available in OS 10.3 and above. You get to figure put such things as "which button to I click" when there are five buttons 1 - 5 and you are guessing which one is the right one.

The AppleScript mailing list it the only source of help I know, but it's a good one.

>	<mailto:applescript-users-request at lists.apple.com?subject=unsubscribe>
>List-Id: Help and discussions for scripters developing scripts and solutions in AppleScript. <applescript-users.lists.apple.com>
>List-Post: <mailto:applescript-users at lists.apple.com>
>List-Help: <mailto:applescript-users-request at lists.apple.com?subject=help>
>List-Subscribe: <http://www.lists.apple.com/mailman/listinfo/applescript-users>,
>	<mailto:applescript-users-request at lists.apple.com?subject=subscribe>

It can probably be done that way but the learning curve will be long and frustrating. Making the script run is easy - cron will do it. Writing the script is an experience.

-- 

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.



More information about the X-Unix mailing list