Results 1 to 7 of 7

Thread: Firefox capture script

  1. #1

    Default Firefox capture script

    I've cooked a little F1 capture script for Firefox to help me while evaluating EagleFiler. The excellent help provided made it very easy.

    Code:
    on capture()
    	tell application "Firefox"
    		set theURL to «class curl» of window 1
    	end tell
    	return {{|url|:theURL}}
    end capture
    or, if you are using one of the optimized builds, the equivalent for BonEcho:


    Code:
    on capture()
    	tell application "BonEcho"
    		set theURL to «class curl» of window 1
    	end tell
    	return {{|url|:theURL}}
    end capture
    Save either as "org.mozilla.firefox.applescript" in ~/Library/Application Support/EagleFiler/Capture Scripts/, creating the "Capture Scripts" folder if it does not exist. Do not save the BonEcho script as org.mozilla.bonecho.applescript!

    If you run into trouble, paste the code in Script Editor and make sure it compiles cleanly. To debug, temporarily remove the first and last lines and hit F1 in Firefox. The output window of Script Editor will show the URL that will be passed to EagleFiler.

    Good luck.

  2. #2

    Default

    Thanks, Dylan! I didn't realize it was possible to do this, since it doesn't show up in Firefox's dictionary. Here's a modification to allow a single script to work with both application names:

    Code:
    on capture()
        tell application "System Events"
            set theProcess to first process whose creator type is "MOZB"
        end tell
        tell application (theProcess's displayed name)
            set theURL to «class curl» of window 1
        end tell
        return {{|url|:theURL}}
    end capture

  3. #3

    Default

    Great! I was actually wondering how you could accommodate both browsers with just one script. Thanks a lot, Michael.

  4. #4

    Default

    As of EagleFiler 1.1, the Firefox capture script is built-in.

  5. #5

    Default

    It gives me an error here (Can't get «class curl» of window 1. (line 6) with Firefox 2).

  6. #6

    Default

    Quote Originally Posted by Jose L. Rodriguez View Post
    It gives me an error here (Can't get «class curl» of window 1. (line 6) with Firefox 2).
    It's working for me with Firefox 2.0. Did you have a browser window in the front when you pressed the capture key?

  7. #7

    Default

    Yes, the browser window was in the front but same error (as described) 3 times.
    Now works well after restarting.

Similar Threads

  1. hotkey capture from Opera
    By thoresson in forum EagleFiler
    Replies: 14
    Last Post: 05-20-2008, 11:08 AM
  2. Question about Entourage script bloating...
    By BuckSFinUK in forum SpamSieve
    Replies: 6
    Last Post: 04-25-2007, 08:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •