Sign in to follow this  
Followers 0
ggt667

Is there a way in AppleScript to trap if the connection is lost and have an AppleScript act on this?

1 post in this topic

Posted (edited)

Is there a way in AppleScript to trap if the connection is lost and have an AppleScript act on this?

At the risk of asking and answering myself( AppleScript below )

repeat
	tell application "FileMaker Pro"
		try
			database "db"
		on error
			do shell script "sudo shutdown -r now" with administrator privileges
		end try
	end tell
	delay 59 -- 59 secs
end repeat

 

Edited by ggt667

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0

  • Similar Content

    • By Gently Does It
      I am working in a biology lab and have developed several basic databases using filemaker 11 to help the lab organise their stocks of chemicals and so on. We have a fairly onerous excel sheet that we have to fill out for registering certain new reagents we make with the regulatory authorities and as these are a pain to use, they are not filled out regularly enough. I would like to simplify this for everyone by making a filemaker form/database that will automatically fill out as much detail as possible.


       
      The data in question is that when we clone a piece of DNA we need to insert this into several different DNA vectors that are used for different things. Whenever this one particular piece of DNA is inserted into a new vector it must be registered, so for one piece of DNA there may be , lets say 6 individual entries in the database, all saying more or less similar things, but just having different target vectors. I hope this isn’t already sounding to weird.


       
      I have a plan that I will have a ‘home screen’ with a field for entering the name of the DNA and then some tick boxes for each of the common target vectors. What I would like is that all my colleagues will need to do is tick the boxes for the vectors they want to clone the DNA into and filemaker will then automatically populate a new entry for each of the vectors specifically for the new DNA they have cloned. As I have some basic experience, but am admittedly very limited in my scripting knowledge, I am unsure as to how best to do this. Would it be best to have a button next to each of the vectors instead of a tick box that would run a script that would take the name of the DNA in the field and then make a new entry based on the associated vector? If so can anyone suggest how this would be best organised. I am guessing I only need a single table with two layouts, one for the home screen and one for viewing all the entries.


       
      I’m sorry if this seems a bit convoluted.


       
       

      Thanks for any help.

    • By James WHL
      Hi,
      A client of mine has an Windows 2008 Server which runs an SQL Server.
      Because he doesn't have another machine and (Due To some reason, my client do not wish to mess with current SQL database structure),
      so I will like to ins tall FM 11 runtime onto the same machine,
       
      The runtime solution is to schedule login to SQL server to perform importing / filtering  and exporting data report.
       
      My question is :...
      Has someone ever done this and can it be done?
      Possible for FM to login onto same machine to access SQL DB ? Thanks!
       
    • By imdarek
      Hi, I am using filemaker 11 to copy customer info from excel into the database and then it would generate special keys in pdf allowing us to send the file to the customer.
      My access to the filemaker is non-admin, and the import function of customer info has been blocked.
      We are keying in the record one at a time, so we are looking at ways to automate this process.
      When I try to create a new record using applescript with just 
      it was not allowed. There are data that require validation like date and auto-indexed record number.
      So, is there a way we could create new record and then using the set function to copy data into the report?
    • By adyf
      I'm getting the attached error messages when trying to modify records in a file. It's appears as though there is some protection in place, privilege sets etc, but there isn't and never has been. I've tried recovering the file to no avail, is there anything else I can try? I haven't accessed this file in approx. 6 months, but have never had issues before and I'm the only user of the file.


    • By transpower
      I and most of my clients are still on Windows 7 and Windows Server 2003.  I have several FileMaker executable files (solutions) developed using FileMaker 11 Advanced.  Will these run on Windows 10?  Will the Windows 10 compatibility mode (i.e., Windows 7) run these files?  I don't have a Windows 10 machine to test.