Jump to content

mrchow19910319

Member
  • Posts

    28
  • Joined

  • Last visited

Reputation Activity

  1. Like
    mrchow19910319 got a reaction from Southgirl in Could someone write a workflow that tells time machine to start backup?   
    Thanks. It worked. 
     
    For anyone who is too lazy to do it themselves, here is how to do it. 

  2. Like
    mrchow19910319 reacted to vitor in Use Finder keyword to open a new finder window.   
    tell application "Finder" make new Finder window set the target of the front Finder window to (POSIX file "/tmp") -- or -- set the target of the front Finder window to home end tell  
  3. Like
    mrchow19910319 reacted to Victor Apeland in Commands to turn on Night Shift and Do not Disturb   
    This could be really useful. Instead of digging in the control center for the toggles or ask Siri to do it, you could just type something like "Turn on Night Shift" or maybe just "nightshift". It could work just like the commands for empty trash and other system functions.
  4. Like
    mrchow19910319 reacted to dfay in Alfred is unable to detect certain app I installed.   
    If you just did a fresh install, the problem might have been that Spotlight was still doing the initial indexing, which can take a while.
  5. Like
    mrchow19910319 reacted to Vero in Alfred is unable to detect certain app I installed.   
    Hi @mrchow19910319 Can Spotlight find the app? It's likely that you need to rebuild your Mac's index, as latest macOS update may have caused some corruption to your metadata index.
     
    To rebuild your Mac's index, go to Alfred's Advanced preferences, press the "Rebuild macOS metadata" button and follow the instructions in Terminal. Be sure to check the box to "Delete /.Spotlight-V100" when it pops up.
     
    The reindexing can take up to an hour, and on completion, you'll need to type "reload" into Alfred to refresh the application cache. You should then be finding all your apps as expected
     
    Cheers,
    Vero
     
     
  6. Like
    mrchow19910319 reacted to vitor in Alfred workflow for re-adjusting chrome windows zoom.   
    If you want it to happen automatically when some event (plugging the monitor) occurs, then Alfred was never the way to go. By design, Alfred needs to be specifically called. That’s an explicit feature, not a limitation.

    There may be a way to auto-detect when a monitor is plugged in, yes, but you should ask on Ask Different.
  7. Like
    mrchow19910319 reacted to vitor in Alfred workflow for re-adjusting chrome windows zoom.   
    According to Chromes’s AppleScript dictionary, you can’t zoom windows with it, only check if windows are already or can be zoomed.

    Two solutions:
    Add a Dispatch Key Combo Output to press ⌘+ and ⌘0 (Chrome’s zoom keyboard shortcuts). Use (disclaimer: I’m the author) to zoom the pages. Use the code (function(){document.body.style.zoom = "150%"})() to zoom in, and (function(){document.body.style.zoom = "100%"})() to zoom out. Here’s a ready-made workflow. The first method is more prone to errors (especially since to zoom to 150% you need to ⌘+ three times in a row) because it relies on faking keyboard presses. But the second method requires you to activate it on each page. Pick whichever is more convenient to your usage.
  8. Like
    mrchow19910319 reacted to mikedvzo in Why is Alfred 3 using so much CPU? [Alfred 3.4.1 b848 pre-release prevents affected Python workflow from running]   
    I have noticed a similar behavior since upgrading to 10.12.4.  I have noticed that the Alfred process is showing High CPU regularly now with 10.12.4.  When I look further I notice there is an issue where I constantly have to force quit the Python process on my Mac since the CPU is at 98% on the Python process.  When I inspect the process it is always related to a simple Alfred Workflow that has called the Python process.  I will continue to monitor it but it has happened 4 times in the last couple days and always the same situation.  
     
  9. Like
    mrchow19910319 reacted to deanishe in Why is Alfred 3 using so much CPU? [Alfred 3.4.1 b848 pre-release prevents affected Python workflow from running]   
    TBH, that's probably not relevant. It most likely isn't Alfred. It's a workflow that Alfred is running. (iStat Menus (and Activity Monitor) include subprocesses in CPU load etc.)
     
    If you open Activity Monitor and from the View menu choose All Processes, Hierarchically, you'll be able to see whether it's actually Alfred or a workflow subprocess:
     

     
    FWIW, I've seen quite a few issues with workflows that use Alfred-Workflow's background process API (i.e. Python workflows) causing hanging processes with 100% CPU load. It's likely one of those.
     
    I've no idea what the solution is, however. It appears to be a Sierra issue, and my Mac doesn't support Sierra.
  10. Like
    mrchow19910319 reacted to Andrew in How to "open with" in Alfred   
    @dgbeecher you can actually do this without any configuration using the file selection hotkey under Features > File Search > Actions > File Selection.
     
    I have set this to alt+f. I select a file in Finder, hit alt+f which shows Alfred's action panel. You can select "Open With" from there
     
    Cheers,
    Andrew
  11. Like
    mrchow19910319 reacted to deanishe in Ability to assign keywords to applications   
    Ewwww  
  12. Like
    mrchow19910319 got a reaction from dfay in Could someone write a workflow that tells time machine to start backup?   
    Thanks. It worked. 
     
    For anyone who is too lazy to do it themselves, here is how to do it. 

  13. Like
    mrchow19910319 reacted to deanishe in I need a specific workflow that is safari related.   
    It's easy to open an new URL in Safari programatically, but Reader mode and copying the page can only be done by simulating user action.
     
    Put the following script in a Run Script Action with Language = /usr/bin/osascript (AS) connected to your Hotkey/Keyword. It grabs the clipboard text, and if it's a URL, opens it in Safari, waits a bit, activates Reader mode, waits a little bit more, then triggers Select All and Copy. Uncomment the two lines at the end of the script to also close the Safari tab/window afterwards.
     
    The big issue with this script (and this kind of scripting in general) is that there's no way to know when the page has loaded (Reader mode isn't available till it has), so the script just has to hope the page has loaded when it tries to enter Reader mode. Adjust the waitForLoad and waitForReader (both delays in seconds) settings at the top of the script if it's firing too quickly or too slowly.
     
    -- How long to wait for page to load in Safari before
    -- trying to activate Reader mode
    property waitForLoad : 5
    -- How long to wait for Reader mode to finish its animated loading
    property waitForReader : 2
     
    on run (argv)
        tell application "Safari"
            -- Get clipboard contents
            set theText to (the clipboard as text)
            -- Ensure it's a URL. This might fail if the URL is uppercase...
            if theText does not start with "http://" and theText does not start with "https://" then
                log "Invalid URL: " & theText
                -- Fail!
                return 1
            end if
            
            -- Open URL in Safari
            log "Opening " & theText
            activate
            open location theText
        end tell
        
        tell application "System Events"
            -- Activate Reader mode.
            -- Now it gets tricky. We have to guess how long to wait for the page to
            -- load, as Reader mode isn't available till it has (if then).
            delay waitForLoad
            -- CMD+SHIFT+R activates Reader mode
            keystroke "r" using {command down, shift down}
            -- Wait for animation
            delay waitForReader
            -- CMD+A to select all, then CMD+C to copy
            keystroke "a" using command down
            delay 0.2
            keystroke "c" using command down
            log "Page copied to clipboard"
            -- Uncomment the lines below to close the tab when done
            -- delay 0.4
            -- keystroke "w" using command down
        end tell
    end run
  14. Like
    mrchow19910319 reacted to Sethicus in Can someone create a workflow that let google chrome open a specific url in a new window?   
    I adapted the applescripts posted in this thread so you can google in a new window (not just open up any url), no https needed
    https://www.dropbox.com/s/q5845fept41djm7/Google in New Chrome Window.alfredworkflow?dl=0
  15. Like
    mrchow19910319 reacted to Vero in Can someone create a workflow that let google chrome open a specific url in a new window?   
    @deanishe Nice, I like the cmd modifier for an incognito window - Beats the Chrome workflow I previously had
     
    @mrchow19910319 The workflow seems to work fine for me. Are you typing a complete URL (e.g. https://www.alfredapp.com) or a partial one (e.g. alfredapp.com)? 
     
    Cheers,
    Vero
  16. Like
    mrchow19910319 reacted to raguay.customct in Can someone create a workflow that let google chrome open a specific url in a new window?   
    Here is a quick and easy workflow to do what you want. You will have to assign the hotkeys for each one. It allows you to either open the current OSX selection or clipboard in either chrome, firefox, or safari. You can get it here:  https://www.dropbox.com/s/8kkpcjbzr2sde05/Open URL with hotkey.alfredworkflow?dl=0
     
    Examine it and you will see that it is very easy to create workflows like this. There was no programming involved. So, go and experiment.
×
×
  • Create New...