Jump to content

before script filter,execute dispatch key combo


Recommended Posts

I currently have a requirement that my script data rely on first dispatch key combo
 
I can only do that before this script
 
But the disadvantage of this is that I have to ask the user to enter a keyword blue and press Enter to display the script data item.
 
I also want display script item directly.  and any method to implement it?
 
## Want to be
 
I want user keyword blue,I dispatch key combo, and display script item, does not need enter bt again.
 
 
image.thumb.png.bdfb79f26a43cb33bf18f3eaa1ba398a.png
image.thumb.png.dfb4a463c95535370e727fd8a0737679.png
 
 
 
 
Link to comment

This looks like an XY problem. Please explain what you want to achieve in the end, not how to reach the method you have in your head.

 

Also, when asking for help with a Workflow, please upload it somewhere (transfer.sh is a fast solution without ads; drop your Workflow in the box in the middle) as we can’t properly help you without access to it.

Link to comment

Sorry, my description is not clear. OK, I will describe it again.

 

My problem is that when I want to execute a script filter, I want to execute the dispatch key combo first.

 

because there is a system hotkey command that will perform a file write operation. I need to read this file in the script filter. any method to do it?

Edited by Alan He
Link to comment

Instead of simulating the Key Combo, why don’t you call the write operation from a Run Script beforehand—or better yet, in the Script Filter`—instead?


Key Combos are asynchronous, they won’t way for the result of whatever they called before carrying on. If you must use a Key Combo and the issue is the write isn’t happening fast enough, add a Delay Utility. But you really should go with the first suggestion, if at all possible.

Link to comment

Because of this write operation, I can only do it with hammerspoon.

 

I need it to read the battery info of the Bluetooth device of the system.hammerspoon can do it, So I disapath hammerspoon to write info ,  In Alfred, I want to display the information.

Edited by Alan He
Link to comment

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