Jump to content

rounak

Member
  • Posts

    57
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by rounak

  1. 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.
  2. 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.
  3. Let me rewrite. Feature request: Cmd+Q must quit the application selected in Alfred's main window. For Alfred to quit application, the application must be running, Thus, Alfred must also be able to show running apps with a keyword. After Cmd+Q executes the request for quitting the selected app, the list which Alfred shows must be updated so that rest of the open apps are available for quitting. When one uses Cmd+Tab to switch apps, one quickly quits them one by one using q while holding cmd down. The quit command method takes too much time to quit multiple apps.
  4. I should have started new threads to describe each issue (feature request) in detail. Here, may be the only relevant thing to say is and which you skipped to answer: Were you unable to create a work-around using Alfred? Why can you not use pbpaste workflow? Is it because, it is not possible to reach individual Alfred clipboard items? If that is the case, a general fix like access to clipboard items would be better than a special fix customised for your needs.
  5. (These features are from another launcher app) It should be possible to perform the following actions on Alfred selection (file/folder): 1. Cmd+I (its i) to open Get Info window 2. Cmd+Delete to trash 3. Cmd+R to rename 4. Most importantly, Cmd+Q to quit the selected application. Ofcourse, that would require implementation of running apps. The Alfred window must list running apps again after one of the applications is quit so that they are available for quitting. 5. Cmd+N to create a new folder when the selection is a folder.
  6. Thanks. Assuming javascript does nothing if it does not find the element to click, I will skip the keystroke steps in my script when that happens. For that I will have to find what javascript returns when it finds nothing. I will get to work on that.
  7. @OP Just for the sake of knowledge, were you unable to create a work-around using Alfred? @<developers> <!OP> (Meaning: Reply to developers and not OP) 1. Personally, I think, Clipboard Managment, Text Expansion, Snippets etc are best left to other apps since Alfred is never going to match their capabilities. Its not surprising that Snippets does not have {} variables support. In fact, it shows that they merely intended to include it half-baked so as to compete with rival launcher apps in terms of number of features, which is not wrong. 2. Its understable to include them in Alfred so as to boast numerous features. 3. Take, Keyboard Maestro for example, how wonderfully it handles dates. Just yesterday, I used the the result of this macro in my AppleScript-- %ICUDateTimeMinus%3%Months%dd.MM.yyyy% It gives me the date 3 months before today's date. And it is so readable. Just change 3 and Months to any other number and criteria (e.g. Days) respectively. More Details about the dates in Keyboard Maestro. It saves one, so much of code in the main script and time. If I were not to buy Keyboard Maestro, I would request workflows for the same (created using shell command date) instead of asking Alfred to implement it. Another example of Karabiner app comes to mind. Its handling of keyboard shortcuts within elements of an app and scoping keyboard shortcuts for apps which do not have dock icon is unmatched besides numerous other benefits like virtual mouse keys. 4. I am not saying they should not be improved but these must be last on the todo list. The developer's primary focus must be on a. correct basic mistakes by giving a fresh look at the app. For example, once you remove the tick for "Run applescript instead of opening", there remains no shortcut to run them. As soon the tick is removed, the shortcut which opened them must now be used for running them. b. on the ability to let Alfred utilise *everything* else available in the OS efficiently c. add more features to workflows d. improve the Buffer which is so important for everyday use e. put more effort in Documentation and Error Reporting. I have not found anywhere what "argv" contains. How are the parameters delimited? Even if it is present somewhere, I can show you a lot of places where is not referenced and should have been. The facts that External Scripts section does not mention: "No applescripts" and Alfred gives permission and path error when trying to run them made me waste a considerable amount of time for re-checking permissions and path. f. honestly, I can go on but if I have not made a point up to now, then I won't do any better ahead. Edit 1 : I was going to say, that I overlooked the fact that Alfred will be able to perform actions on Clipboard items (and hence the need for feature requests regarding Clipboard are justifiable) but on turning on Clipboard I find that actions cannot be performed on clipobard items. So, that is a feature you must work on first if you really do need to work on Clipboard (which I personally don't believe you should).
  8. In Search Mode, return key opens folder in Finder. In Navigation Mode, return key navigates into the folder in Alfred return key must navigate into the folder in Aflred by default in both modes. The setting under File Search>Navigation must apply to Search Mode also.
  9. 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).
  10. tell application "Safari" activate delay 1 my clickClassName("icon icon-clip", 0) delay 1 tell application "System Events" key code 125 delay 0.5 key code 125 delay 0.5 keystroke return end tell end tell to clickClassName(theClassName, elementnum) tell application "Safari" do JavaScript "document.getElementsByClassName('" & theClassName & "')[" & elementnum & "].click();" in document 1 end tell end clickClassName WhatsApp tab name changes to (<no_of_new_messages>)WhatsApp. However URL stays same. Anyway, to get hold of this tab without getting all tabs URL. I think someone could write a regex for me. Also, if anyone 1. has other ideas to get this done or 2. has additional info like selecting a particular contact without using the "Search" field on the web page, 3. check if the attachment icon, is already clicked before running this script, 4. (unrelated) has the skills to get to the "Type a message" box and perform a file drop by mouse dragging from Alfred's window (assuming that Alfred's window bounds and location are fixed) 5. has any other useful info please guide me. Thanks.
  11. @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.
  12. Does pressing the "delete" key on the selected item not work?
  13. 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
  14. #!/bin/bash argv="\"${1}\"" echo $argv > ~/Desktop/deleteme.txt osascript ~/Scripts/Alfred/filemaker/show_last_invoice.scpt $argv Contents of deleteme.txt "some text with spaces" Relevant code of show_last_invoice.scpt: on run arg set the clipboard to arg as text return end run Contents of clipboard: sometextwithspaces --note that the spaces have been removed. I want to know how to avoid this. Running this command from Terminal.app osascript ~/Scripts/Alfred/filemaker/show_last_invoice.scpt "some text with spaces" Contents of clipboard: some text with spaces
  15. With this in mind, I will change my approach and start fresh.
  16. I lost a considerable amount of time trying to run an applescript. This text below should clearly mention what kind of external scripts are supported. Any ideas how to run applescripts but keep them in an external file? External Scripts If you select the language as "external script", you can run an external script. If you don't specify an absolute path, Alfred will look relative to the workflow's folder. Ensure that you have the script's execute permission set.
  17. Script Filter Details: 1. Keyword: @fp (@fp:find product) with space Argument Optional 2. Checked "Alfred filters results" 3. Script: cat <filename>.json When typed query does not match filter results, Alfred shows fall back results. I want to perform action, when the typed query does not match filter results. How to do it? I am assuming, I have to remove "Alfred filters results" check box. Then, check if query argument exists in the json file. If not, I can perform action via applescript but if it does exist, then how to do what Alfred does when it filters results?
  18. 0. Demo works correctly. 1. Duplicated workflow 2. Changed bundle id 3. Replaced demo.xlsx with my .xlsx 4. Changed environemnt variable DOC_PATH 5. Changed keyword to isyn x 6. Open Alfred and typed isyn x 7. Fatal Error in workflow: array index out of range 8. All code in python, I can't do anything but post here:) The other alternative of using json file. I have got that to work.
  19. Thanks for the help. Since you confirmed that I must edit the plist, I found a way to change the relevant entry. This is what it looks like: tell application "System Events" set plistFile to property list file "/Users/<myusername>/Sync/Alfred.alfredpreferences/workflows/user.workflow.A729E97A-5F14-41EF-9F29-77CEFDAB65BC/info.plist" set itemNodes to value of item 1 of property list items of property list item 1 of property list item 3 of property list item "objects" of plistFile set newentry to "{\"title\":\"NewName (Place)\",\"arg\":\"NewName (Place)\",\"subtitle\":\"\"}" set newString to my str_replace("]", "," & newentry & "]", itemNodes) set itemNodes to newString set value of item 1 of property list items of property list item 1 of property list item 3 of property list item "objects" of plistFile to itemNodes end tell on str_replace(find, replace, subject) ... end str_replace Now, I will create a workflow "Update Customers" which shall get names from Filemaker and update the plist.
  20. Do you mean: editing the info.plist file entry where all the values are stored in the [title,subtitle,arg] format?
  21. Could someone please post an example of this? Most of the results I found in google involve Script Filters using python scripts which I know nothing about. I know applescript.
  22. Short version: I have dropped a csv file in the List Filter. How to auto-update(without manuallly dropping the csv file again) it? Long version: 1. I have populated the List Filter with Customer names which were exported from a Filemaker table and then re-formatted to match Alfred's [title,subtitle,arg] syntax. 2. New customers will be added in the Filemaker table. The List Filter needs to be updated with those names.
  23. How? I am unable to find a way to drag multiple files from the buffer. I can still drag one file at a time.
  24. After trying for few more times, I got the warning of Aflred 3 trying to use Accessibility Features. Its working now.
×
×
  • Create New...