Hi,

after moving to NSAppleScript things are working mostly okay. Just one problem 
seems to give me a senior moment. The script is simple, I know where the error 
occurs. But I can't see why.

The script:

property theAccount: ""
property dummy: ""
tell application "Mail" to return account directory of account theAccount as 
string

theAccount has the value of "pop.teaser.fr". I know that the account exists 
because the accounts are queried first.

For some reason that I don't understand, the script gives an error when 
executed. And the error routine starts. Here I get an OutOfBoundsException that 
I don't understand where it comes from

    if theError.HasKey(theScript.NSAppleScriptErrorNumber) and 
theError.HasKey(theScript.NSAppleScriptErrorMessage) then
      Globals.theErrorLog.logitem "ApplescriptError: " + 
theError.Value(theScript.NSAppleScriptErrorNumber) + ":" + 
theError.Value(theScript.NSAppleScriptErrorMessage)
    end if
    
    if theError.HasKey(theScript.NSAppleScriptErrorRange) then
      dim theRange as NSRangeMBS = 
theError.Value(theScript.NSAppleScriptErrorRange)
      Globals.theErrorLog.logitem "Error in Range: " + theRange.String
    end if
    
    if not ignoreAllErrors then
      Globals.theErrorLog.DialogErrorProceed "An error occurred: Error number " 
+ theError.Value(theScript.NSAppleScriptErrorNumber) + "! Error description: " 
+ theError.Value(theScript.NSAppleScriptErrorMessage)
    end if

If I do a test on my machine with an account that doesn't exist then I get a 
proper error message and NO OutOfBoundsException.

Does anyone have an idea what happens here any why?

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to