AppleScript IssuesThere are a few tech support issues that are specific to AppleScript. Here's what we have so far, please let us know if you have additional suggestions.
Since Player is a faceless background application (and system extension), it doesn't support user interaction -- including "display dialog". While debugging, just use the "log" command (and open the log window in your script editor). If you still want to call "display dialog" in the middle of many calls to Player, just end the "tell Player", display the message, and start a new "tell Player" block:tell application "PreFab Player" -- display dialog "message goes here" -- this won't work! log "some message here" -- fine for debugging end tell display dialog "message goes here" -- this will work fine tell application "PreFab Player" -- do more stuff end tell
Style guide: nesting
Remember that Player controls the frontmost application or Control Panel. Player doesn't care how that item came to the front, nor does the "tell Player" block have to be nested in a "tell application whatever" block.
While you could say:tell application "Whatever" activate tell application "PreFab Player" -- do something end tell end tellYou can avoid one level of nesting -- and perhaps be somewhat more clear about who is doing what -- as follows:tell application "Whatever" to activate tell application "PreFab Player" -- do something end tell
Copyright 1993-99, PreFab Software, Inc. All Rights Reserved.
This site built and maintained using Stage Three, a set of custom Frontier scripts.