• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
The disappearing script execution!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The disappearing script execution!


  • Subject: The disappearing script execution!
  • From: Matthew Broms <email@hidden>
  • Date: Thu, 16 Aug 2001 14:46:49 -0400

I have a self-contained script which I call from Filemaker Pro 5 which
simply goes out and reads 6 separate text files (1 each in a repeat loop -
some are very large, 2-3mb), counts the number of paragraphs and compares
the results with those statically recorded in the database. If they are the
same it states that, if they are different, it adjusts the numbers in the DB
and states it did so. It mostly works fine, but occasionally it acts very
strangely and just stops while reading one of the files (random - sometimes
the first file, sometimes middle file, sometimes the last file). It doesn't
error out and it never gets to the compare statement and subsequent display
dialogs. It just disappears. Control is returned to Filemaker as the
script just stops without finishing and without explanation. I've tried
nesting things in try/error, but I can't get it to generate any kind of
error. I've also tried making sure the respective file was closed before it
tried to gain open access to it. This didn't work (and it would have at
least generated an error). It just STOPS for no discernable reason. If I
step through it in debugging mode (Script Debugger), it always works,
successfully going right through where it last mysteriously stopped.
Generally the script tends to begin this wild behaviour after other scripts
have run and finished. And once it starts, it's difficult for it to stop
happening, even after quitting everything and restarting. Furthermore, if I
continue to run the script over and over, I notice my machine eventually
tends to crash (mouse freeze) and I have to restart. I was afraid it's some
darn persistence thing, but I just don't know what. I'm resetting the 3
properties I have defined at the beginning and end of the script, so that
shouldn't have an impact. Any ideas would be greatly appreciated.

Matt

_______________________________________________________
Matthew G. Broms | Halo Solutions, Inc.
Development Manager | (770) 643-2302 voice
85C Mill Street | (770) 649-4734 fax
Suite 100 | www.HaloISDG.com
Roswell, GA 30075 | email@hidden
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Most of the script is below:

repeat with i from 1 to numCats
set pinType to item i of pinFileList as string
set p to thePath & pinType & ":" & pinType
set theFile to p as string
set curFileMarker to 1
set tempFile to open for access file theFile without write
permission
set eofTest to true
set blockSize to 100000
set tempCount to 0
repeat while eofTest
set prevFileMarker to curFileMarker + 1
set curFileMarker to curFileMarker + blockSize
try
set rawData to read tempFile from prevFileMarker to
curFileMarker as string
on error message -- RAN INTO EOF
set eofTest to false
set rawData to read tempFile from prevFileMarker to eof
close access the tempFile
end try
set tempCount to tempCount + (count of paragraphs of rawData) -
1
dd set contents of item 4 of d1 to tempCount as string
end repeat
set pinCountList to pinCountList & tempCount
end repeat
dd uninstall

-- NEVER GETS TO HEAR after it has started to bug out --
if (pinCountList as string = pinNumList as string) then
display dialog "Pin Counts are accurate and up to date."
else
tell application "FileMaker Pro"
go to layout "Pin_Count" of window "StateFarmReports.fp5"
repeat with i from 1 to count of pinFileList
set cell (item i of pinFileList) to item i of pinCountList
end repeat
end tell
display dialog "Pin Counts have changed and have been updated
according to new numbers."
end if


  • Follow-Ups:
    • Re: The disappearing script execution!
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: AppleScript program to execute files (Sounds)
  • Next by Date: Re: send message to another mac
  • Previous by thread: Re: AppleScript program to execute files (Sounds)
  • Next by thread: Re: The disappearing script execution!
  • Index(es):
    • Date
    • Thread