• 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
Can anyone tell me what's wrong with this code, please?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can anyone tell me what's wrong with this code, please?


  • Subject: Can anyone tell me what's wrong with this code, please?
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 05 Aug 2015 19:08:25 +1000

G’day scripters

In my main App, I’m trying to stop it working when any one of two other ASObC apps are running.

I’m testing for their processes, but the code doesn’t seem to want to work, and ‘sneaks’ past the trapping, saying ‘4’ all the time.

I’ve used a separate Applescript to verify that at least one of the Apps tests for ‘true’.

Also, the line my runningLoopInsertBottomText() works

No errors are occurring.

What am I doing wrong, please?

Regards

Santa

property mailManagerDelay : 4


on runningLoopInitializer()
ShanesFord's fordEvent()
my performSelector:"runningLoop:" withObject:(missing value) afterDelay:mailManagerDelay
end runningLoopInitializer


on runningLoop:{}
try
set p to 1
copy (current date) to my actualDate
set p to 1.03
set my resetSelector to false
set p to 1.04
try
set p to 1.16
tell application "System Events"
set my appsAreRunning to (exists process "Acrobat Printing List") or (exists process "Mail Manager ftp Folders Setter")
end tell
set p to 1.17
if my appsAreRunning then
set p to 1.18
set my mailManagerDelay to 30
my runningLoopInsertBottomText()
my runningLoopInitializer()
end if
on error errmsg
tell application "System Events" to display dialog errmsg
end try
set my mailManagerDelay to 4
say 4 —< keeps on saying
<Code>
#

my runningLoopInitializer()

end runningLoop:


 _______________________________________________
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

  • Follow-Ups:
    • Re: Can anyone tell me what's wrong with this code, please?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: What on earth does this error mean?
  • Next by Date: This forum continues to be hijacked
  • Previous by thread: Re: What on earth does this error mean?
  • Next by thread: Re: Can anyone tell me what's wrong with this code, please?
  • Index(es):
    • Date
    • Thread