Copyrighted Material
Total Page:16
File Type:pdf, Size:1020Kb
Crop Images, 342–343 Symbols description display, 76 -- (double dash) characters, AppleScript Editor Download URLs, 95–96 comments, 114–115 enabling/disabling, 77 - (subtraction) operator, AppleScript, 472 Fetch FTP Upload, 6–7 & (concatenation) operator, AppleScript, 160, 165, Files & Folders, 65 473, 473 Find Finder Items, 361 ( and ) (parentheses) characters Get Folder Contents, 96, 298–299 operator precedence order, 168 Get Image URLs from Webpage, 95–96 subroutines, 216 Get Specified URLs, 95–96 * (multiplication) operator, AppleScript, 472 Group Mailer, 406–408 *” and “* (asterisk/quotes) characters, multi-line Import Files into iPhoto, 96 comments, 114–115 information display, 69 / (division) operator, AppleScript, 472 Internet, 65 ^ (exponentiation) operator, AppleScript, 165, 473 Loop, 97 + (addition) operator, AppleScript, 164, 472 Music, 65 < (less than) character, less than operator, 163, 471 New Mail Message, 415–416 = (equality), logical operator, AppleScript, 162, 470 New Text File, 415–416 > (greater than) character, greater than operator, Open Finder Items, 105–106 163, 471 option associations, 8 OttoMate, 435 A PDF, 65 Accessibility options, enabling, 102–103 Photos, 65 accounting, small business task, 57 results display, 76 action reference, Automator, 485–508 Safari Suite, 138–139 actions searches, 63–65 adding new, 6 Set Contents of TextEdit, 333–334 AppleScript objects, 129–130 Set Spotlight Comments for Finder Items, 13 Apply ColorSync Profile to Images, 336–339, 342 Spotlight, 9–16 Ask for Finder Items, 302COPYRIGHTEDText, MATERIAL 65 Ask for Text, 367–368 Watch Me Do, 105 Automated Workflows, 436–437 workflow building blocks, 74 Automator submissions, 72–73 workflow passing process, 74–76 Calendar, 63–65 workflow process, 6–8 Change Type of Images, 353 Zap Gremlins, 397 collapsing/expanding, 77 Actions library, Automator interface element, 63–65 Contacts, 65 Activate Fonts, Font actions, 491 513 Index Add Attachments to Front Message, Mail actions, 494 Address Book contact search, 401–402 Add Color Profile, Movie actions, 496 AppleScript Editor, 112–123 Add Grid to PDF Documents, PDF actions, 500 asking for text from the user, 377–378 Add Photos to Album, Photos actions, 502 automating taking pictures w/digital camera, 369 Add Songs to iPod, Music actions, 497 Boolean data type, 110 Add Songs to Playlist, Music actions, 497 calendar item search, 410 Add Thumbnail Icon to Image Files, Photos actions, 502 choose folder command, 26–27 Add to Font Library, Font actions, 491 class reference, 452–466 Adding attachments to messages project, 416–419 coercion process, 168–169 Adding audio files to an iPod project, 332–334 combining text files, 388–389 Adding songs to a playlist project, 312–315 command reference, 466–469 addition (+) operator, AppleScript, 164, 472 concatenation operators, 160, 165 Add-new item alert.scpt, Folder Action Script, 245 conditional tests, 179–185 Address Book. See also contacts considering clause, 169–170 automation task types, 50–51 containment operators, 166 birthday reminders, 403–405 control statements reference, 474–478 contact information display, 488 Creating a basic workflow to accept any files, 277 contact search, 400–403 Creating a basic workflow to process specific Contacts action, 65 files, 275 group Mail message, 488 cropping/resizing images, 344–347 item filter, 487 data types, 110 item retrieval, 488 default script folder, 27 item search, 487 development history, 110–112 smart group e-mail, 406–408 dictionaries, 133–141 vCard exporting, 487 end tell command, 18–26 alarms error numbers, 483 Calendar reminders, 404–405 expressions, 170–172 new e-mail message retrieval, 412–413 file label stripping, 25–26 albums file/folder aliases, 288 creating, 503 filtering Finder items, 290–291 photo addition, 502 Finder dictionary display, 24–25 alerts, new item, 245 finding/renaming files and folders, 282–284 alias object, AppleScript, 452–453 finding/trashing files and folders, 285–286 aliases flipping/rotating images, 355–357 creating, 490 folder content retrieval, 295–296 files and folders, 286–289 foldername variable, 23–25 ampersand (&) character, concatenation operator, get items command, 22–25 165, 473 getting items, 22–25 and (logical conjunction) operator, AppleScript, gremlin removal, 397 161, 470 handler reference, 478–479 annotations, extracting from a PDF file, 421–422, 500 identifiers, 109 AppleScript if/else constructions, 110 adding audio files to an iPod, 333 ignoring clause, 169–170 adding songs to a playlist, 314–315 image format conversion, 352–353 514 Index image group color changes, 339–342 statements, 172–173 instantiated variables, 110 straightening curly quotes, 395 iTunes song information, 324–327 tell application command, 18–26 iTunes song playback, 309–310 text data type, 110 iTunes volume setting, 319–320 text to audio file conversion, 331–332 language guide, 451–452 Unicode character set, 109 list data type, 110 Utilities variable, 511 literal expressions, 170–172 variables, 143–152 logical operators, 160–163 who should use, 112 loops, 185–192 word definitions, 391–392 mathematical operators, 164–165 AppleScript Editor myfiles variable, 25–27 AppleScript Editor menu, 118–120 new e-mail message retrieval, 411 button controls, 113–114 non case-sensitive, 109 comments, 114–115 number data type, 110 Edit menu, 121 object data type, 110 error messages, 115–116 object methods, 110 File menu, 120–121 object reference operator, 167 Font menu, 122 object-oriented language, 126–127 footer, 113–114 objects, 125–133 Format menu, 122 open command, 18–21 Help menu, 123 open location command, 20–21 information display, 113–114 opening a file with the proper application, 297–298 launching, 113 opening a folder, 18–19 opening a dictionary, 134 opening a Web page, 20–21 pinning to the Dock, 113 opening text files, 375 preference settings, 118–120 operator precedence, 167–168 saving scripts, 116–117 operators, 159–170, 469–473 Script menu, 121–122, 124 pausing/playing iTunes songs, 322 toolbar, 113–114 properties, 153–154 user interface elements, 113–114 record data type, 110 View menu, 121 repeat command, 25–26 Window menu, 122 repeat loops, 110 windowpane, 113–114 reserved keywords, 480–482 AppleScript Editor menu, AppleScript, 118–120 running, 506 AppleScript Error dialog box, code errors, 116 saving, 27 AppleScript Studio Script Editor environment, 18–19 application framework/development environment, 255 scripting language, 17, 109–110 Command Finder, 258 server connections, 294 Currency Converter, 258 set command, 23–26 launching, 256–257 space to tab conversion, 396 Mail Search, 258 specific character retrieval, 382 OpenSafari project, 259–266 specific paragraph retrieval, 384–387 Plain Text Editor, 258 specific word retrieval, 379–381 pros/cons, 259 Spotlight comments, 301–302 Simple Shell, 258 515 Index AppleScript Suite, command reference, 466 Asking for Text from the User project, 376–379 AppleScript Utility, enabling the Scripts menu, 101 assistive devices, Accessibility options, 102–103 applets asterisk/quotes (*” and “*) characters, multi-line Get file size, 233 comments, 114–115 minimal user interface application, 227 attachments, e-mail addition, 416–419 on run statement, 228 audio alerts, beep command, 198 Open a Web page in Safari, 228–231 audio files rules, 228 adding to an iPod, 332–334 Run a shell script, 231–232 importing to iTunes, 499 saving as an application, 228 QuickTime movie capture, 497 application launching, 40–41 text conversion, 330–332, 499, 504 application object, AppleScript, 453–454 Audio Support, Locations variable, 509 Applications folder Audio Supports folder, path representation, 509 AppleScript Studio access, 256–257 Automated Workflows path representation, 509 action packs, 436–437 applications AppleScript training, 448–449 AppleScript Studio, 258 Automator training, 438 file associations, 490 Automating taking pictures with a digital camera hiding, 506 project, 368–369 image flipping, 358–359 automation image rotation, 357–358 accounting, 57 launching, 506 Address Book tasks, 50–51 Locations variable, 509 application launching, 40–41 opening a file, 297–299 backups, 43 quitting all, 506 communications, 41–42 quitting selected, 506 data analysis, 37 saving a workflow as, 79 data collection, 36 saving an applet, 228 data entry, 36 user input selections, 210–211 data extraction, 39 Apply ColorSync Profile to Images, Photos actions, data integration, 39–40 336–339, 342, 502 data munging, 37–39 Apply Quartz Color to Image Files, Photos actions, 502 data transformation, 39 Apply Quartz Filter to PDF Documents, PDF actions, 500 databases, 58 Applying color changes to groups of images project, defined, 33 336–342 development history, 33–36 archives, creating ZIP file, 489 effort saver, 44–45 arguments, subroutines, 215–216 e-mails, 58 Ask for Finder Items, Files & Folders action, 302, 489 error reduction, 45 Ask for Movies, Movie actions, 496 facilities, 57 Ask for Photos, Photos actions, 502 finance, 57 Ask for Servers, Files & Folders action, 489 Finder task types, 49–50 Ask for Songs, Music actions, 497 human resources (HR), 57 Ask for Text action iCal task types, 50–51 PDF contact sheet reviews, 367–368 importance of, 2–3 text retrieval, 503 516 Index iPhoto task types, 51 asking for text from the user, 376–377 iTunes task types, 52 automating taking pictures w/digital camera, Mail task types, 49–50 368–369 manpower saver, 46 backing up documents, 6–7 marketing, 57 birthday reminders, 403–405 memos, 58 Calendar actions, 63–65,