Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by dfay

  1.   In any case here's the code (from the workflow linked above) - it's a pretty trivial bit of AppleScript - the function call is just there b/c I had it lying around.


    on alfred_script(q)
    	click_menu("Finder", "Window", "Merge All Windows")
    end alfred_script
    on click_menu(app_name, menu_name, menu_item)
    		tell application app_name
    		end tell
    		tell application "System Events"
    			tell process app_name
    				tell menu bar 1
    					tell menu bar item menu_name
    						tell menu menu_name
    							click menu item menu_item
    						end tell
    					end tell
    				end tell
    			end tell
    		end tell
    		return true
    	on error error_message
    		return false
    	end try
    end click_menu


  2. Here's what I use - called from a keyword with space & argument required, in a Run Script object set to osascript (AS) with input as {query}


    on run
    	set theQuery to "{query}"
    	tell application "HoudahSpot"
    		search theQuery template POSIX file "/Users/username/Library/Application Support/com.houdah.HoudahSpot4/Templates/templatename.hstemplate"
    	end tell
    end run


  3. On 2/2/2021 at 7:49 PM, Chris Messina said:

    Alfred could better support routing x-callbacks or deeplinks directly to the corresponding native apps, rather than going through a browser first.

    This thread started out with a complaint about an issue which does not actually exist.  Yes, the UI is old and probably predates the widespread use of URL schemes on MacOS, and hence might be confusing if you haven’t tried calling a URL scheme from Alfred.  But why not try it and see what happens before posting criticism?  I suspect that’s what put people off.

  4. No, the OS handles it (via LaunchServices), and sends it to the registered app for the URL type.  You can test this by typing craftdocs:// into Alfred and then into Safari - when you call it directly from Alfred the app opens straight away, when you call it from Safari, you need to confirm that you want to allow a web page to open the app.


    More details here: https://kaihao.dev/posts/Make-your-own-custom-URI-scheme-resolver


  5. If you look at the metadata the kind of these is “App Library” not “Folder”.  But I’m not sure if that will help with a solution - I set up a targeted workflow as you describe for ScanBot & it still works despite the app name changes.


    I just tried dragging one into a file filter and its kind is as if it’s a folder even though it’s not.  

  6. That script was by automation legend Rob Trew - he's still active on the DT forums as houthakker and on GIthub here: https://github.com/RobTrew/tree-tools and/or @complexpoint on Twitter.


    But I can also take a look in the next few days at what you're trying to do - I also use BibDesk.  BD & Skim & DT allow for more through automation than any other combo. of apps. I can think of, so it's well worth learning AppleScript if you're going to work with that combo.  (In fact I don't use TeX at all but I use BibDesk just because of its scriptability...).



  • Create New...