Jump to content

Dismiss 'Large Type Notification' after some time


Recommended Posts

If you're opening the Large Type programatically, i.e. via a Large Type Output, not using CMD+L on a result, this is relatively easily done.

You can dismiss a Large Type window by clicking ESC. Therefore, you can close a Large Type window programatically by running a script at the same time as you open the Large Type window that sleeps for 2 seconds (or however long), and then simulates an ESC keypress.

In AppleScript: 

-- Wait 2 seconds
delay 2.0
-- Simulate ESC keypress
tell application "System Events" to key code 53
Hacky, but it works. Mostly. Edited by deanishe
Link to comment

I've been thinking. Wouldn't it be nice if we could specify our own objects that we can quickly reuse? There are certain objects or scripts that may contain some predefined settings that I would like to use without creating it over again or going to some other workflow and copying it from there. I think it would be nice to have. 

Link to comment

Like this?

OneUpdater works by giving you a workflow with a single object you can copy over to your own workflow. All the code is contained within the object itself (i.e. no external scripts).

For a few technical reasons, that's the most sensible way to share reusable objects.

The problem is, you're taking "reusable" objects and copy-pasting them everywhere, which is precisely what you're trying to avoid by creating reusable objects in the first place…

So, to do this properly, you'd probably need to start with a program that understands info.plist and can update objects within it (that's where all your objects will be). And you'd need to tag the elements with their ID and version somehow (a code comment in a Script Box for any object with one, but the other types?)

That way, I can just run a single command in my workflow directory to update any such objects in info.plist without having to replace the objects (and their connections etc.) by hand in Alfred's workflow editor.

There's also the drawback that you're quite limited in what you can do with a workflow object vs a code library. Alfred doesn't just let you connect any old objects together, so there's no way that I could, for example, put Alfred-Workflow's fuzzy search in a workflow element because Alfred won't let you pass more than one item to the next action. It'd have to go in a file, so it can be run/imported.

All in all, if you could build a program that could update components stored as files and/or info.plist elements, it'd probably be pretty awesome.

I guess something like zplug might be a good template.

Link to comment

I was actually thinking of a more simplistic way. That is have an option from which I can choose what custom objects I want from the ones I saved. Something like this : 

 

G0VS2Ar.png

 

 

That would require Andrew to explicitly add support in Alfred. And you'd still need all the same updating complexity behind the scenes.

Link to comment
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...