I’ve googled, but can’t find a definitive answer.
I want to leave an application open, and periodically call it into action from another app. It runs OK on the first ‘activate’, but not on subsequent ones. I’ve tried ‘activate’ again, but it does not seem to work.
Should ‘activate’ work, to re-run the app, or do I need to do something different? (perhaps an infinite loop?)
on applicationWillFinishLaunching:aNotification
set my ShanesFord to current application's ObjectWithFords's alloc()'s init()
my initializingRoutineTwo()
end applicationWillFinishLaunching:
on initializingRoutineTwo()
say "one " & my byPassTest as text
if (my byPassTest) then
repeat 2 times
say "Two " & my byPassTest as text without waiting until completion
try
repeat 10 times
set theFileName to ((path to desktop) & "Mail Manager Loop Runner Variables.dat" as text)
tell application "Finder" to set existsFile to exists file theFileName
if existsFile then my setUpTwo()
do shell script ("sleep 0.1")
end repeat
on error errmg number errnum
tell application "System Events" to display dialog "Mail Manager Loop Setter's setUp error " & errmsg & " Error number " & errnum giving up after 60
end try
#
try
repeat 10 times
set theFileName to ((path to desktop) & "Mail Manager Item Printer Variables.dat" as text)
tell application "Finder" to set existsFile to exists file theFileName
if existsFile then my setUpPrinters()
do shell script ("sleep 0.1")
end repeat
on error errmg number errnum
tell application "System Events" to display dialog "Mail Manager Item Printer's setUp error " & errmsg & " Error number " & errnum giving up after 60
end try
end repeat
end if