• 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
why isn't this 'call the main script'working, please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why isn't this 'call the main script'working, please


  • Subject: why isn't this 'call the main script'working, please
  • From: Brian Christmas <email@hidden>
  • Date: Sun, 14 Dec 2014 10:38:56 +1100

G’day once more scripters.

I obviously don’t understand how calling scripts from one to another works.

I’m calling a script ‘MainProcessingLoops’ from my ‘AppDelegate’ script. When I need to move a mail item, I’m trying to call the ‘transferMessage’ method in ‘AppDelegate’ from ‘MainProcessingLoops’ script.

Trouble is, it’s failing, and instead referring back to the main calling ‘MainProcessingLoops’ method, with an error of ‘AppDelegate's mainLoop caller Can’t get item 1 of missing value. errnumber -1728  p = 2’.

My calling ‘MainProcessingLoops’  method is…

set {theMessageID, theCurrentMailbox, byPassPrint, RTFDName, shortRTFName, rtfdDateTimeName, printDateTimeName, barCodeDateTimeName, attachmentBarCodeDateTimeName, errorMessage, tryToSave, didItPrint} to current application's MainProcessingLoops's mainLoop:{mailManagerDesktopFolderPath, MailBoxProcessName, MailBoxStoreName, MailBoxReCycleName, ReCycleFlag, sayEveryErrorMessage, theMailManagerState, MMWorkingDate, theLastMidnight, ftpPrintFlag, serverFolder, dailyServerFolder, yearlyEmailOrdersServerFolder, didItPrint, serverBackupState, RunForOz, mainMessagesView, my DailyName}


My '‘‘MainProcessingLoops’ method is…

on transferMessage(currentMailItem, theNewMailBox)
try
tell application "Mail"
try
set currentMailItemID to message id of currentMailItem as rich text
on error errmsg
display dialog errmsg
end try
try
set theCurrentMailbox to name of mailbox of currentMailItem as rich text
on error errmsg
display dialog errmsg
end try
end tell
say 9 —< says ‘9'
    #
# The relevant caller, which fails
#
current application's AppDelegate's transferMessage:{currentMailItemID, theCurrentMailbox, theNewMailBox}

on error errmsg
display dialog "TransferMessage in mainProcessingLoops " & errmsg
end try
end transferMessage

My ‘transferMessage' method in ‘AppDelegate.applescript’ is…

on transferMessage:{currentMailItemID, theCurrentMailbox, theNewMailBox}

say 1 — < never gets called

etc

etc



I did have a lowercase ‘a’ in ‘AppDelegate’, but fixed it with TextWrangler to be sure it altered to ‘A’.

What am I doing wrong please?

Regards

Santa




 _______________________________________________
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: Re: Requesting assistance with 'Mail' app
  • Next by Date: Re: Another 'AppDelegate' addressing problem
  • Previous by thread: Re: Requesting assistance with 'Mail' app
  • Next by thread: Re: Another 'AppDelegate' addressing problem
  • Index(es):
    • Date
    • Thread