OS 9 Script won't recognize a type command - Any suggestions?

Hello all, I’m very green at all this, and am trying to puzzle my way through a simple script.

I have built a digital picture frame from an old mac powerbook running OS9. I am trying to make the slideshow program start, and then run the slideshow. So I am building an applescript for this - also in OS 9.

Using the record function in applescript, I got the slideshow program to start automatically, but I cannot get it to recognize the “present slideshow” menu selection under the file menu - or recognize typing in the command sequence (command s) which will also launch the slideshow.

I also added a short time delay (also found on this site) before the command key sequence just to make sure everything loads properly before it tries the command key sequence. That part also seems to check out OK (I think). Just the bloody typing part!

I have tried two options I found on this site to tell applescript to type the command s keys, but get an error every time I test the syntax.

The error being - Expected end of line, etc. but found ".

Here is the script I have:

tell application “Finder”
activate
select file “Prowler 2.3” of folder “Prowler 2.3 Æ’” of folder “Applications (Mac OS 9)” of startup disk
open selection
return 15
TypeText “s” with Command
end tell

I have also tried the text line as: TypeText “s” Command true

Same error with both.

The program I am scripting is Prowler, a slideshow program that doesn’t have an applescript dictionary. I am stumped! All the programs settings are remembered from each time it is opened so all I need now is to figure out how to make it actually START that bloomin’ slideshow of my pictures and I’ll be done!!

Thanks for any help!

Model: Powerbook 3400c, OS 9.2.2
AppleScript: 1.8.3
Operating System: Mac OS 9.2.x

Hi, The_Hammer.

‘TypeText’ is a command from a third-party OSAX called “Sändi’s Additions”. This needs to be installed in the “Scripting Additions” folder of your “System Folder” before the script will compile. It also has to be in that folder on any machine that runs the script. You can download Sändi’s from here.

Your ‘return 15’ line will cause the script to finish (or the handler to finish, if the code’s in one) at that point. Perhaps you mean ‘delay 15’.

I’m not familiar with Prowler, but with most applications, Command-“s” is the Mac-OS standard keystroke for “Save” or “Save As.”.

Your recorded script has recorded the actions you went through yourself to launch Prowler. Your script should be able to do it directly like this:

tell application "Prowler 2.3" to activate
delay 15
TypeText "s" with Command -- or whatever the keystroke actually is.

If Prowler isn’t open when you compile the script, the compiler may ask you to navigate to it.

Hope this gets you somewhere. :slight_smile:

Thanks Nigel!

That was exactly what I needed to know!

And thanks about the time delay thing too. You fixed two things for me with your response!

Now working like a charm!! :slight_smile:

Cheers!

Ham