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

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

Recommended Posts

  • Newbies
Posted

I have two Macs networked. How can I prevent people from closing windows on the host machine. I try to have them always hide but they close out of habit.

I also need a script that will open all the files I need then hide them all. I created a script that open, hide, open, hide but it doesn't work. It only opens all the files.

And lastly. . .

How can I have the guest machine automatically open a file from the host?

...steven

  • Newbies
Posted

>>>I have two Macs networked. How can I prevent people from closing windows on the host machine. I try to have them always hide but they close out of habit.<<<

1. Create a script called re-open

2. Clear All and choose Perform Applescript

2. Put the following into the script box (in this case the database is on the desktop):

tell application "Finder"

activate

select file "Name of Database"

open selection

end tell

3. Use Script Editor if you have your database somewhere else so Applescript can find it.

4. Make this script the close script in the document prefs.

5. The database will reopen if it is closed. The only problem it that to quit FMP you have to press cmd-Q twice. There is probably a way around this, but I have not yet discovered it. Also you cannot close your database without quitting FMP

And lastly. . .

How can I have the guest machine automatically open a

  • Newbies
Posted

The applescript sounds like it will work but I found a better solution to open guest files on the host machine.

You see I didn't want people having to open FMPro, Open Hosts and find what they need.

I just created an initial db that opens the host file and closes the initial db.

Simple solution.

I'll work with the applescript.

Thanks.

Posted

The best answer is not to let people work on the host machine! There are soooo many ways people can shut down the database on the host machine (crashes, hard reset, pull the power plug). The ONLY good solution is to make the host a server and lock it away.

I know, I know, you probably don't want to do this. A lot of my clients don't, until after the first major disaster. wink.gif

-bd

  • Newbies
Posted

I came up with an elegant solution to keep files open.

I use a menu db that is used as the hub for all other dbs acting as the, well, the menu.

In each file I need opened I have a script named open and hide. It simply opens the file and hides it. I have another script named menu which hides the opened file and triggers the open all files script below from the menu db.

Since I want my host computer to keep certain files open at all times I created a script in the menu db that. . .

Script named "Open all files"

If Status (CurrentUserName)="host computer name"

Perform script open and hide for file

Perform script open and hide for file

Perform script open and hide for file

Perform script open and hide for file

Perform script open and hide for file

End if

Open "Menu"

Now everytime a person ends a task and selects a menu button the above script is ran. If it's the host computer, it opens and hides each file. If it's a guest nothing happens except that the menu db is shown.

...steven

This topic is 8666 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.