Looking for an example of using Automator action in an Applescript

Does anyone have an example of how to use an Automator action in an Applescript? I want to use the Automator action that creates a note for an iPod and then sends it to the iPod inside an Applescript (I want to be able to loop through all of the text files in a folder). Any examples would be helpful. Thanks.

Hi Mike
You could save the workflow as an application and then write a simple script that tells the application to launch multiple times.
But you'll find it many times faster to do it the other way round, and run a looping AppleScript from a single Automator action.
(Your iPod must be set up in disk mode.)
set ipod_name to "Name of your iPod goes here" -- edit this line and put the name of your pod in inverted commas
tell application "Finder" to set ipod_ready to exists disk ipod_name
if ipod_ready then
set text_folder to (choose folder with prompt "Choose the folder containing notes for your iPod.")
set file_names to list folder text_folder without invisibles
repeat with file_name in file_names
set file_path to text_folder & file_name as string
if file type of (info for file_path) is "TEXT" then
tell application "Finder"
move file file_path to folder "Notes" of disk ipod_name
end tell
end if
else -- ipod not mounted
display dialog "Mount your iPod first!" buttons {"OK"} default button 1 with icon caution giving up after 5
end if
Copy and paste this into a Run AppleScript action, edit to supply the name of your own ipod, and see how it goes.
Hope this helps,
H

Similar Messages

  • Looking for an example of using a Message Driven Bean.  Anyone?

    I see that iAS 6.5 does NOT come with the newest PetStore which includes a Message Bean. I have build and deployed a MDB and I see it in the iAS admin tool but it never is automatically started (like the manual says it should)and therefore is never listening for a JMS message. The same bean (different deployment descriptor of course for iAS-ejb-jar etc) works on JBoss just fine.

    Hi Mike
    You could save the workflow as an application and then write a simple script that tells the application to launch multiple times.
    But you'll find it many times faster to do it the other way round, and run a looping AppleScript from a single Automator action.
    (Your iPod must be set up in disk mode.)
    set ipod_name to "Name of your iPod goes here" -- edit this line and put the name of your pod in inverted commas
    tell application "Finder" to set ipod_ready to exists disk ipod_name
    if ipod_ready then
    set text_folder to (choose folder with prompt "Choose the folder containing notes for your iPod.")
    set file_names to list folder text_folder without invisibles
    repeat with file_name in file_names
    set file_path to text_folder & file_name as string
    if file type of (info for file_path) is "TEXT" then
    tell application "Finder"
    move file file_path to folder "Notes" of disk ipod_name
    end tell
    end if
    else -- ipod not mounted
    display dialog "Mount your iPod first!" buttons {"OK"} default button 1 with icon caution giving up after 5
    end if
    Copy and paste this into a Run AppleScript action, edit to supply the name of your own ipod, and see how it goes.
    Hope this helps,
    H

  • Looking for an example from app gallery that uses WAAD for identity

    I'm looking for an example from the app gallery (http://azure.microsoft.com/en-us/gallery/active-directory/) that uses WAAD for identity. I need one the show our business what the process would look like for an organization signing up for a SaaS offering
    via the App Gallery. I know all the Microsoft applications use WAAD but I was hoping to find a third-party example.  What I mean is an app where all tenant and user identity is done using WAAD as opposed to federated identity.

    I doubt that what you are looking for exists yet.
    Cheers,
    Markus
    Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation

  • Looking for an example for using CreateViewObject()

    ADF 11g
    Hello
    In order to have a temporary vo for some internal processing
    I'm looking for an example for using CreateViewObject()
    If I understand things correctly it is used as follows :
    ViewObject vo = am.createViewObject("MyVO", "package1.DeptView");
    vo.executeQuery()
    // do my processing here
    vo.remove()Is this correct ?
    Regards
    Paul

    Hi Paul,
    Yes it is correct, you can find the sample code in [this post|http://radio.weblogs.com/0118231/stories/2003/01/17/usingViewObjectsInEntityObjectsForAnEfficientExistenceCheck.html] by steve muench(Search with createViewObject for quick referencing)
    Sireesha

  • Looking for istructions/examples for using winsock in Labview

    I'm looking for instructions or examples of using winsock in Labview. Looking in the NI examples I found an example using winsock UDP with Labwindows but nothing for Labview. Is the same function named different in Labview?

    Thanks for the links. Unfortunately, I am specifically looking for the ways to use WinSock (I want to collect data from a number of remote locations and the WinSock would provide me with an effective way to
    a) control the telephone number to be dialed (different for different remote stations)
    b) provide me with TCP/IP, so I could use the full power of LabVIEW seeing a remote computer as an IP address (and being able to use shared variables, web server, data socket etc. instead of me having to program all that myself)
    The other acceptable way would be to utilise a driver for a virtual network card (so I can programmically access it as TCP/IP on one side, and as a flow of bytes on the other, "virtual network cable", side). Any suggestions in this direction? By the way, it would be the best if the National Instuments would do such a virtualisation themselves. It would allow to utilise a number of solutions painlessly.

  • Looking for interMedia web sites using text retrieval

    I'm looking for web sites which use interMedia to support their site search function. My goal is to evaluate intermMedia for use as a full text search engine.
    I'm particularly interested in sites which use the thesaurus features.
    Thanks.

    There are many sites on the Internet that use interMedia Text for site search and for catalog search.
    While we don't track which Oracle customers use particular components of the database such as interMedia, here are a few good examples for you to try :-
    oracle.com - of course
    myCNN.com - CNN's personalized news service
    bol.com - on-line books, music etc.
    - Steve B.
    null

  • I am looking for labview examples related to ECG

    Hi, everyone!
    I need your help.
    I am looking for labviews examples, which are related
    to ECG for my thesis .
    I wait for your answer.
    thanks in advance

    Burcu;
    I am not sure what type of examples are you looking, so this is a start:
    Searching at the LabVIEW Discussion forum I found:
    Example
    calculate heart rate from ECG
    how to design a suitable vi to acquire ECG waveform?
    Doing a search with Google:
    LabView Exercise to model and analysis ECG/EKG data
    EE 206 MINI-PROJECT I CARDIAC MONITOR VI
    Searching an NI.com:
    PC-Based ECG Monitoring and Analysis Using BioBench (LabVIEW VIs at bottom - not sure if link is dead)
    Regards;
    Enrique Vargas
    www.visecurity.com
    www.vartortech.com

  • Looking for an example VI that shows how to trigger an event in a VI from a subvi based on a value.

    I am looking for an example VI that uses a typical event structure for the GUI, but also has an event that will trigger based on a boolean value changing in a subVI to that VI.
    Thank you.

    You need to Create User Event.  Any Event structure which is registered with the event, whether it be in a subVI or otherwise can trigger the user event by using Generate User Event.
    Right-click an event structure and select Show Dynamic Event Terminal.  This is what you use to register your user (dynamic) events.
    Search for "events" in NI examples within LabVIEW.

  • Looking for a examples of a podcast from a law enforcement agency

    Hi, I am looking for podcast examples from a law enforcement agency. Any suggestions?

    I doubt you'll find any through iTunes U which is pretty much all educational institutions, though someone might have posted something from a sociology and criminology program. You might try browsing the iTunes Store podcasts section:
    Browse -> Podcasts -> Government & Organizations
    I didn't go through the entire list, but I did see a podcast from the Center on Law and Security and one from Cop Talk Radio, so there might be podcasts of interest.
    Regards.

  • I'm looking for an example of Session Time Warning dialog

    I'm looking for an example of a Session Timeout warning dialog to warn a user that their session is about to expire.  I'd really like it to have the option to extend the session or logout.
    I have a user submitted Webapp with several fields and an image upload.  The image upload is for a copy of a professional state license.  When the user gets to this field in the form, they realize that they have to scan their form first.  They leave the Webapp Input form open, get their image uploaded finally, submit the form, then they get a message that they are no longer logged in. Any help would be greatly appreciated :)

    If your doing work on the front end like this and you feel the form is to long or things like file upload takes too long then build a multi-step form process and have the image as one of the latter steps so you can start saving the data.

  • The Wifi storage options are interesting but it seems they only allow to read files from the device on the iPad but not transfer files to the storage device via WiFi.   I'm looking for a possibility to use the iPad for photography while traveling, without

    the Wifi storage options are interesting but it seems they only allow to read files from the device on the iPad but not transfer files to the storage device via WiFi.
    I'm looking for a possibility to use the iPad for photography while traveling, without the access to a computer.
    Shooting photo's in RAW format crates pretty big files that will fill up the iPad's memory pretty fast if you shoot a lot during a (let's say) month long trip.
    my idea was to use load the photo's to the iPad so i could view them and sort out any bad ones. then copy them over to the storage device so i can continue using my CF cards for shooting. I have an image thank for copying the photo's directly to the HDD but it would be so sweet to be able to check them on the iPad before hand.
    any suggestions?

    Check out pogo plug device, it allows you to upload camera roll via wifi.

  • I am looking for an example ...

    I am looking for an example that would show me a jsp page that retrieves/displays say 20 records at a time from a query which produced say 1000 records as a result. I mean being able to go to next page as well as previous page and display 20 records at a time.
    Thanks for any help.

    It's a little bit long, be patient...
    <%@ page language="Java" import = "java.sql.*" %>
    <jsp:useBean id="myBean" scope ="session" class="bean.DataConnectionBean" />
    <html>
    <body bgcolor="#CCFFFF">
    <%
    String sql; //SQL string
    int rowPerPage=10; //Record size of one page
    int rowTotal; //Total records
    int pageTotal; //Total pages
    int pageIndex; //Pages waiting for display, from 1
    pageIndex = Integer.parseInt( request.getParameter("page") );
    rowTotal=Integer.parseInt( request.getParameter("rowTotal") );
    String sql_2=request.getParameter("sql_2");
    String sql_1= "select " +
    "vin, " +
    "ga_no, " +
    "ga_build_date, " +
    "deliver_date, " +
    "model, " +
    "year_code, " +
    "engine_no, " +
    "initial_mileage " +
    "from vehiclemaster " +
    "where ";
    sql=sql_1+sql_2;
    myBean.connect();
    ResultSet rs=myBean.executeQuery(sql);
    pageTotal = (rowTotal+rowPerPage-1) / rowPerPage; // Get total pages
    if(pageIndex>pageTotal) pageIndex = pageTotal;
    %>
    <table border="0" cellpadding="2" cellspacing="0">
    <tr>
    <td align="left">
    <div align="left">Total <%=rowTotal%> Records</div>
    </td>
    </tr>
    </table>
    <table border="0" width="844">
    <tr bgcolor="#669966">
    <th>VIN</th>
    <th>GA#</th>
    <th>build date</th>
    <th>deliver date</th>
    <th>model</th>
    <th>model year code</th>
    <th>engine#</th>
    <th>initial mileage</th>
    </tr>
    <%
    int absolute=(pageIndex-1) * rowPerPage;
    for(int k=0; k<absolute; k++) rs.next();
    int i = 0;
    String LineColor;
    while( rs.next() && i<rowPerPage && (absolute+i)<rowTotal ){
    String col1=( ( ( col1=rs.getString(1) ) == null || rs.wasNull() ) ? "" : col1 );
    String col2=( ( ( col2=rs.getString(2) ) == null || rs.wasNull() ) ? "" : col2 );
    String col3=( ( ( col3=rs.getString(3) ) == null || rs.wasNull() ) ? "" : col3 );
    String col4=( ( ( col4=rs.getString(4) ) == null || rs.wasNull() ) ? "" : col4 );
    String col5=( ( ( col5=rs.getString(5) ) == null || rs.wasNull() ) ? "" : col5 );
    String col6=( ( ( col6=rs.getString(6) ) == null || rs.wasNull() ) ? "" : col6 );
    String col7=( ( ( col7=rs.getString(7) ) == null || rs.wasNull() ) ? "" : col7 );
    String col8=( ( ( col8=rs.getString(8) ) == null || rs.wasNull() ) ? "" : col8 );
    if (i % 2 == 0) LineColor="#DBECFD";
    else LineColor="#C6E1FD";
    %>
    <TR bgcolor="<%= LineColor %>">
    <TD><%=col1%></TD>
    <TD><%=col2%></TD>
    <TD><%=col3%></TD>
    <TD><%=col4%></TD>
    <TD><%=col5%></TD>
    <TD><%=col6%></TD>
    <TD><%=col7%></TD>
    <TD><%=col8%></TD>
    </TR>
    <%i++;
    }%>
    </table>
    <div align="center">
    <table border="0" align="left">
    <tr>
    <td align="left">
    <div align="left">Page <%=pageIndex%> / <%=pageTotal%> 
    <%if(pageIndex<pageTotal){%>
    <a href="QueryVehicleResult.jsp?sql_2=<%=sql_2%>&rowTotal=<%=rowTotal%>&page=<%=pageIndex+1%>"><img src="images/next.gif" border="0">
    </a>
    <%}%>
    <%if(pageIndex>1){%>
    <a href="QueryVehicleResult.jsp?sql_2=<%=sql_2%>&rowTotal=<%=rowTotal%>&page=<%=pageIndex-1%>"><img src="images/prev.gif" border="0">
    </a>
    <%}%>
    </div>
    </td>
    </tr>
    </table>
    </div>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </body>
    </html>
    <%
    rs.close();
    myBean.close();
    %>

  • Looking for creative examples

    i know i've seen some very interesting sites (usually
    designed by/for photographers) that have big images that scroll
    horizontally (in other words, they take advantage of the infinite
    potential width of a webpage as opposed to the infinite potential
    height) but i can't seem to find them just now. can anyone think of
    any?
    thanks.

    Thanks. That's useful but it's not exactly what I'm looking for. I'm trying to bring a level of production value to my webinars that goes beyond those fixed by Connect and am looking for unique and creatives uses beyond the basics. It may not exist as Connect makes creativity difficult in this environment, but I thought someone might have squeezed a bit of beauty out of it. If so, I'd like to see it.

  • I cannot update the iphoto ap on my mac os x because it looks for the ID I used when buying it and I forget the password to that

    I cannot update the iphoto ap on my mac os x because it looks for the ID I used when buying it and I forget the password to that email.
    The emails is obsolete so I cannot get the password from the service provider.
    I have another Apple ID and password which I use - but it won't let me update the iPhoto I bought with THIS cMac

    Content and Apple IDs -
    Content is forever tied to the Apple ID that bought it. Apple does not transfer content from one Apple ID to another. Apple does not merge Apple IDs. You will never be able to access your content bought with one Apple ID with a new Apple ID.

  • Looking for an example of someone using WF_NOTIFICATION()

    I need a good example of how someone has used the special message function known as WF_NOTIFICATION() in order to embed an Oracle Framework Region in a Workflow HTML message body. I'm very familiar with the documentation on how to use the function, but would like to see a "real world" example.
    Thank you,
    Marilyn Montgomery

    Hi Mike
    You could save the workflow as an application and then write a simple script that tells the application to launch multiple times.
    But you'll find it many times faster to do it the other way round, and run a looping AppleScript from a single Automator action.
    (Your iPod must be set up in disk mode.)
    set ipod_name to "Name of your iPod goes here" -- edit this line and put the name of your pod in inverted commas
    tell application "Finder" to set ipod_ready to exists disk ipod_name
    if ipod_ready then
    set text_folder to (choose folder with prompt "Choose the folder containing notes for your iPod.")
    set file_names to list folder text_folder without invisibles
    repeat with file_name in file_names
    set file_path to text_folder & file_name as string
    if file type of (info for file_path) is "TEXT" then
    tell application "Finder"
    move file file_path to folder "Notes" of disk ipod_name
    end tell
    end if
    else -- ipod not mounted
    display dialog "Mount your iPod first!" buttons {"OK"} default button 1 with icon caution giving up after 5
    end if
    Copy and paste this into a Run AppleScript action, edit to supply the name of your own ipod, and see how it goes.
    Hope this helps,
    H

Maybe you are looking for

  • Context Senstive Help using CHM

    Hi, Is there an alternative to keyhelp.ocx to display context sensitive help based on size of content? or Is it possible to write a HTML code/Java script to control the individual page size of CHM in run-time? Thanks, Kumar

  • Repeating XML content from db and linked images

    I'm using XML to flow content from a database into an ID CS2 pub. There will be an .ai file associated with each record which will be placed into a tagged inline frame in each repeating element. I would like to store the .ai files in their own direct

  • Why is the replacement battery for my Macbook 2010 not lasting long?

    I just had a new battery installed in my mid 2010 Macbook (white) a few hours ago. Once it was done charging, I looked at the battery bar and noticed it was suddenly down to 95% even though I saw that the cord was just on green light (means fully cha

  • How to start with KM App

    Hey, I want to develop some KM(knowledge management) Applications in NWDS. Do you have any Step by Step documents or Have any Ideas about that? And also how to deploy the KM applications in NWDS, I mean which perspective do I choose, etc.. Thanks for

  • It is Possible to register apple developer account through wire transfer from India?

    Hi,            Due to lot of issues with my credit cards, I am not able to register apple developer account through the credit card. So is it possible to register developer account by wire transfer or anyother methods ? My friend told to me that from