Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

opening network folders from buttons... on macs..


This topic is 7354 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

We have a cross platform database (FileMaker rules!) but I develop mainly on a PC - use a Mac for checking our solution.

I've been using Macs quite a bit for a couple of years but I've no idea when it comes to AppleScript or AppleEvents.

At the moment I have several buttons on the front page to our solution that act as shortcuts to shared folders on our network. Being a PC developer I've only managed to get these to work on PCs. All our PC users use these buttons for quick access to the shared network folders.

The way I've got it set up on the PCs is by using the 'Send Message' script step.

It sends the 'open document/application message'

And the message text it sends is the windows path to the shared folder. I think it's the UNC path but I'm not sure.

One of the PC network paths is "sharedimagesshow photographyINTERMOT 2004"

That script step is assigned to a button which on a PC instantly fires up that shared folder.

My question is...

Is there a way to get a similar effect on Macs?

Script a FileMaker button to launch a network folder window?

Our mac users have some aliases to some of the network shares on their desktop so we can assume that the network shares are already mounted on their systems by the time they start up FileMaker

Our Mac users are using FileMaker 5.5 on OSX Panther

Any ideas?

Thanks

Posted

The Open URL script step works for this, no AppleScript required. The Mac path would be...

file:///shared:images:show photography:INTERMOT 2004:

You can double-check this by putting a jpg or html file on the server and dragging it to a Safari window. You'll then see the path in the address bar.

PS: If you do want to try AppleScript, I think this will work:

tell application "Finder"

activate

open folder "shared:images:show photography:INTERMOT 2004:"

end tell

Posted

Hi mate...

Works opening folders but not if I want to open a folder window of the root of a share.

There is a share on a network, which is mounted to everyone's machines by the time they open filemaker.

The share is called D-W-C - how can I open a folder window for that?

Thanks for your help so far!

Ben

Posted

BTW I can't get the OpenURL way of doing it working at all.

Nothing happens when the script is run - cursor changes very briefly but no window pops up.

Might have to be AppleScript anyway.

Posted

The Finder is recordable, so the easiest way to script the Finder is to open Script Editor, click the record button, then do whatever you need to do -- open the networked volume in this case -- then go back to Script Editor, click stop, and tweak as needed. Then copy the script and paste into the Perform AppleScript script step. This ought to work:

tell application "Finder"

activate

make new Finder window

set target of Finder window 1 to disk "D-W-C"

end tell

Posted

Superb!!

Thanks for that.

Do you know where I can find some more information on using AppleScript with FileMaker?

I think I've seen some PDFs but I've no idea where.

Posted

Superb!

I'll definitely take a look at those.

Is there anything specific to using AppleScript with FileMaker 5.5/6?

Any limitations to what can be done with AppleScript in FileMaker 5.5/6 compared to 7?

I'm pretty new to AppleScript - can FileMaker understand all AppleScript that's available or does it only recognise a subset of AppleScript?

Thanks

Posted

AppleScript is handled essentially the same in all versions of FileMaker, although in 7 you have new objects like Table Occurrences, so you'd want to be aware of that if your scripts reference FileMaker objects (vs. e.g. simply doing stuff in the Finder).

More to the point, there are differences in versions of AppleScript itself, esp. OS 9 vs. X. These come into play mainly when scripting the Finder.

I wouldn't describe FileMaker as recognizing a subset or superset of AppleScript. Rather, each application (if it's scriptable) has its own AppleScript dictionary of objects, commands, and their associated parameters. Drag an app onto Script Editor to see the dictionary.

One thing that can trip you up with AppleScript is keeping in mind where you are application-wise when you declare a variable. For example, FileMaker cannot set x to the name of the startup disk -- only the Finder can do that.

AppleScript is fun, but it's going to get really fun when OS X "Tiger" comes out.

This topic is 7354 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.