Jump to content

gr8

Member
  • Posts

    14
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    gr8 reacted to iEnno in Add Event or Todo to BusyCal   
    Here is a Workflow to add an Event or a Todo to BusyCal.
    Simply use the keyword busy to add an Event, use the ⌥-modifier to make it a Todo.
     
    Direct Download
    GitHub
  2. Like
    gr8 reacted to deanishe in Add Event or Todo to BusyCal   
    Instead of just pressing ↩, you press ⌥↩
  3. Like
    gr8 reacted to guoph in AskGPT   
    Nothing is sent to anywhere other than OpenAI. To ensure this please follow the steps below.
    Download AskGPT.alfredworkflow from GitHub. Rename it as AskGPT.zip and then extract/unzip the file. You will find five files in the folder: two .png files, a .json file, and a .py file for your review. Additionally, there is a .plist file that can be viewed using PlistEdit Pro (https://www.fatcatsoftware.com/plisteditpro/). Or
     
    Once you have installed AskGPT.alfredworkflow, you can review the workflow process. The workflow simply passes your configurations and inputted content to gpt.py for further processing. While the gpt.py can be accessed by: right click on the icon of workflow -> Open in Finder.
     
    This should clear your concern. Thanks!
  4. Thanks
    gr8 reacted to vitor in Script Filter Output - A Very Basic Question   
    The fact that you’re using AppleScript makes the task significantly harder. AppleScript is an awful language: it’s too different from other languages, lacks several features, and is badly documented. That in turn makes it that few people want to use it, meaning there’s less people to help you and less people making resources for you to learn from.

    AppleScript falls flat on its goal of being a language for people who don’t know how to program. It’s sole redeeming quality is that it can talk to GUI apps in a programatic way built into the system. But I advise you to use it for that alone, and get out and use something else as soon as possible. If you want to learn to program, do not start with AppleScript. It’s weighing you down.
     
    At the very least, as @deanishe mentioned in the thread you linked to, use JXA (JavaScript for Automation), which gives you the only good part of AppleScript in a better (yet still not good) language.
     
    AppleScript doesn’t understand JSON, you have to build it by hand and that’s not a good situation to be in. You want to use a language that can build the JSON for you from a simple list you give it.

    JavaScript (works with Alfred’s /usr/bin/osascript (JS)):
    const my_list = ['Red', 'Green', 'Blue'] // Your example list let script_filter_items = [] // We will build this array with the elements for the Script Filter my_list.forEach(element => { // For each item in your list script_filter_items.push({ 'title': element, 'subtitle': element, 'arg': element }) // Add them to the empty array }); JSON.stringify({ 'items': script_filter_items }) // Transform it into JSON Alfred understands  
    Ruby
    require 'json' # We need the JSON gem, to be able to use JSON functions my_list = ['Red', 'Green', 'Blue'] # Your example list script_filter_items = [] # We will build this array with the elements for the Script Filter my_list.each do |element| # For each item in your list script_filter_items.push(title: element, subtitle: element, arg: element) # Add them to the empty array end puts({ items: script_filter_items }.to_json) # Transform it into JSON Alfred understands  
  5. Like
    gr8 got a reaction from cys in Can Alfred search the Mac Keychain   
    Alright, I played with it and changes just minor things, and ended up with a version that works well for me.
     
    http://files.timbru.com/alfred/Search Keychain.alfredworkflow
     
    Some changes:
    Works on Big Sur Keyword ka without a parameter just launches Keychain Access Keyword ka with a parameter will launch Keychain Access and search for the keyword Using the Cmd+Shift modifier will copy the first search result, e.g. similar to the Keychain Access built-in behaviour Using the Cmd modifier will launch Keychain Access. Now that I type this, not sure if needed, I'll probably remove it.  I hope it's useful to others.
    Have a nice day. 

  6. Like
    gr8 got a reaction from JJJJ in Can Alfred search the Mac Keychain   
    Alright, I played with it and changes just minor things, and ended up with a version that works well for me.
     
    http://files.timbru.com/alfred/Search Keychain.alfredworkflow
     
    Some changes:
    Works on Big Sur Keyword ka without a parameter just launches Keychain Access Keyword ka with a parameter will launch Keychain Access and search for the keyword Using the Cmd+Shift modifier will copy the first search result, e.g. similar to the Keychain Access built-in behaviour Using the Cmd modifier will launch Keychain Access. Now that I type this, not sure if needed, I'll probably remove it.  I hope it's useful to others.
    Have a nice day. 

  7. Thanks
    gr8 reacted to gingerbeardman in Can Alfred search the Mac Keychain   
    So I finally put together a workaround for this using UI scripting.
     
    https://www.gingerbeardman.com/alfred/Search Keychain.alfredworkflow
     
    Accept keyword and argument Launch Keychain Access via Alfred Workflow AppleScript focus search box, enter argument, copy password prompt, quit Keychain Access (user enter password and confirm) The core of it is the AppleScript:
    on alfred_script(q) activate application "Keychain Access" tell application "System Events" tell process "Keychain Access" set value of text field 1 of group 2 of toolbar 1 of window "Keychain Access" to q click button 1 of text field 1 of group 2 of toolbar 1 of window "Keychain Access" click menu item "Copy Password to Clipboard" of menu 1 of menu bar item "Edit" of menu bar 1 end tell end tell quit application "Keychain Access" end alfred_script  
  8. Like
    gr8 reacted to thomasv in Can Alfred search the Mac Keychain   
    @gingerbeardman Thanks for this great workflow, this is exactly what I needed!
    Are there any new developments since?

    I was looking at your script and have a suggestion which might be less prone to changes in the UI.

    You could replace the search/input part:
    set value of text field 1 of group 2 of toolbar 1 of window "Keychain Access" to q click button 1 of text field 1 of group 2 of toolbar 1 of window "Keychain Access"
    To something like this, using the menu bar instead:
    click menu item "Find" of first menu of menu bar item "Edit" of first menu bar keystroke q  
  9. Like
    gr8 reacted to CJK in Can Alfred search the Mac Keychain   
    AppleScript's "KeyChain Access" is pretty terrible.  However, the kind bloke(s) at Red-Sweater software (maker of FastScripts) have made a scripting addition aptly referred to as the Usable Keychain Scripting
     
    It allows you to search using whose filters as with other enumerated AppleScript collections, e.g.
     
    tell application "Usable Keychain Scripting" to tell ¬
            the current keychain to get the ¬
            password of every internet password ¬
            whose name contains "google.com"
  10. Like
    gr8 reacted to gthiruva in Can Alfred search the Mac Keychain   
    Slick! Thanks for the tip.
  11. Like
    gr8 reacted to vitor in Send the selected or entered text to Deepl for translation   
    For reference, it works fine in Alfred 3.
  12. Like
    gr8 reacted to vitor in Script works in Script Editor but not in Alfred Workflow   
    Are you using a Run NSAppleScript? Don’t. Use instead a Run Script with /usr/bin/osascript (AS) as the Language. There are also some unnecessary things in your code (like property theURL : "") and other things could be made shorter. Try this:
     
    tell application "Safari" to set theURL to URL of front document tell application "Google Chrome" if (count of (every window where visible is true)) is greater than 0 then tell front window to make new tab else make new window end if set URL of active tab of front window to theURL activate end tell  
  13. Like
    gr8 reacted to alfredclough in New Calendar Event Using Quick Entry Option Workflow   
    This workflow allows you to enter a new event via Alfred using Calendar's quick entry box syntax. Type whatever you would enter in the quick entry box in Calendar in Alfred after the newevent keyword and hit enter. The workflow will pass what you type to Calendar through the Quick entry box allowing Calendar to automatically create the event.
     
    Click here to download the workflow.
     
     
×
×
  • Create New...