Jump to content

phantasm

Member
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by phantasm

  1. macOS Mojave 10.14.14

    Alfred 3 v3.8.1

     

    Hi, not sure if this is a bug or not. I seem to remember being able to 'flip through' multiple Quick Look instances of files while Quick Look was activated in Alfred. To clarify, when I view the contents of a directory or browse through the results of an Alfred query, it is my recollection that when invoking Quick Look in Alfred with the Shift key, the Quick Look instance of the highlighted file would show, and I would then be able to flip through the rest of the results while keeping Quick Look activated, effectively to see the preview of each file without having to press Shift for each file.

     

    Now, at least since installing Mojave, I need to press the Shift key for each file while going through the Alfred results, instead of using the  ↑ and ↓ keys, as you can do in Finder.

     

    Is this a change in how Mojave now deals with Quick Look, as opposed to previous macOS versions, or could this be a setting I've changed? I'm not sure, I just know that my hands seem to have a memory of being able to do this :). Maybe it was never possible.

     

    Thanks

  2. 3 minutes ago, vitor said:

    Because your results are cached (the contents of the directory haven’t changed, just the information being displayed in Alfred). Next time you change something in the directory, it’ll fix itself. Alternatively, delete ~/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.vitorgalvao.alfred.recentdownloads to get rid of the cache.

     

     

    Yep, that was it. Thanks!

  3. On 10/22/2018 at 8:38 AM, vitor said:

    Update.


    Allow using a different directory by changing a Workflow Environment Variable.

     

     

    Thanks Vitor, I've successfully changed the Workflow Environment Variable in the .plist file. I would love to use this for directories in other volumes as well. I have many folders in which I frequently check the recent contents, but they are on '/Volumes/HDD/...'    not '~/...'

     

    Any way you can modify the workflow to choose directory variables on volumes other than 'HOME'?

  4. Show list of TLD's or search for TLD's on Wikipedia v0.1

     

    This is a second post following a recent post i made of a workflow i created in years past, titled 'Text / Filename Tools.' this is another simple workflow for identifying the origin of top level domain names of websites you may have visited or would like to visit. this uses the grep command in bash.

     

    to use, type tld then the website abbreviation you would like  to learn more of. this searches a fixed list of known top level domains.

     

    if you type tlds, it will show you the full fixed list, and if you hold shift+enter, it will take you to the Wikipedia tabled list of Top Level Domains and their origin.

     

     

    The workflow is a bit slow. i am sharing it with the intention that someone may want to optimize it. i created the fixed list awhile back, so it will most likely need to be updated for all the new TLD's created in recent years.

     

    Please feel free to add to this workflow or alter it as you see fit.

     

     

    Download here:    https://drive.google.com/top_level_domains.workflow530427943_ScreenShot2018-10-22at8_58_09PM.jpg.bdd02fe8a319e49183155debae0815e4.jpg

  5. first of all, I want to say I am truly grateful to this community. i have not been active in this forum throughout the years, but i am truly appreciative of all the great creators and contributors around here. what an amazing app, helps with my workflow each and every day. thinking of the Mac as a bicycle for the mind, it's interesting to note that one app inside the Mac can seem equally helpful at the same time. thank you.

    anyways, i want to share a couple of workflows i've created over the years. i'm not a programmer by any means, but do enjoy navigating the code that you guys create.

    i will share one workflow in another post, but for this one, this has been a very useful tool to me for repetitive tasks of file renaming. i've collected a number of bash functions to assist in switching file names with special characters such as hyphens, underscores, and periods, to spaces and vice versa. the functions are by no means polished, but they work well as-is.

    wondering if a programmer would like to use this as inspiration for a workflow that works better than the one i've created. if not, i think this will still help many of us.


    to use, copy the file name or text you want to transform, action the workflow through the keywords, and paste back to the file.

     

    keywords are first letter on the character with '2' in between for transformation.

     

    h2s

    h2p

    u2s

     

    one caveat, the functions i've used add a new line after each transformation. you'll have to backspace once after each paste. i was thinking this was one thing someone could fix.


    other than that, works really well! Feel free to build upon this or alter as you see fit.

     

    Download here:   https://drive.google.com/filename_tools.alfredworkflow

     

     

    Screen Shot 2018-10-22 at 8.20.35 PM.jpg

    Screen Shot 2018-10-22 at 8.20.55 PM.jpg

    Screen Shot 2018-10-22 at 8.21.20 PM.jpg

  6. I think you're onto something. This is how the first script looks in another location I have it saved:

     

    The keystroke lines seem to be having a problem...and they're controlled by System Events. As far as I know, I didn't install any scripting additions on previous OS's. Maybe they were installed by another package? Are there some very common ones?

     

     

     

    set newIcon to (POSIX file "/Volumes/HDD/Sync/ICONS/ICONS/soundcloud.icns") as alias
    set theItem to (POSIX file "/Applications/Soundcloud.app") as alias

    tell application "Finder"
        activate
        set infoWindow to open information window of newIcon
        set infoWindowName to name of infoWindow
    end tell

    tell application "System Events"
        tell application process "Finder"
            tell window infoWindowName
                delay 0.3
                keystroke tab
                delay 0.3
                keystroke "c" using command down
            end tell
        end tell
    end tell

    tell application "Finder"
        delay 0.5
        close infoWindow
        set infoWindow to open information window of theItem
        set infoWindowName to name of infoWindow
    end tell

    tell application "System Events"
        tell application process "Finder"
            tell window infoWindowName
                delay 0.3
                keystroke tab
                delay 0.3
                keystroke "v" using command down
            end tell
        end tell
    end tell

    tell application "Finder"
        delay 0.5
        close infoWindow
    end tell

     

     

     

  7. Hi deanishe, thanks, and thank you for your work throughout the years. Definitely not a reboot issue. Problem I'm having is Script Editor is not giving me any event information, and Alfred isn't giving me any debug information. Same thing with Console, as far as I've investigated (see below). Here are some scripts that either hang Script Editor / Alfred, or simply won't continue:

     

    **interesting note- when I try to open all of these scripts in Script Editor, Script Editor stalls for a few minutes, then I am able to open any script and it shows up in a window right away.

    **another interesting note- this is one familiar to me, I came across it when Apple first introduced iCloud Drive. When Apple started directing saved files to iCloud, rather than a local directory, I had a similar issue opening Script Editor every time in Yosemite or El Capitan, can't remember. Script Editor would hang on every open, whether or not I opened it by a script or simply selecting the application. Once I chose by default to save files of Script Editor in iCloud Drive rather than a local directory, the hang went away; Script Editor opened instantly. That prompted me to do the same thing in this current OS, Sierra. Similarly, once I chose to save files to iCloud Drive, Script Editor no longer hung on opening by itself, but still hangs on opening when opening the script files below (as described in the note above)

     

    **third note, I think this is getting to the root of the issue:

    I've noticed when I originally try to open Script Editor with one of these scripts, Console shows this error under Process > Finder:

     

       /System/Library/CoreServices/Finder.app/Content/MacOS/Finder    (/System/Library/Frameworks/Appkit.framework/Versions/AppKit/)

         Subsystem: com.apple.AppKit      Category: General    

         Activity ID: 0 Thread ID: 0xdbb    PID: 312

         < private >

     

    and this under Process > Script Editor:

    Detected missing constraints for <private>.  It cannot be placed because there are not enough constraints to fully define the size and origin. Add the missing constraints, or set translatesAutoresizingMaskIntoConstraints=YES and constraints will be generated for you. If this view is laid out manually on macOS 10.12 and later, you may choose to not call [super layout] from your override. Set a breakpoint on DETECTED_MISSING_CONSTRAINTS to debug. This error will only be logged once.

     

    and this under Process > Script Editor:

    ERROR: Setting <private> as the first responder for window <private>, but it is in a different window (<private>)! This would eventually crash when the view is freed. The first responder will be set to nil.
    <private>

     

     

    Here's one that used to work that involves keystrokes:

     

    set newIcon to (POSIX file "/Volumes/HDD/Sync/ICONS/ICONS/Chrome.icns") as alias
    set theItem to (POSIX file "/Applications/Google Chrome.app") as alias

    tell application "Finder"
        activate
        set infoWindow to open information window of newIcon
        set infoWindowName to name of infoWindow
    end tell

    tell application "System Events"
        tell «class pcap» "Finder"
            tell window infoWindowName
                delay 0.3
                «event prcskprs» tab
                delay 0.3
                «event prcskprs» "c" given «class faal»:command down
            end tell
        end tell
    end tell

    tell application "Finder"
        delay 0.5
        close infoWindow
        set infoWindow to open information window of theItem
        set infoWindowName to name of infoWindow
    end tell

    tell application "System Events"
        tell «class pcap» "Finder"
            tell window infoWindowName
                delay 0.3
                «event prcskprs» tab
                delay 0.3
                «event prcskprs» "v" given «class faal»:command down
            end tell
        end tell
    end tell

    tell application "Finder"
        delay 0.5
        close infoWindow
    end tell

     

    __________

     

    Here's one with menu selections. It opens Notification Center in Notifications view:

     

    tell application "System Events"
        tell «class prcs» "Notification Center"
            «event prcsclic» «class radB» "Notifications" of «class rgrp» 1 of window "NotificationTableWindow"
        end tell
    end tell

     

     

    __________

     

    and here's a simple one, also using some keystrokes. It selects the icon in 'Get Info' and copies it's image content:

     

    tell application "Finder"
        delay 0.1
        open selection using (path to application "Preview") -- open with Preview
    end tell
    delay 0.2
    tell application "Preview"
        tell application "System Events"
            «event prcskprs» "a" given «class faal»:command down -- select all
            «event prcskprs» "c" given «class faal»:command down -- copy
            «event prcskprs» "w" given «class faal»:command down -- close window
        end tell
    end tell

     

     

     

    All of these used to work before Sierra.

     

    I know this is a lot, thank you. But I think there is a simple solution..

     

  8. Hi guys, wondering if anyone has a clue about what changed with applescripts and accessibility in macOS Sierra. Since upgrading to Sierra, it seems all of my workflows that use applescript no longer work. This is not exclusive to Alfred; I have tried running multiple scripts in Script Editor, and Script Editor ends up hanging on run.

     

    In Alfred 3, no information shows in debug. Calling a workflow will just cause Alfred to stop responding.

     

    Console does not show any Event errors in Alfred or Script Editor.

     

    I haven't been able to find similar issues with other people in google searches or in this forum.

     

    I have received some OS messages that I think may be involved as I've tried to run applescripts in both Alfred 3 and Script Editor (shown below). They seem to come up sporadically, and after a delay of running a script. I know it has been necessary to add SystemUIServer.app to Accessibility in System Preferences > Security & Privacy in past versions of Alfred and OS X in order to run certain workflows with applescripts. Since upgrading to Sierra, I am seeing a similar requirement. Adding /System/Library/CoreServices/SystemUIServer.app to Accessibility and checking it does not fix the issue.

     

    Any clues to what may be going on is much appreciated :).

     

    EDIT: I think it has something to do with "System Events." It looks like applecripts work until they come to

     

         tell application "System Events"

     

    I have tried adding /System/Library/CoreServices/System Events.app to Accessibility, a shot in the dark; that didn't help either.

     

     

    Screen Shot 2017-05-08 at 12.36.10 PM.jpg

  9. Hi, I have this short applescript that activates Reminders.app on the specific list indicated from a variable.

     

    tell application "Reminders"
        set newList to list "todo"
        show newList
        activate newList
    end tell

     

    The script works fine on its own. I then had partial success creating a script filter for this:

     

    SCRIPT FILTER:  set theQuery to "{query}"

     

    NSApplescript:   tell application "Reminders"
                               set newList to list theQuery
                               show newList
                               activate newList
                               end tell

     

    I would like the workflow to show auto-completion suggestions from the user's created lists. I don't know script filters at all.

     

     

    Does someone know how to extend this into a workable auto-complete workflow?

     

    Thanks

  10. hyper-paranoid question here-

    are all url/file search queries stored, even if you disable 'query history' / 'URL history' / clipboard? what if you enable these features, will the query cache be cleared once you clear those feature histories?
     
    i would like to use Alfred for all web searches instead of a browser, but if i am piping searches i would normally enter directly on HTTPS search sites, are these queries instead being recorded in plain text somewhere before they reach the HTTPS site?

    could queries theoretically be sent by way of scripts in imported workflows, if the developer designed it that way?

    and, more generally, is Alfred interacting with the network at any point, or all queries local? for someone who is privacy-minded, does using Alfred sacrifice security for convenience in any obvious ways?

    Thanks very much

×
×
  • Create New...