Jump to content

hfr

Member
  • Posts

    19
  • Joined

  • Last visited

Posts posted by hfr

  1. Hi, I sometimes ran into the problem that there still was some formatting (e.g. URLs) in my clipboard even though I pasted it as plaintext. With this tiny script, there will be nothing but plaintext left. Have fun.

     

    Download

    Source

     

    I linked it to Command+Option+Shift+C (equivalent to paste as plaintext). Saves me time every day.

     

    (I'm new to this, please tell me if I misbehaved in any way)

  2. I added a few lines to your great script, vitor, to use Firefox as my default browser.

    "Open tab in Firefox" works out of the box, switching back to previously active tab works with a tiny modification in Firefox (see below). Here's my code:

     

    osascript <<EOF
    tell application "System Events" to set myFrontMost to name of first item of (processes whose frontmost is true)
    if myFrontMost is "Firefox" then
    	tell application "Firefox"  
    		activate
    	    	open location "${url}"
    	tell application "System Events" to key code 48 using control down
    	end tell
    end if
    EOF
    pbcopy <<< "${email}"

     

    To enable "return to previously viewed tab", do the following in Firefox (otherwise Firefox will show you the newly opened tab with tempmail-URL):

     

    -    browse about:config
    -    find browser.ctrlTab.previews
    -    set true
    
    (via https://superuser.com/questions/290704/switching-back-to-last-tab-on-firefox)

    Have fun.

  3. Hi Vitor,

     

    thanks for your work. Unfortunately your workflow does not do anything for me. I installed it, ran the updater, can see both "tmpmail" choices, but none of them does anything. No tab opens, nothing gets copied to clipboard. No matter whether I give an argument after "tmpmail" or not.

     

    That's what the debug says:

    Starting debug for 'TemporaryEmail'

    [2017-06-21 15:51:34][input.keyword] Processing output of 'action.script' with arg ''
    [2017-06-21 15:51:36][action.script] Processing output of 'action.script' with arg ''

     

    Any advice?

  4. Only from the other direction, unfortunately. If you use AppleScript to keystroke a snippet keyword, Alfred expands the snippet.

     

    So assuming zzname is a snippet Keyword for your name and zzemail is a snippet keyword for your email address, this AppleScript will type the snippet triggers (which Alfred or another snippet expander app will expand), tabbing between fields in between:

    tell application "System Events"
        keystroke "zzname"
        delay 0.3
        -- Simulate TAB keypress
        key code 48
        delay 0.1
        keystroke "zzemail"
        delay 0.3
    end tell
    Nowhere near as convenient as kicking it off via a snippet Keyword, but it might be of use to somebody.

     

     

    Thanks for the workaround! Let's see what future updates will bring. :)

  5.  

    Looks like Maschine (and many other music apps) are Java-based.

     

    This is a known bug in Java, which caches the clipboard content until focus in OS X changes. You can find more details in the Java bug tracker here:

     
    If you place Alfred into focus compatibility mode in the Appearance > Options, you can still use your snippets within a Java app, but you'll need to use them from Alfred's Clipboard Viewer (and type to search for your snippet). Alfred's compatibility mode makes sure focus is taken away from the Java app when showing, which means Java updates the clipboard.
     
    Hope this helps :)
     
    Cheers,
    Vero

     

     

    …helped a lot. Thanks, Vero! I'll wait for that Java update then. :)

  6. > You can already insert tabs in snippets but a form will not use them to change field

     

    I think there is confusion here between:

     

    1. TAB to cycle between fields in an external form (on a webpage) 

    2. TAB to cycle between fields of a snippet that has placeholders

     

    I'm referring to option 1 - cycling through fields in an external form.

     

    (Typinator is capable of doing that, Alfred not at the moment)

  7. My Snippets are not expanding in Native Instruments software (e.g. Maschine 2) - everywhere else it works. I can hear the expanding sound, the keyword disappears, but no Snippet appears.

     

    (The software is not excluded from expanding in Alfred's prefs)

     

    Thanks.

  8. I am afraid that nothing can be done on Alfred side,

    but it's more a problem about how forms work.

    You can already insert tabs in snippets but a form will not use them to change field, just like you can create in a text editor a string containing tabs and the forms will still not fill.

     

    I have no idea how complicated this would be - but it should be possible (see Typinator or KeepassX). Please correct me if I'm wrong.

  9. Alfred doesn't trim the snippet, and I have quite a few that are both multi-paragraph and have blank spaces at the end, all of which work fine.

     

    What are you pasting into? Is it possible that the app you're pasting to is trimming the white spaces?

     

    You're right, it seems to be Mail's problem, in other apps it works without the additional blank.

  10. Hi,

     

    when I create a Snippet that has more than one paragraph at the end, it cuts all but one. Sometimes I like to have a Snippet that auto-fills a few lines and then enters a few empty lines.

     

    (For now it helps to fill my "empty lines" with one blank each. This way all the paragraphs go through).

     

    Thanks.

×
×
  • Create New...