Because my very large app is still experiencing an occasional crash, I’ve decided to split into separate apps per Shane Stanleys advice.
My problem is, how do I transfer variables between app? I cannot find anything on the net other than for script files. I’ve tried the script below, without success. Errors after set p to 3.
Any help appreciated, please.
on mainLoop()
# say 221
try
set p to 1
set theApp to (path to desktop) & "Mail Manager Loop Runner.app" as text
set p to 2
set temp to {my mailManagerDesktopFolderPath, my mailBoxProcessName, my mailboxStoreName, my mailboxRecycleName, my reCycleFlag, my sayEveryErrorMessage, my tMMS, my MMWorkingDate, my theLastMidnight, my ftpPrintFlag, my serverFolder, my didItPrint, my serverBackupState, my runForOz, my theYear, my theMonth, my dailyName, my theZeroedDate, my theMailManagerMessages, my theUnprocessedMailSound, my dailyServerFolder, my theCoverPagePrinter, my theLargePagePrinter, my theCoverPagePrinterMessage, my theLargePagePrinterMessage, my printerDelayCycleLargePages, my printerDelayCycleSmallPages, my theBusinessName, my TextDrawingLoops, my extensionsToIgnore, my yearlyServerFolder, my clientMax, my theJobsTally, my oldEmailList, my theUnprocessedMailSound, my serverFolder, my serverBackupState, my theAddedMonth, my theDays, my theHours, my theMinutes, my theSeconds, my errorMessage}
set p to 3
run script file theApp with parameters temp
on error errmsg number errnum
if my runForOz then tell application "System Events" to display dialog "AppDelegate's mainLoop caller " & errmsg & " errnumber " & errnum & " p = " & p as text giving up after 20
my setEMsgs(errnum, "mainMessagesView", "AppDelegate's mainLoop error. Error number " & errnum & " Error " & errmsg as text, "Error Message Orange", true, "Cochin Bold", "14")
end try
end mainLoop