Doug Adams
07-18-2003, 04:07 PM
You can display AppleScript code in your message by using vb Code. The vB Code button labelled "#" on the Post New Thread form will place CODE tags around whatever you paste into its box. Additionally, I put SIZE=1 tags around the CODE tags to make the script smaller on the page and less likely to crowd up and wrap in the message. You don't have to do that, however. This is how my code looks:
tell application "iTunes"
set theP to view of front window
repeat with theT in every track of theP
tell theT
set comment to "What a comment!"
end tell
end repeat
end tell
Scripts are easier to read when indents are maintained by using the CODE tags.
You can use the Services menu in your browser to create a new AppleScript in Script Editor 2 Beta (http://www.apple.com/applescript/script_editor/beta.html) from selected webpage text. Otherwise, you can plain old copy-and-paste snippets from a forum messages to Script Editor.
Since this is a public forum, you understand that any AppleScript code you post can be seen, copied, and used by any users of this forum. Don't post snippets from your super double-secret project if you expect it to remain super double-secret.
:)
tell application "iTunes"
set theP to view of front window
repeat with theT in every track of theP
tell theT
set comment to "What a comment!"
end tell
end repeat
end tell
Scripts are easier to read when indents are maintained by using the CODE tags.
You can use the Services menu in your browser to create a new AppleScript in Script Editor 2 Beta (http://www.apple.com/applescript/script_editor/beta.html) from selected webpage text. Otherwise, you can plain old copy-and-paste snippets from a forum messages to Script Editor.
Since this is a public forum, you understand that any AppleScript code you post can be seen, copied, and used by any users of this forum. Don't post snippets from your super double-secret project if you expect it to remain super double-secret.
:)