Automator tutorial needed!

Discussion in 'macOS' started by Transporteur, Nov 15, 2009.

  1. Transporteur macrumors 68030

    Joined:
    Nov 30, 2008
    Location:
    UK
    #1
    Hi guys,

    Im completely new to automator and I would like to create a few little services.

    First of all I would like to create a Wikipedia service, that looks up a selected word in wikipedia.

    I added 'Get Specified URLs' and 'Website Popup' which works fine within automator, but of course it just shows the Wikipedia site, without a specified intput.

    I know that there is a service for that I could download, but I would like to know how it's done.

    What do I need to do to get this running?
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    Why do you need automator for this? In the Firefox address bar just type "wikipedia [your word here]"
     
  3. Transporteur thread starter macrumors 68030

    Joined:
    Nov 30, 2008
    Location:
    UK
    #3
    I don't want to use any browser for this because it takes time and space on the display.

    It is so much easier to just select a word within a document, and select the service which opens a small window (iPhone size) with the desired result. Takes a second.

    Same for dictionaries or whatever. It just saves time and is much more comfortable than opening a browser, selecting the webpage and then typing in the word.
     
  4. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #4
    If you want to know how it's done take a look at the attached workflow.
     

    Attached Files:

  5. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #5
    If you are going to use an iPhone sized window, I would recommend using the mobile site. Here is the URL you need:

    Code:
    http://en.m.wikipedia.com/wiki?search=
    But that into the appropriate section in the AppleScript.
     
  6. Transporteur thread starter macrumors 68030

    Joined:
    Nov 30, 2008
    Location:
    UK
    #6
    That works great. Thank you very much!
    But can't I replace the AppleScript section with 'Get specified URLS'?
     
  7. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #7
    The "Website Popup" automator action lets you set your user agent to the iPhone. Both methods work.

    No. Why would you want to do that?
     
  8. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #8
    While you may prefer to use Automator, just so you can learn it, there are other ways to accomplish what you want. I use SafariStand for right-click quick searches on various sites, such as Google, MRoogle, Wikipedia, Amazon, Apple Support, IMDb and others. With it set up, I can highlight any word or phrase, right-click and quickly search the site of my choice for those search terms.

    Here's a thread that will show how:
    How to quickly search MR Forums with Safari or Firefox
     
  9. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #9
    In my experiences, I have had better results by specifying the mobile version of Wikipedia than using the User Agent function of the "Website Popup" action. Namely, ambiguous words would sometimes not bring me to a mobile version of the disambiguation page.

    This doesn't get you a system wide search service.
     
  10. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #10
    What do you mean by "system wide"?
     
  11. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #11
    Meaning you can highlight any word on your computer (not just within Safari) and quickly look it up.
     
  12. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #12
    You can just modify your Services menu in Mac OS X to add whatever you want.
     
  13. Transporteur thread starter macrumors 68030

    Joined:
    Nov 30, 2008
    Location:
    UK
    #13
    Cause I'm not familiar with AppleScript. :eek:
    Yeah, shame on me, but anyway, I managed to modify your script to my needs.
    Works great!

    Thanks to you all!
     
  14. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #14
    Exactly.
     

Share This Page