Insert a Speakable Phrase in Applescript

Can anyone tell me how to insert a speakable phrase into an applescript script.
I would like to run a script and all it does is speak the pharse I have written in the script. Not run a sound.app or play a recorded clip. But speak a line of text that I have inserted in the script prior to saving it as an executable.
Dean

Hi Dean,
There are several ways to save a script and several ways to run a script.
When you save the following as an app and run it, it will say the phrase.
set the_phrase to "hello"
say the_phrase
The other main way to save the script is as a Compiled Script. You can't double click compiled scripts to run it. You can run it from another script with:
run script referenceto_the_scriptfile
You can also place a compiled script in the Script Menu and run it. You can run the compiled script as a speakable item by placing it in the Speakable Items folder. When you save that first easy script with a name like "Greetings" and turn on speech listening, the speech thing listens for the word "greetings" and replies with "hello".
That's about the main things I can think of.
Note that you can also run script apps in these ways most of the time.
gl,

Similar Messages

  • Inserting a Text Box? - Applescript

    Thanks for helping me out earlier. Now I want to insert a text box at the bottom of the page 4.5 inches wide and .5 inches tall, how do I script that in?
    This is all needed as part of a workflow I am doing with automator, and once I can solve that, then I am DONE!
    Here is my apple script:
    tell application "Microsoft Word"
      activate
              set orientation of page setup of section 1 of active document to orient landscape
              set mar to page setup of active document
              set left margin of mar to (inches to points inches 1)
              set right margin of mar to (inches to points inches 1)
              set top margin of mar to (inches to points inches 0.7)
              set bottom margin of mar to (inches to points inches 1.5)
              set alignment of paragraphs of active document to align paragraph center
    end tell
    Thanks.

    Hi,
    Here is an example :
    tell application "Microsoft Word"
          activate
          tell active document
                set orientation of page setup of section 1 to orient landscape
                tell its page setup
                      set pWidth to page width
                      set lMargin to inches to points inches 1
                      set left margin to lMargin
                      set right margin to lMargin
                      set top margin to (inches to points inches 0.7)
                      set bottom margin to (inches to points inches 1.5)
                end tell
                set alignment of paragraphs to align paragraph center
                set nP to (count paragraph)
                -- the doc must have at least two blank paragraphs at end of it before creating the textbox
                if (content of text object of paragraph (nP - 1)) is not return then insert paragraph at after last character
                if (content of text object of paragraph nP) is not return then insert paragraph at after last character
                select text object of last paragraph -- select the last blank paragraph
          end tell
          create textbox selection
          tell last text box of active document
                set height to inches to points inches 0.5
                set width to inches to points inches 4.5
                set content of text range of its text frame to "something" -- set the content of this text box
                set left position to ((pWidth / 2) - (width / 2)) - lMargin -- center the text box, no center alignment in AppleScript
          end tell
    end tell

  • How do you "save as" in Acrobat 9 via Applescript?

    Greetings all,
    I'm using the Applescript Script Editor and trying to do a "save as." The Applescript dictionary for Acrobat 9 has a reference to "save" in the Core Suite, but no matter what I try, I get an AS error that typically contains the text "document 1 does not understand the save message."
    I can do a "save as" via Applescripting that GUI but that seems problematic as well (I've set the Properties > Initial View options for document 1 after inserting a page--all via Applescript--but doing a "save as" via the GUI apparently does not save those properties. I would hate to have to script the process of having Acrobat open the file again and reset the initial view; I should be able to do that before saving the new file.
    Thanks,
    Kevin

    Hold down the OPTION key. The Save As option should appear in the File menu.

  • More questions on using AppleScript with MSoft Word

    Thank you HD for your detailed reply in the other thread on closing docs in Word using AppleScript.
    Here is another qn for all:
    How does the "execute find" command work?
    The dictionary for Word lists the following:
    execute find find
    [find text text] : The text to be searched for. Use an empty string to search for formatting only.
    [match case boolean] : Set to true to specify that the find text be case sensitive.
    [match whole word boolean] : Set to true to have the find operation locate only entire words, not text that's part of a larger word.
    [match wildcards boolean] : Set to true if the text to find contains wildcards.
    [match sounds like boolean] : Set to true to have the find operation locate words that sound similar to the find text.
    [match all word forms boolean] : Set to true to have the find operation locate all forms of the find text for example, sit locates sitting and sat.
    [match forward boolean] : Set to true to search forward toward the end of the document.
    [wrap find find stop/find continue/find ask] : Controls what happens if the search begins at a point other than the beginning of the document and the end of the document is reached or vice versa if forward is set to false.
    [find format boolean] : Set to true to have the find operation locate formatting in addition to or instead of the find text.
    [replace with text] : The replacement text. To delete the text specified by the Find argument, use an empty string. You specify special characters and advanced search criteria just as you do for the find text argument.
    [replace replace none/replace one/replace all] : Specifies how many replacements are to be made: one, all, or none.
    → text range/insertion point
    According to my AppleScript manual, those in brackets are optional parameters. I assume the second find after "execute find" refers to the "find" object, and that this is a compulsory parameter.
    I face the following problems:
    (1)
    If I try to set the text I want to find in the "find" object, I get an error. So this doesn't work:
    tell application "Microsoft Word"
              set content of find to "book"
    end tell
    I get the following error:
    error "Can’t set «class 1650» of «class w124» to \"book\"." number -10006 from «class 1650» of «class w124» to «class book»
    (2)
    If I ignore the "find" object, and use the first optional parameter of "execute find" which is "find text" to set my text to find, I also have an error:
    tell application "Microsoft Word"
              tell document 1
      execute find find text "book"
      display dialog result
              end tell
    end tell
    Error message:
    error "Microsoft Word got an error: document 1 doesn’t understand the execute find message." number -1708 from document 1
    (3)
    So the document is the wrong target for the "execute find" command, fine. But directing the command to the application won't work:
    tell application "Microsoft Word"
      execute find find text "book"
      display dialog result 
    end tell
    Error message:
    error "Microsoft Word got an error: Can’t continue execute find." number -1708
    Regards,
    junxiang99

    I know very little about AppleScripting MS Word beyond the fact that it is powerful but unforgiving. I did a Google on Microsoft Word Applescript Execute Find and found quite a few references to the correct syntax.
    This is one of them.
    Hope it helps.

  • I think I've found a bug... (CS 4 6.0.4, export to EPUB, w/ test case)

    Hi everyone,
    I think I've found a bug. I suppose I would like to see if others can reproduce it - I've managed to on 2 work machines, but the more the merrier. I suppose I'm also hoping that giving this bug more exposure will increase the likelihood of it getting resolved. I can dream
    The bug shows itself when exporting an InDesign document (or book) to "Digital Editions", or as an EPUB file. The InDesign source needs to have a Table of Contents, and this TOC has to be used by the EPUB to create TOC entries (see the "contents" tab of the export window). In certain cases, using the InDesign TOC causes the EPUB export to garble certain characters; unicode-specific characters, in my experience.
    Steps to reproduce:
    Create a new document, add a blank text frame and fill it with placeholder text. add a heading to this text frame, styled appropriately.
    Create a table of contents, using the heading style you defined and used previously.
    Add some unicode characters to the end of your text frame. I've been using "bêche-de-mer — a genus", which has 2 unicode characters. My tests have shown about 1715 characters in the text frame is enough to trigger this bug.
    Save the document and export to digital editions. under the "contents" tab, check the "include indesign TOC entries" option.
    Open the EPUB (or unzip it and view the xhtml content). I would expect to see "bêche-de-mer — a genus" at the end. However, I see something more like "b√™che-de-mer ‚Äî a genus" instead. I do see the correct output if I don't check the "include indesign TOC entries" option when exporting to EPUB.
    I've confirmed the fonts I've tried are unicode-compliant and have the relevant character codes. I'm running the latest update to InDesign CS4 (6.0.4) on OSX 10.4.11. This character encoding problem doesn't manifest itself in the PDF or IDML export, only the EPUB export. Choosing whether or not to include embedded fonts in the EPUB doesn't make a difference to the outcome. I have run this test on my machine and a workmates, which is OSX 10.5.[something]
    I'll attach a test document to see if others can reproduce this bug. I'd be interested to hear if others can, or cannot reproduce it. I have submitted a bug report at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform, but that doesn't exactly imbue me with confidence that anything will get done in a hurry...
    This problem is pretty annoying; I can either have EPUB navigation, or uncorrupt text. My current (proposed) workaround is for the operator to create 2 EPUBs, one with a TOC and one without, and merge the two together... EPUB transplant if you will. A bit ugly....
    thanks for listening!

    Hiya Joe (and Archie)
    It is indeed an annoying bug - I spent a few days looking around it before posting (wow, it must be nearly a year ago now).
    Fortunately, it really is straightforward (if a bit of a hassle) to workaround:
    - make 2 EPUBs, identical except one will have a TOC generated (epub-a), the other will not (epub-b)
    - extract the TOC file from epub-a and insert it into epub-b
    remembering that EPUB is a zip package, this is very easy indeed. On OSX you have /usr/bin/zip and /usr/bin/unzip to assist with extraction / insertion in a script (bash, applescript, etc). I don't think Windows comes with command-line zip programs, so you'd need to hunt around a bit.
    Good luck. I don't know if this is resolved in the latest 6.0.5 patch - if you haven't updated to that, it might be worth a shot. And if you have and it's still a problem, please respond to this message just so there's a log stating as much.
    Steve

  • What uncompressed video format can Apple TV play?

    Hi folks. I'm thinking about buying an Apple TV to stream video files from my Windows iTunes instance. Does the Apple TV support any uncompressed video formats? Like MKV?? Thanks.

    Mpeg2 is still a very highly compressed format.
    There are a couple of basics relating to compression that you might wish to consider. The aspects of compression discussed hereinafter are not necessarily technically correct but are an analogy to help you understand a little about compression.
    Firstly as Jon points out earlier, uncompressed video is essentially for editing and would never be used for delivery, compression of some data will make no difference to quality at all as some of the data that forms an uncompressed file is redundant anyway.
    A very simple example of this would be a blue screen. Every pixel on that screen is blue and every frame of that video is the same as the first, an uncompressed video would record data about every pixel for every frame, you can see how much space can be saved if you were able to provide data for just one pixel and tell the device to simply replicate it for every pixel in every frame. (There are about 23,000,000 pixels in each second of 720p video).
    You can also compress non redundant data by replacing it with a calculation that simply regenerates the original data (or close to) from information about neighbouring frames, such a calculation typically takes up much less room than the data it replaces.
    In considering the later example you will note the insertion of the phrase 'close to', depending on the amount and the type of compression 'close to' could mean so close you could not possibly notice or nothing like it at all. The less you compress the data the more likely 'close to' means so close you could not possibly notice.
    In addition to the amount of compression, the type of compression used is extremely important, a simple calculation will not produce the same quality as complex calculations, you might consider here mpeg2 (the type of compression used in your DVD's) as a simple calculation, it therefore can't compress video all that much before it starts to lose quality and therefore the video files need to be fairly large.
    Now consider a more modern type of compression such as mpeg4/10 (the type of compression used by the Apple TV) which is much more complex and therefore able to compress video much more than mpeg 2 and retain the same quality, so much so that you likely won't see any difference in quality between your mpeg2 video and the same video compressed to 20% the size.
    In summary, you will hopefully see that there is absolutely no point trying to keep your video in it's original format, it will simply take up much more space on your hard drives and you won't get any value from it.

  • Pages 2.0 / Applescript / Inserting an image

    Heya all,
    I'm trying to write a script that inserts a pdf from the desktop into an image placeholder in a pages 2.0 template.
    Having looked at the applescript dictionary, I'm quite confused since there seems to be a way to do that, but I can't figure out how...
    would anyone know how to do that ??
    that would help me a great deal,
    thank you.

    Pages doesn't have many custom verbs, but it makes use of make and set.
    Astroboy asked about changing an existing image placeholder, which uses set.
    To create a new image (insert), use make:
    <pre>
    tell application "Pages"
    tell (make new document with properties {template name:"Blank"})
    -- Floating, at 6, 2 inches (uses your units preference setting)
    make new image with properties {image data: alias ":Library:Desktop Pictures:Nature:Ladybug.jpg", horizontal position:6.0, vertical position:2.0}
    -- Inline at the very end.
    make new image with properties {image data: alias ":Library:Desktop Pictures:Nature:Ladybug.jpg"} at after every text of body text
    end tell
    end tell
    </pre>
    In addition to a file alias for the image data, you can use picture data, like you might get from an image field in FileMaker, or the clipboard in Standard Additions.
    Titanium PowerBook   Mac OS X (10.4.4)  

  • Inserting text into a Pages document with Applescript

    I want to create a Pages document from a custom template but be able to insert text at various points in the document (inputted data under headings etc). I would like to use Applescript but cannot get insertion points to work, is this possible? As usual, all help gratefully accepted.

    I have made a Pages template that contains tables and I want to enter text into sections of these tables
    That's a completely different story! But that's still possible using GUI Scripting. Here's an example:
    tell application "Pages"
        activate
        select table 1 of body text of front document
        tell application "System Events" to tell process "Pages"
            set theWindow to window 1 whose role description is "standard window"
            click button "Table" of tool bar 1 of theWindow
            keystroke "Cell A1"
            keystroke tab
            keystroke "Cell B1"
            key code 125 -- down arrow
            keystroke "Cell B2"
            -- and so on
        end tell
        select insertion point after table 1 of body text of front document
    end tell

  • How to insert a date in a numbers cell from applescript?

    Hey guys,
    I was just wondering, I got this list of dates that i want to change with this handler that i call datachanger, i use it to seperate dates like these 1994-11-07 and reassemble them. Now what i would like to do is to reassemble them in such a way that i can insert every item in datalist in numbers cells. Now it gives me a weird error. How do i have to change the things between bas3 and bas2 to get it to fit in a numbers cell without an error? or do i have to use the quoted form of it before i can insert it?
    SCRIpt
    on datumchanger(datumlist)
        set a to 1
        set datalist to {}
        repeat with bas in datumlist
            set AppleScript's text item delimiters to "-"
            set bas1 to text item 1 of bas
            set bas2 to text item 2 of bas
            set bas3 to text item 3 of bas
            set datumitem1 to bas3 & "," & bas2 & "," & bas1
            set the end of datalist to datumitem1
        end repeat
        return datalist
    end datumchanger
    SCRIPT
    Help is so much appreciated:)
    Thank you so much in advance:)

    As I carefully wrote in several scripts posted here, when we want to insert a date in a Numbers cell,
    we must coerce it to a string.
    --{code}
    set date1 to "" & 1 & "-" & 1 & "-" & 2012 -- it's a string
    set date2 to "" & 1 & "/" & 1 & "/" & 2012 -- it's a string
    set date3 to current date -- it's a date
    set date4 to "1994-11-07"
    Here is the safe way to build a date which will behave well on every localized version.
    I use the short date string to set the time component to 00:00:00 *)
    set date5 to date (short date string of (current date))
    set year of date5 to 1943
    set month of date5 to 12
    set day of date5 to 31
    tell application "Numbers" to tell document 1 to tell sheet 1 to tell table 1
              set value of cell "B2" to date1
              set value of cell "C2" to date2
              set value of cell "D2" to date3 as text
              set value of cell "E2" to date4
              set value of cell "F2" to date5 as text
    end tell
    --{code}
    On my machine the format yyyy-mm-dd is accepted but I don't remember if it's the standard behavior or if I added this format in the dedicated resource file.
    Yvan KOENIG (VALLAURIS, France) lundi 30 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • Applescript and insert names without extension (Mail)

    Hi,
    my script does the following when i drop a video file on this app:
    1. transcode it to ogg
    2. copy the name and insert it in a newly created mail in the Subject and Message with "NameOfFile"
    It is nearly perfect but it copies the file extension in the new mail, too.
    How do i get the app to insert only the name without the Extension??
    Best Regards
    Lysard
    on open of droppedFiles
              tell application "Finder"
                        set NameOfFile to name of item (item 1 of droppedFiles as alias)
              end tell
              repeat with nextDroppedFile in droppedFiles
                        set videoname to POSIX path of nextDroppedFile
                        if videoname contains "." then
                                  set oldDelims to AppleScript's text item delimiters
                                  set AppleScript's text item delimiters to {"."}
                                  set videooutput to text 1 thru text item -2 of videoname
                                  set AppleScript's text item delimiters to oldDelims
                        end if
                        set SettingPfad to POSIX path of (path to me)
                        tell application "Terminal"
                                  do script ("ffmpeg2theora " & quoted form of videoname & " -f 30 -x 720 -y404 -V1500 -A 128 --two-pass -o " & quoted form of videooutput & "_XYZ.ogv")
                        end tell
                        tell application "Mail"
                                  set theSubject to "Anlieferung " & NameOfFile & " _XXX"
                                  set theContent to "Hallo,
    " & NameOfFile & " ist availible here:
    xxx
    BR
    ME"
                                  set theAddress to "[email protected]"
                                  set theSignatureName to "Signatur 1"
                                  set msg to make new outgoing message with properties {sender:"[email protected]", subject:theSubject, content:theContent, visible:true}
                                  tell msg to make new to recipient at end of every to recipient with properties {address:theAddress}
      --tell msg to make new attachment with properties {file name:theAttachmentFile as alias}
                                  set message signature of msg to signature theSignatureName
                        end tell
              end repeat
    end open

    There are a couple of points in your original script that should be addressed.
    One you are dropping files on the script and sending them out as mail messages but because you are setting the filename before you actually loop through the dropped files all mail messages will have the same filename. You should move
    tell application "Finder"
                        set NameOfFile to name of item (item 1 of droppedFiles as alias)
              end tell
    Inside the repeat to get the actual filename in each mail message.
    Then this
    if videoname contains "." then
                 set oldDelims to AppleScript's text item delimiters
                 set AppleScript's text item delimiters to {"."}
                 set videooutput to text 1 thru text item -2 of videoname
                 set AppleScript's text item delimiters to oldDelims
    end if
    While it works is defeating the whole point of setting the text item delimiter.
    Once you do
    set AppleScript's text item delimiters to {"."}
    then text item 1 of videoname is the filename and text item 2 is the extension ie:
    set videooutput to text item 1 of videoname
    will get the name of the file into videooutput
    In fact you could just use videooutput as the name in the mail message.
    regards

  • Insert Applescript in ObjC with variables?

    Hello,
    I know you can insert Applescript in ObjectiveC like this:
    NSString *myScript = [@"display dialog \"This a a dialog pop up\""];
    NSAppleScript *script = [[NSAppleScript alloc] initWithSource:myScript];       
    [script executeAndReturnError:nil];
    But if I want to use a variable, which is defined by ObjectiveC (before the applescript has started), how do I do that?!
    (Example:)
    NSString *myScript = [@"display dialog \"This a a dialog pop up\" & TheVariable"];
    NSAppleScript *script = [[NSAppleScript alloc] initWithSource:myScript];       
    [script executeAndReturnError:nil];
    OR
    NSString *myScript = [@"display dialog \"This a a dialog pop up\"" & TheVariable];
    NSAppleScript *script = [[NSAppleScript alloc] initWithSource:myScript];  
    [script executeAndReturnError:nil];
    OR
    NSString *myScript = (@"display dialog \"", TheVariable, @"\"");       
    NSAppleScript *script = [[NSAppleScript alloc] initWithSource:myScript];       
    [script executeAndReturnError:nil];
    The three scripts above doesn't work  
    My second question is How to set a ObjectiveC-variable to the return/output of an applescript?
    NSMutableString *scriptText = [NSMutableString stringWithString:@"property theapplescriptvariable : "Bye"\n"];
        [scriptText appendString:@"set theapplescriptvariable to \"Hi\"\n"];
       [scriptText appendString:@"return theapplescriptvariable\n"];
    (For the script above, it would be something like:)
    Set theObjCvariable to the output of [NSMutableString *scriptText]
    Please help,
    Isaiah

    Hi,
    Drake69 wrote:
    I want to use a variable, which is defined by ObjectiveC (before the applescript has started), how do I do that?
    Here is an example, %@ is the contents of the variable.
    NSString *theVariable = @"Hello world";
    NSString *myScript = [NSString stringWithFormat:@"display dialog \"This a dialog pop up, %@\"\nreturn button returned of the result\n", theVariable];
    NSLog(myScript);
    the log ---> display dialog "This a dialog pop up, Hello world"
    return button returned of the result
    Drake69 wrote:
    My second question is How to set a ObjectiveC-variable to the return/output of an applescript?
    Like this:
              NSString *scriptText = [NSString stringWithFormat:@"property theapplescriptvariable : \"Bye\"\n"
                                                                                          @"set theapplescriptvariable to \"Hi\"\n"
                                                                                          @"return theapplescriptvariable\n"];
              NSAppleScript *script = [[NSAppleScript alloc] initWithSource:scriptText];
              NSAppleEventDescriptor *resultDescriptor = [script executeAndReturnError:nil];
              NSString *output = [resultDescriptor stringValue];
              NSLog(output);
    the log --->  Hi

  • Applescript to get the current insertion point of the cursor

    How do I use Applescript to get the current insertion point of the cursor in a Apple pages.app document?

    Oops, missed that one - you are correct, the line should be:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">set {TheStart, TheEnd} to character range of the selection</pre>
    I have a wrapper script that I use to insert stuff from my handler/code library into a Script Editor document, and was adapting snippets from that for my examples - I guess that one got away.
    As for the dictionary, some applications just have poorly written or outdated documentation. Some of the items have multiple entries (eg, there may be a selection object for the application and also for the document), and some inherit properties from other items. Some are used as nouns, others as verbs (or both). Sometimes it is easier to visualize the item by keeping track of it's reference - the 'some property of document 1 of the current application' thing. You can use the Script Editor's Event Log to see the results of various properties and commands - for example, the above script will result in the following entry (your numbers will vary depending on the selected text):
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">tell current application
    get character range of selection
    {50, 50}
    end tell
    </pre>
    You can also use the 'log' statement (eg, 'log MyVariable') to add your own entries into the log instead of using dialog boxes.

  • Use AppleScript to remove a specific word/phrase from Multiple Folder names

    Within one of my folders I have hundreds of Folders that have specific words or phrases in the names I would like to remove using apple script.
    For instance if the folder names all contain the word "Default" what script could I write to remove "Default" from the names of all folders with it in the name.
    So, if folder is named "bobDefault"  how could I get it to remove Default and keep bob and then continue on the rest of the folder names within the main folder.  I appreciate any help you may provide.

    The following should do the trick (if there's always a space before the left parenthesis):
    set theFolder to choose folder
    tell application "Finder" to set theNames to name of folders of theFolder
    set theNewNames to {}
    repeat with thisName in theNames
         set P1 to offset of "(" in thisName
         set P2 to offset of ")" in thisName
         if P1 * P2 > 0 then
               try
                     get (text (P1 + 1) thru (P2 - 1) of thisName) as integer
                     set theString to text P1 thru P2 of thisName
                     set thisName to replace(space & theString, "", thisName)
               on error
                     -- no change
               end try
         end if
         copy thisName to the end of theNewNames
    end repeat
    tell application "Finder" to repeat with k from 1 to (count theNames)
         try
               set name of folder (item k of theNames) of theFolder to (item k of theNewNames)
         end try
    end repeat
    on replace(A, B, theText)
         set {TID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {A}}
         set {theTextItems, AppleScript's text item delimiters} to {text items of theText, {B}}
         set {theText, AppleScript's text item delimiters} to {theTextItems as text, TID}
         return theText
    end replace

  • Applescript to insert graphic from file into Pages document

    I am trying to insert a picture from a file into Pages using Applescript, i.e. I am trying to do via script the same thing as the Menu command " Insert" followed by "Choose...".
    I have tried the following Applescript and variants of it but it does not work:
    set theFile to "xxx_HD:Users:xxx:Desktop:PagesScripts:picture.pct"
    tell application "Pages"
    tell document 1
    tell body text
    set thePar to make new paragraph at end
    set contents of thePar to make attachment theFile
    end tell
    end tell
    end tell
    I am not even sure that " make attachment" is the right command to use to insert a graphic from a file. I have not found any information anywhere on this. Can someone help please?

    Pages '09 should still be in your Applications/iWork folder.
    What do you like in the "new look"?
    Peter

  • Applescript: display dialog until memory card is inserted

    I'm developing an applet to automate the process of copying video footage from my camera's memory cards onto my hard drive. It works perfectly, except that I cannot quit it. Here is the part of the code that needs help. It checks every 5 seconds for a memory card and, if one is inserted, continues to copy everything off it.
    repeat
         set cardIn to 1
              with timeout of 86400 seconds
                        tell application "Finder"
                                  repeat while cardIn is 1
                                            if exists disk "EOS_DIGITAL" then
                                                      set cardIn to 0
                                            else
                                                      delay 5
                                            end if
                                  end repeat
                        end tell
              end timeout
         (the rest of the code)
    end repeat
    The problem is that there is no way I can find to quit once it is in this wait loop. The menu command to quit and the Command-Q hotkey both do nothing so I have to force quit when done. What I'd like is to be able to have a dialog displayed asking this user if they want to quit while it's waiting, but I don't know how to do that without it having to "give up after 5 seconds". That makes a new dialog display again every 5 seconds when it rechecks for memory cards, which would get very annoying for anyone using the computer.
    I wish something like this would work...
    repeat until (list disks) contains "EOS_DIGITAL"
         display dialog "Waiting for card..." buttons {"Quit"}
         tell me to quit
    end repeat
    ...but it still waits for a button to be clicked in the dialog. I want this to be a truly automatic process, where plugging in a memory card triggers the whole copy process (which is already done and works perfectly) so I would rather not have to click a button to continue.
    Is there any way to have a dialog displayes with a quit button that automatically goes away once a memory card is inserted without using "giving up after x seconds"?

    Keeping a script or application locked up inside delays or repeat loops will keep it from responding to system events.  There are a few ways to monitor when a volume gets mounted:
    Write your application using AppleScript in Xcode to watch for a workspace notification;
    Use launchd or a folder action to watch the /Volumes folder (an alias is added to the folder when a volume is mounted);
    Make your script into a stay-open application and use an idle handler to periodically check.

Maybe you are looking for

  • Hp slate 7 voicetab android os not Update

    This morning I got a system update on my HP Slate7 Voice Tab for android KitKat 4.4.2. After the download was over, it asked for a system reboot. However, on rebooting, the following image appeared on the screen: I tried doing a factory reset but tha

  • Preview doesn't recognize CR2 files

    Hello, I had recently bought an iMac but I'm unable to open cr2 files when I'm trying to do a double click to open in Yosemite. Although I can open them in Lightroom 5.7 and could not in CS6(understand I need to upgrade it). I know there should be a

  • Logical File names for OHS

    Hi all, I wanted to create the files names dynamically I know we can use transaction file and define a logical name with variables and assign value sto the variables to get the physical name. my requirement is to fetch different values for the variab

  • Can't get Firefox to open maximized

    Despite specifying in icon properties that I want Firefox to open a maximized window, it always opens as a normal window. Is there some setting somewhere that needs to be changed in order to get it to open maximized? Thanks, Ellen

  • Cisco SG300-28 / SGE2000 / Catalyst 2960

    Hello everyone, I'm looking for switch to accompany Cisco ASA 5520 in data center, with 20+ GE ports and no need for PoE. I would like to understand the difference between Cisco SG300-28, Cisco SGE2000 and Cisco Catalyst 2960, 2960-C and 2960-S Serie