13.20. Exercises

  1. Modify the program that chimes the hour to also chime the quarter-hour. Be creative in how you chime each quarter hour. You should be able to distinguish 15, 30, and 45 minutes after the hour. One possibility is to download some Westminster chime audio from the Internet, install it in iTunes, and then play the appropriate quarter-hour song from iTunes.

    Install your program into the crontab so that it is executed every 15 minutes.

  2. Here's some documentation for a SOAP service at http://www.xmethods.net:80/soap/servlet/rpcrouter that provides a price quote for a book given its ISBN number:

    Sample Request envelope:
    
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getPrice xmlns:ns1="urn:xmethods-BNPriceCheck" SOAP-
    ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <isbn xsi:type="xsd:string">0439139597</isbn>
    </ns1:getPrice>
    </SOAP-ENV:Body></SOAP-ENV:Envelope>

    Write an AppleScript program that enables a user to key in an ISBN number for a book and looks up its price. Find the current selling price for this book, whose ISBN number is 0764574000.

  3. Examine the Image Events dictionary to see what capabilities it has for performing image manipulation. Then write a Folder Action script that will scale an image file added to a folder by 50%.

  4. Recall the File Me droplet from Chapter 10. That droplet took a list of files ...

Get Beginning AppleScript® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.