From AppleScriptMBS to NSAppleScriptMBS

AppleScriptMBS has a ResultAsStringArray method. NSAppleScriptMBS does not. How does one get a string array from an NSAppleScriptMBS?

From my NSAppleScriptMBS wrapper RunAS, which is available here:

[code] dim count as integer = theResult.numberOfItems
for i as integer = 1 to count
dim keyword as string = theResult.keywordForDescriptorAtIndex(i)
dim item as NSAppleEventDescriptorMBS = theResult.descriptorAtIndex(i)
if item <> nil then
dim value as NSAppleEventDescriptorMBS = item.descriptorForKeyword(“seld”)
if value <> nil then
ScriptResultArray.Append value.stringValue
elseif item.stringValue <> “” then
ScriptResultArray.Append item.stringValue
end if
end if

    if UBound(ScriptResultArray) = 0 then ScriptResult = ScriptResultArray(0)[/code]


Does that help you?

Yes, because it works.
No, because I never use code I don’t understand (the AppleScript part, not Beatrix’s part). And I don’t have the time to dive into AppleScript.