Jump to content

Is there a way to show Alfred search bar by alfred:// scheme?


Recommended Posts

Doing this with Applescript:

 

on alfred_script(q)
	tell application "System Events" to keystroke space using command down
	tell application "System Events" to keystroke "david"
end alfred_script

 

That would open Alfred and type my name into him. If you had passed a parameter into that action (available as q) you could make Alfred type that.

Link to comment
Doing this with Applescript:

 

on alfred_script(q)
	tell application "System Events" to keystroke space using command down
	tell application "System Events" to keystroke "david"
end alfred_script

 

That would open Alfred and type my name into him. If you had passed a parameter into that action (available as q) you could make Alfred type that.

 

Thanks at first. This one works, "kind of".

 

The problems are:

- start with a little one, that the "keystroke" makes some latency, because the system needs to type in. So it seems imperfect, but it's not a big problem.

- As I assign it to command+shift+d, I have to press the hotkey and lift my fingers very fast, otherwise, it'll be command+shift+option+d+space (I use option+space to trigger Alfred 2). This is kind of a big problem for me, and I believe it's not comfortable for many to gamble the speed of apple script triggered and how fast leaving the keyboard.

 

So, as it's still in beta, I would request either way (so I can have Alfred v1 not running for only one hotkey), have "Show Alfred" action back (it's already in v1), or have "alfred://" do the similar thing, or enable apple script support (not keystroke..), or any other workable way, instead of the workaround.

 

I understand you all work hard on this, and have balanced the old features, the new features and bug fixes. I appreciate that. Please at least reconsider it a bit, even in low priority that I cannot see it in near future

Link to comment

Tony,

 

This can be avoided by using the delay command in Applescript. So between the two "tell System Events" commands, add a: delay .5 and that will add a half second delay before the next command is fired. That should be enough to get past the key press issue. I made a similar solution for someone else and this seemed to work perfectly for them (with the delay)

Link to comment
Tony,

 

This can be avoided by using the delay command in Applescript. So between the two "tell System Events" commands, add a: delay .5 and that will add a half second delay before the next command is fired. That should be enough to get past the key press issue. I made a similar solution for someone else and this seemed to work perfectly for them (with the delay)

 

Thanks, that does improve the situation, making the workaround better, I can live with it now, though it still doesn't seem perfect to me.

As a user, and also a developer, I'd like it to be perfect. If the builtin way won't be implemented, the keystroke will disappoint me a bit.

 

Thanks again, now I can close Alfred v1. :)

Link to comment
  • Vero locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...