creating an alias of a file (.fp5) on the desktop

Hi,

Is it possible to let applescript create an alias on the desktop from a filemaker pro file?
Maybe it’s also possible to create a dock icon?

If yes…how? I’ve created some sample code…but i don’t seem to get it working:

tell application “Finder”
make alias to “startupdisk:Users:admin:Desktop”
set original item to “startupdisk:Applications:My Application:login.fp5”
end tell

This code still gives the error :Can’t set original to “startupdisk:Applications:My Application:login.fp5” but that original is really there:(

thnx allready & greetz
Jeffer

You’re missing some parameters in the creation of the alias file.

Try:

tell application "Finder"
  make new alias at folder "startup disk:Users:admin:desktop:" to file "startupdisk:Applications:My Application:login.fp5"
end tell

As you can see, you can create it all in one step rather than creating a empty alias and linking it to another file, however, you need to be explicit in that where you’re creating the alias is a folder.

Additionally, the line:

set original item to “startupdisk:Applications:My Application:login.fp5”

doesn’t work because the Finder doesn’t know what 'original item" is. I think, perhaps, you mean:

set original item of someAlias to file “startup disk:Applications…blah:blah:blah”

(assuming ‘someAlias’ is a reference to the alias file you just created)

There’s no direct link between the two lines of your script, so the Finder doesn’t know what to do.

yeah!

So it was the “get field” part where my mind went crazy:)

thnx for the solution:)

greetz,
Jeff