Jump to content

luckman212

Member
  • Content Count

    58
  • Joined

  • Last visited

About luckman212

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sorry if it wasn't clear but I am actually asking for the opposite- I would like to be able to make ⌘L show the text "as typed" and ⌘⌥L show the "calculated" value with commas (or whatever other delimiter is set) @Andrew
  2. But then there would need to be 2 separate actions: "execute" vs. "edit". I guess you could have something like hold down command/option to go to the editor, but that seems like it could be even more confusing. How would that lookup work though? You'd have to enter in those additional keywords somewhere in the workflow anyway, no? At that point I don't see what's worse about it.
  3. Right but it doesn't execute them, it just opens them in the workflow editor... unless I misunderstand the OP, the request is about setting up multiple keywords/aliases to trigger a workflow (mnemonics)
  4. But this is about running workflows, not about finding preferences -?
  5. Related suggestion: https://www.alfredforum.com/topic/13777-keyword-aliases/
  6. Yes, I suggested https://www.alfredforum.com/topic/12717-multiple-keywords-to-trigger-the-same-script-filter/ it a little while ago... Great idea and would be immensely useful to those of us "scatter brains"
  7. Also, I know about the preference below, but when using the Calculator, I actually DO want the commas so, not ideal...
  8. As someone in my 40s, Large Type is a godsend for me and I use it multiple times daily. I am often displaying long numbers such as 125761245542 and I want them shown "as-is" but Alfred defaults to adding commas: 125,761,245,542 I know about the ⌘Cmd+⌥Opt+L shortcut to display it without them but muscle memory usually makes me forget that and it's a little cumbersome. I'd love to have an option to toggle that so that the ⌘+⌥+L becomes the feature that ADDS the commas, and the default behavior of LargeType was to show "as-is". Thank you so much
  9. Thank you @deanishe (and @Andrew of course) Reading from the db does seem like a good way to go. I'll save this thread for reference, when I have a bit more time to work on it.
  10. Ok, well the end goal is a workflow that displays the most recent N clipboard history items and upon selecting one, "types" it to the foreground app by simulating keystrokes (AppleScript `keystroke`). The reason for this to exist is e.g. some websites don't allow copy/paste so you want to "type" something into a field. Or Remote Desktop / ARD / other remote control sessions where a "paste" doesn't always work. This might not be useful for many people but I use it all the time. Here's the workflow as it stands if you want to see: https://github.com/luckman212/alfredworkflows/blob/master/Type.alfredworkflow.zip?raw=true
  11. Trying to create a workflow that references items from the clipboard history (up to 25, 50, or more). So I want to set up the variables programmatically via a loop vs. tediously like { "alfredworkflow" : { "variables" : { ... "clip30" : "{clipboard:30}", "clip31" : "{clipboard:31}", "clip32" : "{clipboard:32}", "clip33" : "{clipboard:33}", "clip34" : "{clipboard:34}", ... } } }
  12. I assume that this is just a limitation. Created a feature request ...
  13. I have a Script Action that outputs { "alfredworkflow" : ... } JSON to set variables. The script is ruby/python and generates NNN number of "clipNNN" variables that are set to {clipboard:NNN} contents. This doesn't work. It creates the vars but they are just statically set to the literal "{clipboard:1}" etc. See related thread. It would be quite a lot better if the placeholder substitution also applied to dynamic Script Action JSON output.
  14. @deanishe that worked! So the script is: require 'json' json = {} cc = 20 for i in 0..cc do varname = 'clip' + (i).to_s clipname = '{clipboard:' + (i).to_s + '}' json[varname] = clipname end puts({ "alfredworkflow" => { "arg" => "{query}", "variables" => json }}.to_json) So now the script generates "perfect" output, BUT instead of substituting {query} and {clipboard:1} etc. values, Alfred is setting these as literal values. E.g. instead of the actual query or clipboard history contents, I'm getting the literal text "{clipboard:1}". edit: here's a python version of the same script, also suffers from the same problem of non-substituted variables import json, os obj = {} j = {} varlist = {} cc = int(os.getenv('CLIP_COUNT', 3)) for i in range(cc): varname = 'clip' + str(i) clipname = '{clipboard:' + str(i) + '}' varlist[varname] = clipname j['variables'] = varlist j['arg'] = '{query}' obj['alfredworkflow'] = j print json.dumps(obj) Seems impossible that this would be the way the Dynamic Placeholders feature was designed. Do I need to ask @Andrew ?
  15. @deanishe sorry to ask, but could you possibly nudge me in the right direction on this? I'm trying to dynamically generate the JSON to set variables using a Script Action (ruby). Got this: require 'json' json = [] cc = 20 for i in 0..cc do varname = 'clip' + (i).to_s clipname = '{clipboard:' + (i).to_s + '}' json.push( varname => clipname ) end puts({ "alfredworkflow" => { "arg" => "{query}", "variables" => json }}.to_json) Which generates almost the right output, but not quite (the variables are output as independent items in []'s instead of as direct descendants of `variables`. Any idea what I'm doing wrong here?
×
×
  • Create New...