Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the results out of Applescript



I suppose it could well be.  I have to admit that on the whole I have relatively little experience with Cocoa (this is sort of a started project for me!).

Basically, I have theResult which is the result of executing an NSApplescript.  I was then using the following:

NSLog("Result: %d", [theResult stringValue])

This way I figured I could just look at the result in the log window.  Does this mean that I'm actually just using NSLog incorrectly?  Have I misunderstood the way this is used, and so in fact I should really be using something other than %d?

Either way, muchos gracias for the help!

Mike A.

On 7 Jan 2006, at 17:34, Andy Armstrong wrote:

On 7 Jan 2006, at 17:21, Mike Abdullah wrote:

With a lot of experimentation, I have been able to get both integers and booleans to work.  However, still every time I try to do

[theResult stringValue]

I just get a large, random number.  I've found plenty of examples on the Web using this stringValue method, but no mention of the problem I'm having.

Is the 'large random number' actually a pointer to the string object by any chance? How are you displaying its value?

-- 
Andy Armstrong, hexten.net


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.