• 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
How can I re-activate an already open application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I re-activate an already open application?


  • Subject: How can I re-activate an already open application?
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 16 Feb 2016 09:11:18 +1100

G’day scripters.

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?)

I’ve tried…

tell application ((path to applications folder) & "Mail Manager:Mail Manager Loop Runner.app" as text) 


and my app starts with …

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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Font variable problem in Illustrator CC
  • Next by Date: I think I'm batting my head up against a brick wall!
  • Previous by thread: Font variable problem in Illustrator CC
  • Next by thread: I think I'm batting my head up against a brick wall!
  • Index(es):
    • Date
    • Thread