Jump to content

shmulvad

Member
  • Content Count

    7
  • Joined

  • Last visited

  • Days Won

    2
  1. Okay, I didn't know that - thanks for letting me know! The workflow is now updated to use JSON. I'll agree with you, that is much cleaner.
  2. Roman Numeral Converter Convert between roman numerals and arabic integers Installation To download, visit the latest release at GitHub. All further updates are handled automatically. Description This is a fairly simple workflow for converting between roman numerals and arabic integers. This has been made before by Tyler Eich (Packal link), but hasn't been updated since 2015 and stopped working on my computer during an Alfred or macOS update (can't remember which). But I had an use case for this, and therefore I made a new version written in Python for this simple task. In Alfred, type rn and enter either your roman numeral or arabic integer. Selected result is copied to your clipboard. The expression is being evaluated as you type it. If the expression cannot be evaluated, for example if you are using illegal characters, user will be notified about that. Note The workflow doesn't support incorrectly written roman numerals, i.e. "IC", and will also notify user about this: Credits The workflow makes use of the following code to focus on the implementation of the conversion between the number systems rather than focusing on a lot of Alfred Workflow related stuff. OneUpdater to easily check for updates by vitorgalvao. Alfred Workflow Feedback XML Generation to easily add items by lrrfantasy.
  3. After first reinstalling the workflow and then restarting my Mac it now works again. I am (and was) using macOS 10.14.1 and Alfred v. 3.7. Sorry for not trying this out before commenting.
  4. This workflow seems to not work for me anymore. Maybe it happened during the update to Mojave. Anyway, I was wondering if anyone knows of a nice workflow that accomplishes the same thing as this?
  5. I really wanted the feature I describe above, so I went ahead and modified the code to achieve this behaviour. I don't have any experience with Perl, so I guess the stuff I have rewritten is pretty poorly written code, but for now it works. This is what is now shown when the workflow is called with an expression that can be evaluated: And this is what it looks like when you insert an expression that can't be evaluated: I have forked the original repo and made a pull request. For now, the modified workflow can be downloaded from here,
  6. I really find this workflow useful and have been using it a lot. Would it be possible to add to it, so that instead of having to press a modifier key to copy different results other than binary and then view them, the result in both decimal, hex, binary and octal is immediately printed to the screen as four separate items in Alfred? And then copying a result is just done by selecting the corresponding item?
  7. Hey I'm trying to make an AppleScript to be run from Alfred, that should quickly set a specified speaker as audio output device if it is currently connected (in example below "My Awesome Speaker"), and otherwise don't do anything. I have gotten most of the functionality down (toggling between speaker/internal speaker), but I'm having a problem in the instance that the speaker isn't connected. When this is the case, the script has already clicked on the audioMenu, making the dropdown be there until a mouse click. I thought I could make it go away by branching with an "if else" and then if the speaker isn't connected, then just clicking the audioMenu again (because I've seen similar behaviour (with succes) for other menu bar scripts). But if I instead do this, the audio dropdown will still be staying until a click has been made, and then the script clicks the audio icon again making it doubly annoying. on alfred_script(q) set speakerName to "My Awesome Speaker" set internalSpeakers to "Internal Speakers" activate application "SystemUIServer" tell application "System Events" tell process "SystemUIServer" -- Working CONNECT Script. Goes through the following: -- Clicks on Audio Menu (OSX Top Menu Bar) -- Clicks your speaker if not connected -- Else if connected, then disconnects by clicking Internal Speakers set audioMenu to menu bar item 4 of menu bar 1 tell audioMenu click if exists menu item speakerName of menu 1 then set speakerMenuItem to menu item speakerName of menu 1 if value of attribute "AXMenuItemMarkChar" of speakerMenuItem is "✓" then click menu item internalSpeakers of menu 1 return "Disconnecting from " & speakerName & "..." else click speakerMenuItem return "Connecting to " & speakerName & "..." end if else -- Doesn't work for now. Just clicks it again after you deselect menu, making it double annoying --click audioMenu return "Doesn't look like you're connected to " & speakerName & "..." end if end tell end tell end tell end alfred_script How can I fix this, so the dropdown actually goes away if speaker is not connected?
×
×
  • Create New...