I call and execute apple script in main thead below
NSAppleScript *as = [[NSAppleScript alloc]
initWithSource:@"tell application \"Finder\" to sleep"];
[as executeAndReturnError: NULL];
[as release];
but does not work, while the script
tell application Finder to sleep
works well in AppleScript Editor.
your comment welcome