filemaker 6 unexpectedly quits -- dismiss dialog
filemaker 6 unexpectedly quits -- dismiss dialog
- Subject: filemaker 6 unexpectedly quits -- dismiss dialog
- From: Brad Schrick <email@hidden>
- Date: Mon, 5 May 2003 18:48:28 -0700
summary: i want to dismiss the 'unexpectedly quit' dialog when filemaker does just that, but no process will own up to being in charge of it (using various tools, most especially prefab's ui browser [ thanks scott!
http://prefab.com ], which otherwise make this stuff possible for me )
tia -- b.rad
--- details ---
i'm using system events and gui scripting to start and stop our filemaker server ( mac os x ), which is a good thing
on the web server, however, the filemaker pro unlimited client is 'unexpectedly quit'-ting several times a day, as has been reported elsewhere
this didn't happen during development, but under load it is too frequent
forewarned, in preparation, i wrote a script applet to watch processes and restart filemaker and re-open the databases (14) when necessary
that works fine, and life is much better, if you can believe it, than when we had to restart the whole mac os 9 server once or twice a day using kick-off
(however, $1000 'server' software should not be quitting once a week, much less several times a day under medium to light load...!)
in addition, using the filemaker server seems to reduce the instances of database corruption and rebuilding on restart... the jury is still out on other side effects, however
==== restart script ====
-- startup script for filemaker unlimited as client -- mods to launch databases from database server
-- version 3 ... 4 May 2003 -- from v3 of fm data launcher (local)
property filemakerRestarts : 0 -- keep track; need array to also keep track of times, should write log too
property dataServerAddressPrefix : "FMP5://(your ip here)/"
property databasefilenames : {,
"database1.fp5", ,
"database2.fp5", ,
"database3.fp5", ,
"etc.fp5"} -- there should be a more natural or 'discoverable' way to do this
--===--
-- on run -- maybe should do a few more things here ... could put 'on run' and a dialog to tell restarts here
openTheFileMakerFilesFromDataServer() -- on initial run that gets it started, folks
--===--
on idle -- make sure the databases are open
try -- to catch dialog box 'filemaker unexpectedly quit'
tell application "Finder" to ((name of every process) as string) contains "filemaker pro"
if the result is false then openTheFileMakerFilesFromDataServer() -- make sure they're open and running
on error -- figure that filemaker has quit, finder is 'busy' with 'unexpectedly quit' dialog
openTheFileMakerFilesFromDataServer -- temporary -- just open them all if there is an error!
set filemakerRestarts to filemakerRestarts + 1 -- temporary, until we figure out how to dismiss dialog
tell application "Finder" to activate -- has to be in front to look for 'filemaker unexpectedly quit' dialog, apparently
try -- not to let error here hang system up! -- this is NOT working, the window/dialog is not acknowledged by the Finder
tell application "System Events"
tell application process "Finder" -- thank you prefab!
set theMessage to the name of (static text 1 of window 1) -- dialog text: filemaker quit?
-- this dialog should be in front, ergo window 1
if (theMessage contains "filemaker") and (theMessage contains "unexpectedly quit") then
click button "OK" of window 1 -- dismiss that obstructing puppy
set filemakerRestarts to filemakerRestarts + 1 -- keep track of restarts... should also keep time
else
-- we should probably click OK anyway, but it could be 'erase disk,' so hold off
end if
end tell
end tell
end try -- not to hang system
end try -- to catch filemaker sleeping...
return 30 -- check again in 30 seconds
end idle
----
on openTheFileMakerFilesFromDataServer() -- here is where the work gets done
--try -- for now, ignore problems, but we should add to this as we get experience
repeat with eachFile in databasefilenames -- all needed database files must be named in array above
tell application "FileMaker Pro"
activate
getURL (dataServerAddressPrefix & eachFile) -- that is, 'open remote' each database
end tell
end repeat
--end try
try -- to hide filemaker unlimited and its windows
tell application "Finder" to set visible of process "filemaker pro" to false -- hide that sucker
end try
end openTheFileMakerFilesFromDataServer
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.