This content has been marked as final. Show 2 replies
AIActionManager is popping a dialog when I run my code. It says, "The object 'Open' is not currently available"
Does that mean that the path I am supplying to the file I want to open is bad or does it mean that this Action "OpenDocument" is not available?
In my default actions list, it is not listed, but I am including "AIActionManager.h" and it is defined there.
Running CS5, but using CS4 SDK and building code for CS4. (In XCode on a Mac).
Here is a code snippet I am using:
ASErr result = NULL;
AIActionParamValueRef fActionParamValueRef = NULL;
result = sAIActionManager->AIActionSetStringUS(fActionParamValueRef, kAIOpenDocumentNameKey, ai::UnicodeString("/Volumes/volumename/subfolder/filename.ai"));
result = sAIActionManager->AIActionSetInteger(fActionParamValueRef, kAIOpenDocumentColorModelKey, kDocCMYKColor);
result = sAIActionManager->PlayActionEvent(kAIOpenDocumentAction, kDialogOff, fActionParamValueRef);