nikivi Posted August 3, 2016 Share Posted August 3, 2016 (edited) I would like to dismiss 'large type notification output' after some specified time like 2 seconds. Can I do that? Thank you for any help. -- NORMAL -- Edited August 3, 2016 by nikivi Link to comment
deanishe Posted August 3, 2016 Share Posted August 3, 2016 (edited) 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 53Hacky, but it works. Mostly. Edited August 3, 2016 by deanishe nikivi 1 Link to comment
nikivi Posted August 3, 2016 Author Share Posted August 3, 2016 Thank you Dean, I was actually thinking of passing it to a script that would stimulate a keystroke as well. Didn't think of the applescript solution though. This works great. Link to comment
nikivi Posted August 3, 2016 Author Share Posted August 3, 2016 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
deanishe Posted August 3, 2016 Share Posted August 3, 2016 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. nikivi 1 Link to comment
nikivi Posted August 3, 2016 Author Share Posted August 3, 2016 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 : Link to comment
deanishe Posted August 3, 2016 Share Posted August 3, 2016 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 : 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
Andrew Posted August 30, 2016 Share Posted August 30, 2016 This is now possible in Alfred 3.1 by wiring the output of the Large Type to a Delay utility for 2 seconds, then to a Hide Alfred utility. Cheers, Andrew jordikt 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now