Jump to content

rounak

Member
  • Posts

    57
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    rounak reacted to Andrew in mac os selection working incorrectly   
    @rounak while I can see why this issue is happening, what are you actually trying to achieve here?
     
    If you want to show the actions panel for the given file, select the file and use the Features > File Search > Actions > File Selection hotkey. This will always show the actions panel for the file you have selected. If you want to pass the selected file through to a workflow for processing, set the hotkey action to "pass through to workflow".  
    Essentially, if you were to type that exact file path into Alfred, you'd get the same results you are seeing here in the file system navigation from selecting a path and showing Alfred with that path. If you turn off "Fuzzy Matching" in Alfred's Features > File Search > Navigation, you'd see the exact file you selected in this case.
     
    Cheers,
    Andrew
  2. Like
    rounak reacted to deanishe in search not working correctly   
    @rounak Alfred's cache only applies to applications and preference panes. Reloading it has no effect on other types of files. The "Include folders in Home" says right underneath it "Excluding ~/Library"…
     
    The files in ~/Library/Scripts are marked as system files—as Andrew described above. To search them, you need to use a File Filter with the "Show files marked as System Files" option selected. That option doesn't exist for the default scope, so there's no way to get scripts in ~/Library/Scripts in your default results.
     
    If you use a lot of AppleScripts, this workflow might be useful. It also knows about application-specific script directories.
     
    @Andrew I double checked ~/Library/Logs. mdfind can't see any of the log files in there, either, so I guess they're not actually indexed. Finder lets you search ~/Library/Logs by filename, but not by content.
  3. Like
    rounak reacted to nikivi in A way to boost your productivity with Karabiner   
    This is not necessarily a workflow I am sharing but something I use that I love and would really love to share with you. It allows me to use and manipulate all the great workflows you kind people have created and share and use them seamlessly. It also allows me to spike up my usage stats by some pretty wild numbers : 
     

     
    The reason is that I don't ever really activate anything using hotkeys any more. I use something called 'sticky keys' and I have achieved using Karabiner. [Here](https://github.com/nikitavoloboev/dotfiles/tree/master/karabiner) is my repository with my config file for Karabiner. I have also put a readme in there to show how I use it and what for. You can just clone the repository and use the settings and change them to what you consider best for you.
     
    I hope you will like it too. Tell me what you think of it and if you managed to get it to work. You can ask any question you have about the config file I have as it is pretty lengthy.
     
  4. Like
    rounak got a reaction from MEs in Alfred 3.1 : new features / improvements questions   
    External Trigger example:
    https://www.dropbox.com/s/48g1at1sefzwcz3/Running_modified_rounak.alfredworkflow?dl=0  
    Initially, this workflow was 
    https://www.dropbox.com/s/yr6yqj984t2iyzc/Running.alfredworkflow?dl=0
    Install it. Quit a couple of apps with option+return key. And then try the one above.   Disclosure: I am a newbie too.
  5. Like
    rounak got a reaction from deanishe in Rich Text Support for Clipboard History *plus* Paste as Plaintext Hotkey   
    Never mind. The first line in this thread was "Basically, clipboard history supports rich text but". Clearly, I have made assumptions which were incorrect. Ignore my previous comment. 
  6. Like
    rounak reacted to deanishe in Rich Text Support for Clipboard History *plus* Paste as Plaintext Hotkey   
    I think you should probably start a new thread for your issues regarding Alfred's documentation.

    You make some worthwhile points, and a thread that's supposed to be about the clipboard history isn't really the right place for them.
     

    FWIW, asking how the parameters are delimited doesn't make a lot of sense because argv is an array.
     
    argv[0] is the path to the running program, argv[1] is the first program argument, argv[2] the second etc. That's a fundamental of UNIX.
     
    What Alfred puts in argv is clearly an Alfred matter, but like with your External Script/AppleScript issue, how argv works is in UNIX/OS X territory and not specific to Alfred. Please bear that in mind.
  7. Like
    rounak got a reaction from deanishe in [Solved] applescript click event not working in Alfred   
    No, never used a second monitor. 
    Any details you can share about what you are trying to do?
    (Stating the known: UI scripting should be the last resort). 
  8. Like
    rounak got a reaction from deanishe in Go To Path in Open/Save Dialogue   
    @Carlos-Sz : Nice work! Good demonstration of many ways with which this can be done with Alfred.
     
    @<others>
     
    I know its an old thread. But I also came here looking for this and I believe so will others. A simple File Action is what is called for.
    I possess no special workflow skills, but still, I am posting the solution for those who cannot create this workflow:
     
    https://www.dropbox.com/s/55534rd0c5wpxhl/open_save_dialog.alfredworkflow?dl=0
     
    How to use?
    Bring up any file/folder in Alfred
    type your shortuct for action Action
    and run this workflow which is currently named "Send To Open or Save dialog".
     
    I personally believe (and I have nothing against what anyone else's approach is):
    1. Alfred's File Search is neatly organised.
    2. Single quote easily gets me to the folder/file I need to.
    3. There is no need to over-complicate things by adding new keywords and then performing actions to get to the item which you could have easily got to by typing single quote in the first place. The more the keywords, the more the complications (naming pattern, length etc) in using them.
    4. When 2 shall not remain true, then and only then, create Favorites folder, otherwise you are slowing yourself down instead of doing things quickly.
     
     
    Thanks.
  9. Like
    rounak reacted to Carlos-Sz in Recent Items 4.3 beta 2 for Alfred 4: Finder Recent Items   
    Overview

    Workflow to display recent Finder files and folders featuring:
    5 default categories 2 custom categories Favorites, including a file action Keywords and hotkeys for Favorites and all categories apart Interaction with Open/Save dialogs and Finder Go To Folder Preview, reveal, open or use Alfred file actions Usage

    Show Alfred and type the keyword rec:



    You can also use the category keyword if you prefer to access the recent files directly, without an initial menu:
    Now: keyword now Folders: keyword fol Applications: keyword apps Documents: keyword docs Downloads: keyword dow Custom Category 1: keyword c1 Custom Category 2: keyword c2 Favorites: keyword fav In addition, there is a hotkey for the keyword rec, Favorites and all categories apart.

    Note that all keywords, as well as the hotkeys, can be changed (go to Alfred Preferences > Workflows).

    Finally, once inside a category you have the following actions:
    Return key: open the file or folder Command key: reveal the file or folder in Finder Option key: pass the file/older path to an open/save dialog or Finder window Control key: add/remove an item to/from Favorites Shift key: preview (Quick Look) the file or folder Custom Categories

    You can set up to two custom categories:
    Show Alfred and type the keyword recpref Select a category to configure and press return key Type an unique category name with at least 3 characters Type one or more (separated by comma) file types e.g.: com.adobe.pdf,public.plain-text To find a file type you can use Alfred Metadata Analyzer.

    To remove a custom category press command key while highlighting one of them in recpref.

    Favorites

    All files or folders set as a favorite item will remain in the list no matter how old they are.

    To add an item to Favorites just highlight a file or folder, hold control key and press return key.

    To remove an item go to Favorites, highlight an item, hold control key and press return key.

    You can also add items utilizing Alfred File Action (accepts multiple files).

    Note that Favorites has also its own keyword (fav) and hotkey.

    Interacting with Open/Save Dialog or Finder

    You can pass a recent file or folder path, or an item in Favorites, to an open/save dialog or even the current Finder window to go to that folder:
    when an open/save dialog is displayed type the keyword rec or any other category keyword find an item (a file or folder or an item from Favorites), highlight it, hold option key and press return key wait a bit so the workflow can load and paste the item path Default Folder

    The workflow remembers the last path used per application. To use the feature just type the keyword df when an open/save dialog is displayed.

    If the workflow was never used for the application, or the path does not exist anymore, then the keyword rec will be automatically triggered so you can select a path from a file or folder.

    There is also a hotkey to make things even faster.

    Make sure to give the feature time to process because e.g. if you hold keyboard keys way too long then the feature may not work as expected.

    What’s new
    Up to 2 custom categories (keyword recpref) Downloads category Keyword for each category Hotkey for each category Multiple files in Add to Favorites file action Changed Auto-path to Default Folder (keyworod df) Changed Just Now category to Now Added Help (keyword rechelp) Update to Alfred 2.3 features Several internal improvements  
    Download
     
    Version 4.3 beta 2 (removed Alfred 3 references) Release date: 12 Jul 2020 Requires Alfred 4 Download  
    Version 4.2 Release date: 19 Jun 2016 Requires Alfred 3 Download  
  10. Like
    rounak got a reaction from MEs in [Solved] applescript click event not working in Alfred   
    They are co-ordinates on the screen where I want to to perform the click event. You can see those co-ordinates near your mouse cursor after pressing the relevant keyboard shortcut as listed in 
    /System/Library/PreferencePanes/Keyboard.prefPane
    >>Shortcuts
    >>Screen Shots
  11. Like
    rounak got a reaction from deanishe in [Solved] applescript click event not working in Alfred   
    They are co-ordinates on the screen where I want to to perform the click event. You can see those co-ordinates near your mouse cursor after pressing the relevant keyboard shortcut as listed in 
    /System/Library/PreferencePanes/Keyboard.prefPane
    >>Shortcuts
    >>Screen Shots
  12. Like
    rounak reacted to deanishe in spaces removed when using osascript   
    There are a couple of issues with your code. What's happening is that you're actually calling show_last_invoice.scpt with multiple arguments because you're not quoting $argv in your bash. Instead of complaining, AppleScript silently joins the arguments (without spaces) when you set the clipboard.
     
    That is to say, the command you're calling isn't equivalent to what you posted:
    osascript ~/Scripts/Alfred/filemaker/show_last_invoice.scpt "some text with spaces" but rather:
    osascript ~/Scripts/Alfred/filemaker/show_last_invoice.scpt some text with spaces i.e. There are 4 arguments, not 1.
     
    Your bash should look like this. Note the double quotes. Without the quotes, bash interprets spaces as argument delimiters and passes multiple arguments: 
    q="$1" /usr/bin/osascript script.scpt "$q"  That's enough to fix your script (now you're only passing one argument, it doesn't matter that AppleScript is joining all the arguments without spaces), but it's still not technically correct.
     
    The argument passed to on run in AppleScript is also a sequence of strings, not a single string. Correctly, your AppleScript should be: 
    on run argv     set the clipboard to (first item of argv as text) end run  
    If you want your AppleScript to be able to handle multiple arguments, you need to join argv into a string. In your script, you could just do:
    on run argv set AppleScript's text item delimiters to " " set the clipboard to argv as text return end run A more general solution is:
    on implode(delimiter, theList) set TIDs to AppleScript's text item delimiters set AppleScript's text item delimiters to delimiter set output to "" & theList set AppleScript's text item delimiters to TIDs return output end implode on run argv set theString to implode(" ", argv) set the clipboard to theString as text return end run
  13. Like
    rounak reacted to deanishe in Incomplete Info on External Scripts   
    External Script assumes you have an executable script or program that can be run directly (i.e. you can run it in a shell with /path/to/MyScript.py and don't need to pass it to another program, such as /usr/bin/python /path/to/MyScript.py).
     
    You can't do that with compiled AppleScripts (i.e. with .scpt extension). They have to be passed to /usr/bin/osascript.
     
    There are two options (I'd recommend the second):
    Make a directly-callable script. To do this, save the script in Text format (i.e. with extension .applescript), and use the shebang #!/usr/bin/osascript as its first line. Then run chmod +x MyScript.applescript to make it executable. Easiest way is to let Alfred create the file for you (it will set the executable bit for you). But remember to use the extension .applescript, to force Text format. Use the "traditional" method, and treat Alfred's Script box like a shell command line. Leave the Language set to /bin/bash, then call your script as you would from the command line: /usr/bin/osascript MyScript.scpt I say the second is better because it runs the compiled AppleScript, which should run faster.
     
    Does that help?
  14. Like
    rounak reacted to deanishe in How to update List Filter?   
    This really isn't the right way to do it. You should use a Script Filter instead. That's what they're designed for.
    Instead of editing info.plist, save the JSON data to a file and set your Script Filter script to:

    cat /path/to/json_data.jsonCan Filemaker export an Excel file? If so, you could use this workflow to display the contents of the Excel file in Alfred. It automatically picks up changes to the Excel file.
  15. Like
    rounak reacted to deanishe in How to update List Filter?   
    I found a JSON library for AppleScript. That would ensure your script handles all input correctly (if you think that might be an issue).
  16. Like
    rounak reacted to deanishe in How to update List Filter?   
    If yours works, then fine. There is a latent bug in the JSON generation, however, and it will explode if, say, a backslash or double quote pops up in one of your values (because you aren't escaping the strings before you add them to your JSON, as best as I can tell).

    WRT the workflow I linked to, there was a bug that required there to be three columns. Fixed now. Redownload (version 0.1.1) and set SUBTITLE_COL and VALUE_COL to 0 (zero) in the config sheet.

    There's no need to duplicate the workflow yourself: You can use the keyword isyn to search for and choose an Excel file. There's no need to put your excel file in the workflow (that's kind of the point). The workflow will notice whenever the file changes.
     
    I'm afraid I haven't documented the workflow properly yet. You can download and watch the demo here (it's too big to view on GitHub).

    You can also read the program's built-in help by running the isyn program in the workflow directory in your terminal with ./isyn -h
  17. Like
    rounak reacted to deanishe in re-activate Alfred after running an action   
    If I tried to make you a workflow, it would most likely be broken because I don't have Evernote to test it with.
     
    Step 3 isn't possible. If you enter "co " into Alfred (using the keyboard or AppleScript), it will search for "co". That's just how Alfred works.
     
    That shouldn't be an issue, however. After you've used your workflow a couple of times, Alfred will associate it with the query "co" and it will always be the top result. Just keep typing.
     
    To use an External Trigger, first you create the External Trigger and connect it to your Script Filter (or whatever it is you want to launch). Then you add a Call External Trigger Output (or use the provided AppleScript) to call it at the end of your action.
     
    Also, this is broken: on run {query}
     
    {query} is a placeholder. When Alfred runs your script, it does a search-and-replace for {query} and replaces it with the input.
     
    If you enter the text "next line of my note", your script now reads on run next line of my note, which is not valid AppleScript.

    Whether you use input as argv or {query}, follow the template Alfred gives you.
×
×
  • Create New...