Using applescript with iCal

I have been using an applescript to create a unique combo of new events over the course of a school year for multiple people. I run the script to make a new events in an untitled calendar, export the calendar and then create a new untitled calendar and run it again. 60 or so different times, all with unique combos. I've posted this question to the Applescript forum with no replies, and thought I'd try here. My issue is that when iCal starts to make new events it begins at somewhat arbitrary dates, cycles through the whole year correctly, but jumps around in such a way that it seems to really bog the script down. Now maybe it is a script issue, although this script has worked correctly in the past. Maybe it is a permissions/cache issue (I've run Onyx and it helps with the speed). Currently it is starting to make new events on the 26th of Oct when the year foes from sept 7,2010 to June 7 2011. I'm convinced that I can get that 26th of Oct to change by trashing the cache or something (I'll work on that), a simple restart does not influence it. The script in the end does work, so maybe I'm troubleshooting something that is minor, but I'd love to know the answer! Thanks for the help.
dan

So I ran the automation tab of Onyx to repair permissions, execute maintenance scripts, clean the cache... and now when the applescript runs it makes the first new event on a different date than Oct 26...(don't quite remember right now what it is). The question is what is controlling this...??? ARGH
dan

Similar Messages

  • I want to use applescript with keynote

    I recently purchased Keynote specifically because there is an applescript that purports to run a Keynote presentation and use text to speech to provide narration from the notes on each slide.  I found the script and some supporting materials on http://www.macosxautomation.com/applescript/selfpreso/index.html.  However, this was produced a few years ago and a few versions of applescript and Keynote ago.  So, I need to accomplish the same feat with the current versions of these products.
    But I'm having a great deal of difficulty finding references that tell me much about using applescript with Keynote.
    Can anyone help me out with this?

    If you create an account for him you can setup Parental Controls.
    iTunes: Using Parental Controls
    Create a new Apple ID here.
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/21/wo/mz0CVVrDn8QtH1s 3uYclhM/10.0.31.145.6.3

  • Adding all day events using applescript to ical

    Hey all. I am new to using applescript. Thanks to some top users i have been able to get excel events file transfered into ical.
    I need help with the applescript for changing these events from time duration to all day.
    tried
    set the start time to 00:00 and end time to 24:00 and
    set all-day to true
    any help would be greatly appreciated!!
    thanks.

    I have the exact same problem. I have entered birthdays for people I know starting with the year of their birth and never ending, an all-day event. They now don't show in 2007, but there is a detached event on January 1, 2000. When I delete that event and all subsequent versions of it, the initial event now ends in 2006 or 2007, and I have to set the repeat to end Never again. I fixed all the ones from February that showed up. Now I notice that a huge amount of the other birthdays (all day events) that I have entered are doing it now, and we are talking well over 40 of them. I don't understand why it keeps creating these detached events. I also publish my calendars, if that makes any difference.

  • Who Uses Applescript with Aperture and Why?

    From time to time, I come see Applescript mentioned by Aperture Users. The Apple Support website devotes a few paragraphs.
    For an amateur with lots of time. how would Applescript make my experience with Aperture any better? It automates what?

    http://www.apple.com/aperture/resources/pdf/Aperture_3_AppleScript_Reference.pdf
    http://apertureexpert.squarespace.com/forum-applescript/
    http://www.macosxautomation.com/applescript/aperture/publish/index.html
    http://www.macworld.com/article/2033806/import-like-a-pro-in-aperture.html
    There's also an application that will give you lots of statistics on your Aperture library (lenses used, etc):
    http://www.apertureexpert.com/inspector
    I'm pretty sure it uses AppleScript to get the data.

  • 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.

  • Applescript with iCal

    Hi All,
    I'm trying to write an applescript to dump those events from a calendar that lie between today and a future date I specify. For each event, on a single line I want two tab separated values - the date and the event summary.
    Here's what I came up with -
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    #!/usr/bin/osascript
    on run argv
    set so to ""
    tell application "iCal"
    set endDate to (AppleScript's date (item 2 of argv))
    set curDate to (current date)
    set curDate to curDate - (time of curDate)
    repeat with e in (every event in calendar (item 1 of argv) ¬
    whose (start date) is greater than or equal to curDate ¬
    and (start date) is less than or equal to endDate)
    if so is not "" then set so to so & "\n"
    set so to so & (short date string of AppleScript's date (start date of e)) & "\t" & (summary of e)
    end repeat
    end tell
    end run
    </pre>
    This works as long as I do not use "short date string of AppleScript's date". However when I try to get the short date string i get this error -
    <pre>
    [puneet@bluestreak scripts]$ ./iCalEvents.AppleScript personal 4/3
    ./iCalEvents.AppleScript:444:461: execution error: Can’t make short date string of date (date "Saturday, March 28, 2009 12:00:00 AM") into type Unicode text. (-1700)
    </pre>
    Can someone point out what am I doing wrong ? (I know AppleScript only since yesterday :P)
    thanks in advance,
    regards,
    Puneet

    I'm just guessing, but I'll say that you're being too verbose.
    set so to so & (short date string of AppleScript's date (start date of e)) & "\t" & (summary of e)
    (start date of e) is already a date object, so there's no need to coerce it to another date object, and there's certainly no need to coerce it to "AppleScript's date".
    So I'd suggest:
    set so to so & (short date string of (start date of e)) & "\t" & (summary of e)

  • How to use AppleScript with AccountEdge for printing?

    Hi all,
    Can AppleScript be used to print an AccountEdge invoice to a folder, quit this invoice, then increment the number of invoice to be opened by +1 and repeat the procedure with this invoice too? I am new to AppleScript and not familiar with its limitations.
    The version I'm using is AccountEdge Plus NE 2010. I also found this link to sample scriptswww.accountedge.com/updates/ but cannot unfortunately access it as I'm outside the US.
    I would be very grateful for your help. Thank you very much!

    When you run a script like that from Applescript the environment it runs in is not the same as when you run the command from the terminal. Specifically where the file is being written is not where you think.
    Try giving a full path to the output file say -0 ~/quotes11272013.txt to force the file into your home folder.
    Post back if you still have problems

  • Using Leopard with iCal, Apple Remote Desktop, and Quicktime/Keynote

    Hi,
    I need to create the following 'synergy' or workflow or 'automation' between these softwares:
    - iCal
    - Apple Remote Desktop
    - Quicktime/Keynote
    This is the application:
    Remotely controlling (ARD) and scheduling (iCal) several quicktime/keynote files for display (ie. playing full screen video but controlling which file is playing from home).
    How can I integrate all softwares?
    Extended application:
    I would also like to know if Leopard or any Apple software has the capability to read serial (RS-232) commands. For example, I would like to know and/or be advised if a screen/monitor is turned off (regardless if the computer is properly displaying the content or not).
    I look forward to your feedback.
    Thanks,
    LMB1980

    It is if you are trying to stream it.
    Users may want to stream their music into a third party program such as Ventrilo (as I do) to share their music (but not their libraries) with other listeners and speak on Ventrilo at the same time. You need two user profiles running Ventrilo at the same time, and two user profiles running iTunes.
    When I roll over to User Profile #2 after setting up iTunes to stream into Vent in User Profile #1, iTunes stops playing. This is a recent change. It's annoying.
    How do I change it?

  • Using AppleScript with saved Find/Replace Queries

    Hello all,
    I have been trying to create a script with AppleScript to apply a sequence of pre-saved queries created in the find/replace dialog in InDesign CS5 to all open documents.
    I am fairly new to AppleScript and I'm still learning, but this seems like a task it should be able to do? The queries are named 01, 02, 03 etc and I'd like to apply them in order to adjust the text formatting in all open documents.
    Is this the best way to approach the problem or do I need to reproduce the queries within the script?
    Many thanks in advance for any advice.

    Is this the best way to approach the problem or do I need to reproduce the queries within the script?
    Putting them in the script is much more robust. Have you looked at the sample script FindChangebyList?

  • Using Applescript with POP3

    Hello everyone. I am a recent switcher and I'm wanting to get into Applescript. I have ordered "AppleScript: The Missing Manual" in order to get my foundation.
    Anyway, one idea I have for an Applescript application is to check my POP3 email accounts without the need for Mail to be running at all times. There are tons of programs like this for Windows but surprisingly few for Macs. Plus, the ones available for old and no longer supported.
    Does anyone know how to get Applescript to interact with POP3? I'm sure there's not native support from within Applescript but perhaps there's a plugin, etc that does.
    I appreciate your help!
    Bronson

    Welcome to Macs and AppleScript! One of the great Mac-only apps is Growl, a customizable unified notification system that works with all kinds of Mac OS X applications. They even have an Apple Mail plug-in. There is also a Mail dashboard widget that doesn't require mail be open.

  • Using AppleScript with Toast to burn MP3 disc

    I'm trying to get Toast to add all the subfolders of a chosen folder to a new MP3 Disc. The attached script works fine except it adds the source folder, then puts all the subfolders inside it.
    IE Disc layout becomes
    Source Folder
    ----> subfolder 1
    ----> subfolder 2
    How do I add just the subfolders of folderSelected?
    set folderSelected to choose folder "Select a folder"
    tell application "Finder"
    set folder_name to name of folderSelected
    end tell
    tell application "Toast Titanium"
    activate
    set myDisc to make MP3 disc
    set name of myDisc to folder_name
    add to myDisc items folderSelected
    end tell

    Sorted it with a small code change:
    set folderSelected to choose folder "Select a folder"
    tell application "Finder"
    set folder_name to name of folderSelected
    set sourceList to every folder of folderSelected
    set NoOfFolders to number of items in sourceList
    end tell
    tell application "Toast Titanium"
    activate
    set myDisc to make MP3 disc
    set name of myDisc to folder_name
    repeat with j from 1 to NoOfFolders
    add to myDisc items (item j of sourceList as alias)
    end repeat
    end tell

  • HT5914 Using AppleScript with Accessibility and Security features in Mavericks

    I have an AppleScript that works fine when run from the AppleScript Editor and has an errorr when run as an App.  This problem is described by the following knowledgebase article: http://support.apple.com/kb/HT5914   However, in my case the first error appears, but the second dialog does not.  I've tried Signing the AppleScript, but the error remains.  Any suggestions?

    A regular AppleScript application saves its properties to the script in the application bundle, which is seen as a new (different) application.  If your script doesn't need to keep its properties (e.g. to save some current value for the next run), you can try making the script read only, then add the application to the Privacy list.

  • Using scripts with different versions of AppleScript

    Hi,
    I have a script that works perfectly in my Apple Script Editor v2.4.3 and Language AppleScript 2.2.1   I've given that script to a friend of mine with AppleScript Editor 2.7 and Apple Script Language 2.4
    The script does not work properly in their AppleScript Editor, does anyone know why this might be and/or how to remedy it?  Is there a way for them to download Language 2.2.1 to use or is there a way to figure out how I need to update my code to work for the 2.4 language.
    Thanks

    Hello
    Whilst scripts using certain features of the latest version of AppleScript language won't even complile on previous versions, scripts written for previous versions should usually work in later versions with some exceptions.
    cf.
    https://developer.apple.com/library/mac/releasenotes/AppleScript/RN-AppleScript/
    https://developer.apple.com/library/mac/releasenotes/AppleScript/RN-AppleScript/ RN-AppleScript.pdf
    - Notable change introduced in 10.8 is new requirement on referencing file system object.
    E.g.,
    open "/path/to/file"
    may work under 10.7 but not under 10.8 or later. Instead you need to use:
    open "/path/to/file" as POSIX file
    etc.
    - Notable change introduced in 10.9 is new requirement on using Accessibility and GUI scripting.
    cf.
    OS X: Using AppleScript with Accessibility and Security features in Mavericks
    http://support.apple.com/kb/HT5914
    Good luck,
    H

  • Using Applescript for uploading pictures on the Internet

    Hello!
    I was wondering if there was a way to use Applescript with Firefox (or another browser)...?
    We have many many villas on our website, each one with lots of pictures. We are constantly adding new villas to our site and amending old ones.
    To add pictures we go to a page in our cms for each villa, located there is a drop down menu - image 1, image 2, 3 etc etc etc
    For each one we have to manually browse for and attach the photo. As you can guess this is a time consuming process, we have asked the web designer before for this but he is so busy and we have other more important stuff for him to be working on.
    As Applescript is so nifty I was wondering if anybody had an idea on how to use it for this process - i.e. have a folder full of pictures on the desktop and Applescript can add them?
    I have no idea if this is possible, any ideas?
    Many thanks and regards.
    Simon

    Yeah I completely understand, I just wanted to see if anybody knew if it could be done.
    Obviously for security reasons I can't let anybody into our CMS, so looks like it's a bit of an impossible task.
    Although it would be awesome to simply change the script slightly for each villa and let it do it all, this would be stupidly complicated as there are many menus to navigate to get to the uploading picture area.
    It would be great if I could do all that manually then once on that page (or given the page url to Applescript) set Applescript running to upload all the images for me.
    This is what that page looks like, if this helps?!:
    http://img535.imageshack.us/img535/241/screenshot20100415at141.png
    The drop down menu contains:
    Villa Plan
    Small Location Map
    Image Gallery 1
    Image Gallery 2
    etc
    etc
    I could arrange a folder with the pictures in order (i.e. Villa Plan first, then Small location Map, then the picture for 1 etc) so no worries about the Villa Plan and location map.
    I've got a feeling I'm just going to have to do it manually (I shall forever be uploading pictures), but I thought I would give it to some of you geniuses to mull over!
    For whoever creates a script I'll give you a discounted stay in Paradise... there's an incentive!!
    Many thanks and regards,
    Simon

  • How I generate index markers using Applescript and tagged text!

    One of the challenges I've faced in automating the book making process using Applescript with inDesign is that there don't seem to be any AS commands for making new index markers (anyone please correct me I if I'm wrong about this).
    I've tried various js scripts which do an OK job, but they don't make the actual native markers. This means you have to wait until the book (consistiing of multiple ID files) is complete (so that all the page numbers have been established) to generate the index.
    Recently, I read a tweet from someone with a link to a technique which uses tagged text and find and replace with GREP to edit the tags, inserting the tagged text index tags in the text file and then re-placing the text file in the ID page. In itself, this works great. But I'm dealing with literally thousands of separate text frames, none of them connected in a story.
    The books typically consist of around 1200 pages with almost that many people, each of whose names I need to index with "Lastname, Firstname" references. And those particular strings don't (can't) appear anywhere on the pages. There will also be about 50 ID files all combined into one book. So it is imperative that I have ID generate the native index markers. To help keep things straight and efficient, I'm creating separate small text frames to hold the lastname, firstname strings. I created an object style for these frames which sets the attributes to "nonprinting", and I place the frames in the margin.
    Then I realized that I don't actually have to have ID export the tagged text files for each. I exported one prototype and copied its tags to properties in my script, and then I concatenate them with the respective list item values I import from the database.
    At the proper point in the page building script, I tell "textwrangleer" to make a new document, set its contents to the index string for the current record, save it to disk, overwriting the previous one, and then tell ID to "place" it in the index text frame, which generates the ID index mark.
    I actually got an AS error when I first tried this: "file doesn't exist" or some such. Then I realized that the "place" command was happening too soon, so I inserted a .5 sec delay in the script, and it worked.
    This is actually my first major script for actual work, and I'm so excited about it! I promises to cut production time down to about a thenth of what it was.
    I still have to add some logic to branch between handlers with slightly different parameters for five different page formats, but the same page building handler will work on all of them.

    A note on this:
    Daniel Swanson wrote:
    I've tried various js scripts which do an OK job, but they don't make the actual native markers. This means you have to wait until the book (consistiing of multiple ID files) is complete (so that all the page numbers have been established) to generate the index.
    These scripts typically search for words and immediately write out the page numbers they are found on -- one shot indexing.
    The solution is to add both the topic and its page reference to the current document's index:
    if (app.activeDocument.indexes.length == 0)
        app.activeDocument.indexes.add();
    app.activeDocument.indexes[0].topics.add(app.selection[0].contents).pageReferences.add(app.selection[0]);
    The first lines only make sure there is an index to add to (per default, a new document has none).
    The last line adds a selected word to the index (it must be a plain text string, hence the use of its 'contents'), and then adds a reference to the selection in the text itself.
    Adding the same word a second time will for a change (quite untypically for ID's Scripting) not result in an error but simply add another page reference to the existing one.
    When doing this in a loop: remember to work backwards, because the index marker itself gets inserted into the running text, and that will throw off your text indices.

Maybe you are looking for

  • Raw Plug In 7.3 and or 8.2 Mac

    I have now lost most of today trying to install (Mac 10.6.8) Raw Plug ins for Canon 6d (7.3) and/or Canon g16 (8.2).  I've followed numerous threads and links and still no luck.  Photoshop tells me it is up to date.  Why must this be such an agony Pe

  • Create a link in a table calls sql statement

    Hello, I'm very new to htmldb but need to complete a project within a tight timeline. I created a sql report in a region. On each row, I have an on/off link, which used to trigger a sql statement. It turns a flag on and off in a table. Key needs to b

  • How do I set up the 9 "home" pages on the "New Tab"

    There are 9 "home" squares to pin 9 sites on the "New Tab", for easy access for favorite sites. How can I pin these to stay in place, when I cannot even get them to show up in the blank spot? I know how to "pin" tabs at the top and I know how to "pin

  • Illustrator CS6 - Black?

    Hi, In an Illustrator document in RGB mode, why black R 0 G 0 B 0 is translating to C 91 M 79 Y 62 K 97 by default? Isn't it weird? Does it mean I will use 4 times more ink to print my black? Still in RGB mode, when I try to make black with C 0 M 0 Y

  • Sharing Photo's

    I am new to mac, anything I do know is self taught. I have a macbook and imac both are OS 10.4.8. How can I share photo's between my mac, and my windows based pc?