Is there an automator script that automatically opens html links contained in a .txt file?

I want to make safari automatically open any html files that I email to myself using Send to Dropbox. I need an automator workflow that will automatically open any html files that are sent as .txt to a certain folder in my dropbox. This is the code I currently have:
ARGV.each do |f|
file = File.new(f, “r”)
while (line = file.gets)
system “open #{line}”
end
file.close
end
What am I doing wrong?
This is taken from this post: http://www.macstories.net/tutorials/how-to-send-any-webpage-from-ios-to-your-mac -browser/#comment-146806660.
As a side note, does anyone know of an easy way to send links to iphone and vice-versa? I know there is the icloud tabs option but I want something that will automatically open when I click send. It ***** that Google Chrome already has the feature and it works perfectly but Apple has yet to adopt such an extension. I find it pretty useful.
Any help would be appreciated.

I forgot to mention that I keep getting this error...
-e:2 automator invalid char `\342' in expression

Similar Messages

  • Is there a script that automates mail:to links and hyperlinks?

    In a nutshell, maybe this was already done.  I searched the forum, but cant say I found what I was looking for.
    Jim Simon can be reached at [email protected]  Jim Simon work's gallery can be found at www.jsgallery.com.   Basic stuff like this.

    Automate Creation of Hyperlinks
    An InDesign CS2 JavaScript. Put it into the "Version 4.0 Scripts" folder to make it work in up-to-date versions of InDesign.
    Finds a string in text and creates a hyperlink based on the contents of the string. This script employs a hybrid approach to finding and changing text, using both JavaScript regular expressions and InDesign's search method.

  • Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

    Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

    Frank and All,
    The following answer to your question above is complicated, but I hope it explains why my question was formed with so much frustration in it.
    I have an OpenOffice(OO) Macro that was launched with Calendar at 6pm each business night. It ran properly in all Apples operating systems until I Hit Maverick(OSX10.9). From then on, the AppleScript would run from one to 3 days, then would disappear from the Calendar entry. The Calendar alert would still run, but the "OpenFile" section of the alert would disappear. I also was running elgato EyeTV HD during the day, so I would use energy saver to put my MacBook Pro to sleep at 12 Midnight and wake it again at 9am. I picked up a used Mac Mini to do the EyeTV stuff, provide AppleTV the files in H264 format through iTunes' media share, and found it had plenty of power to do the 6pm automated stuff simultaneously as well. Because I still wanted to run the OpenOffice Macro on my MacBook Pro at 6pm, and wanted to use it for a host of other things when I was on the road, I wanted it to sleep most of the time and only wake up automatically to run the 6pm OO Macro. When I called Apple about the issue I was having with Maverick and Calendar loosing the OpenFile command as part of the Alert Message, they told me the no longer supported answering AppleScript Questions but they now would support Automator questions. I pointed out that the OpenFile would also fail after one to three days if I used a Calendar Alert to launch an Automator App. At first, I did not like Automator, but now I see why Apple is pushing us to use it. Automator adds a TIME STAMP ID to the Apps developed in Automator so the first time you launch the App after a change to it, you must reply to a dialog message saying that this is the first time you are running this version of the App. If a Scammer has replaced your app with one that can reek havoc on your computer, the replacement app will not run unless you are there to agree that you know where the modified app came from and click the OK button to continue (BRILLIANT, Enhanced Security idea on Apples part). I also noticed that after Mountain Lion, the Applescript delay timing was all screwed up as well. Well I tried to use LaunchD Task Scheduler to circumvent the Calendar Problem and that worked until I upgraded to Yosemite Last week. Then LaunchD no longer worked and I am only into a few days of using The Calendar Launched Automator App to see if it will continue to run.
    But I think I solved the dilemma I was having with opening an Automator App in a Sleeping Mac. I Googled up the following question, "AppleScript to wake up computer".  I went thru several complex responses until I found this on that is INCREDIBLE EASEY! What came back was a brettterpstra.com  response from Feb 20th,2014. What it said, in a Quick Tip: caffeinated your Terminal Article,  if you wanted to wake a Mac from sleep, use the Terminal command named "Caffeine -u -t 1". I placed it in an Automator Most Used Action called "Run Shell Script -- Caffeine -u -t 1" and it worked!  Now, I can put my Mac to Sleep but at 6pm, the Automator App will launch, run the "Caffeine -u- -t 1" command and proceed to work as if I had awakened the Mac From Sleep mode by pressing a keyboard key and had run the Automator Script with a double click.
    Sorry for the long, drawn-out reply, but maybe this will help others.

  • In the program pages there is a function that automatically will save may document not only one i click save

    in the program pages there is a function that automatically will save may document not only one i click save

    In Lion and Mountain Lion you must save the first time then it will autosave for you with versions.
    ForEverSave, a 3rd party application, might actually prompt you after a set period. Check it out and any alternatives.
    Peter

  • Is there a reader version that will open protected school books on galaxy note?

    Is there a reader version that will open protected school books on galaxy note?

    Have you tried the Adilko app for Android? Works good.

  • I found several charges on my bank account from Apple on App that is completely free. After calling the number showing on my bank statement there an automated answering that tells you to go to apple website!!! There is nobody to talk to!! Complete rip OFF

    I found several charges on my bank account from Apple on App that is completely free. After calling the number showing on my bank statement there an automated answering that tells you to go to apple website!!! There is nobody to talk to!! Complete rip OFF
    And now because I want to communicate with apple support I have to go through the hectic website and community support, this is ridiculous.
    I have 5 iPhones in my account and this makes me reconsider upgrading to iPhones again.
    Why Apple put a phone number in the bank transaction, if there is nobody to talk to!!!!!!
    I hope someone from Apple support can answer my question.

    Go to getsupport.apple.com.  Or, call 1-800-MYAPPLE.
    Just because an app is free to download doesn't mean that there aren't in-app purchases available.
    Go to iTunes on your computer, log into the iTunes Store with your Apple ID & password, and check your purchase history.  Be advised that all iTunes & App Store purchases are final.

  • Dps file automatically opening multiple times when working on another file in the same folio?

    dps file automatically opening multiple times when working on another file in the same folio? Can anybody please help

    Can you try resetting your preferences first and see if that helps - see Troubleshooting 101: Replace, or "trash" your InDesign preferences

  • Is there an upgrade for Safari to open the newest version of Adobe pdf files?

    I went to the www.cic.gc.ca website and tried to open a pdf link.  A page opens to say I need to download the latest adobe reader.  I installed the latest Adobe Reader and it is terrible.  Slow, not smooth with viewing and does not support retina display.  Had the worst time trying to uninstall it.  Successfull, but then pdf doesn't open in safari.  Then had to delete a file from go to folder /Library/Internet Plug-ins/AdobePDFViewer.plugin.  Now, it seems to be okay.  But still can't open pdf's from this site.
    Is there an upgrade for Safari to open the newest version of Adobe pdf files?

    For example, I can't open this pdf file  http://www.cic.gc.ca/english/pdf/kits/forms/IMM1294E.pdf
    I get this message:
    To view the full contents of this document, you need a later version of the PDF viewer. You can upgrade to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html
    For further support, go to www.adobe.com/support/products/acrreader.html

  • When opening microsoft word on mac it automatically opens a huge number of my word files and I have to wait for it to open them all then when i try to close them down it freezes and I 'force quit' and on reopening the same thing repeats

    When opening microsoft word on mac it automatically opens a huge number of my word files and I have to wait for it to open them all then when i try to close them down it freezes and I 'force quit' and on reopening the same thing repeatsI have to wait for it to open them all then when i try to close them down it freezes and I 'force quit' and on reopening the same thing repeats

    One thing to try/check - in System Preferences, General.  Check the box "Close windows..."

  • Is there a standard script that runs when a projector stops?

    I know there are a couple of scripts I can use to set things up when starting a Director movie (startMovie and PrepareMovie).  But are there also scripts I can use that run when the user chooses to shut down a projector?  I want to run a script that sets the user's screen rez back to its original setting before shutting the projector down.
    Thanks!
    Dewey

    Yes, I am looking at that one.  But isn't that script activated each time a .dir movie is exited, even if it opens a different .dir movie?  Or, is it only activated when the 'PROJECTOR stops?
    The script I want to run should only run when you exit the projector.
    Dewey

  • Is there an advanced action that will open and close the TOC?

    I like that in CP5, Adobe has allowed users to change the icon associated with opening and closing a layered Table of Contents.  With that said, unfortunately, they show up so small, I can't see what I created.  So, I was wondering, is there an advanced action or action script that I could assign to a button that will allow my users to open/close the TOC?
    Thoughts?
    Eric

    The code that zcarr posted works fine for me. I have been using it for a long time: http://www.cpguru.com/2010/01/14/tutorial-open-close-the-adobe-captivate-toc-from-your-own -button/
    However - it depends on where you use the code. If you use it in an SWF embedded/inserted into your Captivate project then it will work. If you use the code from a Flash shell that loads a Captivate SWF then it wouldn't work since the paths to the functions would be all wrong. The same goes if you use it in a play bar since again the paths would be wrong. The code is still valid though so all that would need to be changed would be the paths to the functions.
    Also the posted code and my link is AS2 code so it wouldn't work in Captivate 5. I'm sure that the above code could be convereted to AS3 but it would require a little "hack" in order to get to the right level of the Captivate SWF so the paths would work. It would probably be easier to build a small widget that would accomplish this if it's for AS3 projects.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

  • Is there a Plug-In that automates sequential numbering of an independent text element?

    Is there a Plug-In that will enable automated sequential numbering of a particular item of text, independent of any of the other InDesign cues? Have some very large instructional book documents that have a main numeric element that is sequential and independent from page numbering or anything else that REALLY NEEDS to be automated. If nothing exists off the shelf how much would it cost for someone to created this software for me?

    Found this link via Google. I have CS6 and it looks like this, don't know about CC.
    How to Keep a Log of Your Work in Photoshop - Digital Photography School

  • Programs that automatically open on startup

    Can anyone tell me how to STOP Skype from automatically opening on Start up of my MBPro ? It never did this and I haven't updated OSX lately, nor can I with 10.4.11. Skype now opens when I power on my mac, then hangs - always, and I have to force quit it. There is NO option in Skype's own menu list to stop it from auto opening on start up. Grrrr
    Thanks to you if you can help.

    Open the Accounts pane of System Preferences and check the list of login items for your user account.
    (54388)

  • Is there a good way to automate changing existing links to external PDFs to instead be to PDF attachments with same names?

    Greetings!
    Can anyone tell me a good way to automate changing a "main" PDF's existing hyperlinks to external PDFs to instead be links to PDF attachments to the main PDF (the attached PDFs to have the same filenames as the external PDFs) ?
    Format of current link in main PDF:
    Go to a page in another document
    File: C:\\path\filename.pdf
    Destination name: P:1
    When link is manually changed to link to a PDF that has been attached to the main PDF:
    Go to a page in another document
    File: PDF attachment
    Page: 1
    Zoom level: Fit page
    The new PDF link does not list the PDF attachment filename in the link.
    The main PDF (the one that has the links that I would like to automatically change) is generated with the hyperlinks to other PDFs from Adobe FrameMaker 11.  In FrameMaker11, we added special marker text "openpage filename.pdf:1" that is "automatically" changed to be hyperlinks to external PDFs when the main PDF is created (postscript file is processed) by Adobe Acrobat Pro 11.
    My first choice is to be able to change the format of the special marker text in Adobe FrameMaker source file, but I have not found way to specify a link to be to a PDF attachment with a certain filename.
    However, I would also really like the option of running a batch file on a main PDF to change the links there.
    Has anyone tried using that Adobe ExtendScript ToolKit CS6 to do this? That is, a script that could automatically modify the hyperlinks in a PDF to link to PDF attachments rather than external PDFs, or else modify the unprocessed links while they are still in Postscript file format, or else modify the marker text in FrameMaker to instead of creating a link to a PDF in the same directory as the main PDF being processed, to create a link to a PDF attachment files?
    Thank you,
    Judith Wallace
    [email protected]

    FrameMaker's Hypertext feature has no ability to "link" to an attachment on/in a target PDF.
    PDFs sourced from FM can have named destinations set in the FM authoring files such that a link from file01.fm to the specified named destination in file01.fm will be functional in the PDFs created from the FM files.
    Then, of course, there's the dynamics possible by use o FM Books. But that's the grist for the mills at the FM user-2-user forum.
    RE: Scripting - PDF scripting is via Acrobat JavaScript. That something still of and by Adobe although it may migrate to an ISO Standard (or be rolled up in a future ISO 32000).
    So, to the point - look to Acrobat JavaScript for scripting.
    Be well...

  • Looking for a script that will find broken links

    I create long documents in InDesign, and I often have 50-75 Indesign documents in my InDesign book. Because what I do is production publishing, at any one time I'll have a half dozen similar books under construction. All the books contain the same chapters (as far as file name an basic content). I need a script that I can run on the final PDF for each project to make sure that all of my hyperlinks/cross references are intact. This is to ensure that I didn't accidentally link to a chapter from a different project. In other words, I need to make sure that my final PDF contains both the source and the destination.
    Does anyone know where I can find a script like this?
    Thanks,
    Kelly Vaughn

    A script can't do that. Maybe a plugin.

Maybe you are looking for

  • My online banking doesn't support 4.0b10. How do I go back to 3.6?

    I would like to deinstall 4.0b10. Apparently this is a beta browser which is unsupported by my online banking account. I was doing fine with 3.6, so how do I get it back

  • Process to access .mac from new iMac

    Have 2 computers, eMac & new iMac 20" I can iWeb publish without problem to my .mac account from the eMac (in fact, have 4 different web sites online at present.) When I attempt to publish a new site using iWeb 08, I'm continually asked to sing in. F

  • Column Name values are not coming

    Hi All Something Strange problem i have received. I amusing Obiee 10.1.3 In RPD Level & DB level, a column called "CVCR" is there with length of 30 Char... It has values (say some descriptions).. "HELLO WORLD" but at webcat level its displaying only

  • My Wi-Fi randomly stopped working and will not turn on.

    So one night, I closed all my applications and did the regular routine, "procedures" if you will. The next morning, I turned on my MacBook and the Wi-Fi said it was off, and so I turned it on, but it wouldn't turn on. The little icon would stay at th

  • Where is the page listing changes in 3.6.x updates?

    There used to be a link in the "Firefox Updated" page that would take you to the page where the latest sub-versions changes were listed. Why can't I find it anymore? == after 3.6