Jump to content

[SOLVED] Help with Large Type object


Recommended Posts

I have this workflow that writes some text to a file as a bash script. This text is essentially a TODO task of mine that I can prefill from Alfred keyword or select some text and change the file.

 

My issue however is with displaying the task briefly on the screen with Large Type object. I want to make it so that if I activate this hotkey:

 

769423873_2018-07-02at14_06.png.34a8597bd392d929da0c87bf925743c0.png

 

The task shows up on the screen as it does currently. I then want to make it so that if I press the hotkey again whilst the Large Type is still showing, it will dismiss it and NOT show it up again on the screen.

 

Furthermore I want to make the Large Type disappear after 1 second if I don't actually dismiss it in the time that it is still up. 

 

My workflow is that I want to quickly see the active task on screen, dismiss it immediately once I read the task by pressing the same hotkey or running the external trigger or have it be shown for a bit and let it dismiss on its own. Can I do this?

 

Thank you for any help. 

Edited by nikivi
Link to comment

You can kind of do it, by creating a temporary file and checking for its existence. You’ll also need the Dispatch Key Combo OutputDelay Utility, and Filter Utility.

[Hotkey] Press Hotkey
     ↓
[Run Script] Temp file exists? → [Filter] yes → [Key Combo] ⎋ → [Run Script] Delete temp file
     ↓                            ↑
[Filter] No                       ↑
     ↓                            ↑
[Run Script] Create temp file     ↑
     ↓                            ↑
Show Large Type                   ↑
     ↓                            ↑
[Delay] Wait                      ↑
     ↓                            ↑
[Run Script] Temp file exists? → ↗

You need two [Run Script] Temp file exists? because the second one cannot have a [Filter] No to avoid an undesirable loop.

 

This is bound to break if you dismiss the Large Type by pressing ⎋ yourself or clicking it. But I it’s likely the best we can do right now.

Edited by vitor
Removed syntax highlighting
Link to comment
  • vitor changed the title to [SOLVED] Help with Large Type object

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...