Jump to content

jdfwarrior

Member
  • Posts

    2,028
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by jdfwarrior

  1. Yeah my bad you're right, but depending on the script language and such you could probably do a system call to do: open "<url>" which would work
  2. Probably but I would have to add some kind of id for it to know what's what you were doing. For instance: Mail @flagged <search>
  3. Yeah Alfred itself doesn't do pattern matching. You would have to do as you say, you do the matching, build a URL then you could make the script return a URL and that pass to a "Open URL" action
  4. Instead of trying to read $_ENV I just always do $var = exec('printf $HOME'); Have you tried that?
  5. I made the autocomplete workflow so if you want any details or have any questions, feel free to ask
  6. If you check the recommended best practices post I made the other day you will see that it is suggested that you don't store data in the workflow folder anyway. That being said, if you follow those guidelines and store data in the way recommended in that post, this won't be an issue.
  7. Simulating keystrokes can easily be accomplished with Applescript.
  8. I've brought this up to Andrew in the past for working on things like my AlfredTweet workflow/extension. Twitter for example, I just redirected the user to a page I controlled that started the oauth flow, allowed them to authenticate to Twitter, and then either returned the oob pin code, or just returns the tokens directly and asks the user to paste them back in. Obviously, you don't want to store username and password and such in plaintext in settings or something, but what about using the security command to save them in the keychain? It can be done very easily. Reading from the keychain is easy as well. If the user knows to only click the "Allow" button and not "Always Allow" then it would always prompt the user before it accessed the keychain. I know this isn't the best flow for the end user, but it works..
  9. I haven't toyed with it but its going to be in the WHEN section obviously. I would guess within the first 3 lines or the 4th line. Probably not setting the timezone appropriately or getting an error in the strtotime and then therefore causing problems when trying to get the date() and then it just returns the initial epoch time. I would suggest taking the code in the WHEN section and putting it in a php file alone, add a few echoes to see values as it progresses. Then you can find exactly where it's dying. There may be an easier way to get the timezone (I'm sure there probably is. I think I've seen it in a plist, I just have to remember which one).
  10. Well, as you mentioned, there are several ways that this could be done. You could... 1. Make them custom searches without a query. 2. Make them each their own keyword in a big "Bookmarks" workflow 3. Make a single workflow with a single script filter that reads a list and you update the list manually or by extra commands in the workflow Creating them as custom searches is really easy. Creating them each as a workflow really isn't difficult either but as you get a lot, it may be easier to read/manage if they were custom searches. If you wanted a single keyword that you could search and them with, the 3 solution could do this easily. Just depends on what you want..
  11. This thread will serve as reference for a list overall "best practices" when creating workflows for Alfred 2. This will be an evolving document, so check back occasionally for updates. Data Storage In order to clean workflow directories clean and prevent syncing issues, we recommend using the following paths for storing volatile (non-persistent) and non-volatile (persistent) information. Volatile:~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/[bundle id] Non-Volatile:~/Library/Application Support/Alfred 2/Workflow Data/[bundle id] When writing data to these folders, remember to create a folder for your workflow. Name the folder to match the bundle id of your workflow. This helps keep things clean and organized and make sure that you don't accidentally delete or overwrite someone else's settings. Synced Settings While it is recommended that settings be written and stored within the two locations provided above, sometimes it is found to be more useful to sync settings along with installed workflows. If this option better fits the needs of your workflow, create a new folder inside of your workflow folder named config and write all settings that need to be synced there. We recommend keeping this folder minimal. Only store settings there that have been deemed necessary. Continue to store all other settings in the previously suggested paths. When exporting workflows, remember to remove the config folder from the workflow path before exporting so that you do not distribute potentially confidential information to the masses. Requesting Remote Data When creating workflows that request data from remote resources, be sure to set your "Please Wait" subtext to inform the end user that data is being requested from remote locations and therefore, may take a moment to populate the list of feedback results. See example image below. If possible, set timeouts for remote data requests appropriately and provide the the end user with an error (or other such) message to inform them that the request took longer than normal and that script execution has halted. This prevents the user from waiting an unnecessarily long amount of time thinking that feedback is coming.
  12. Alfred has no issues running through a proxy. I run a lot of things on a daily basis through a proxy. I just connected to a proxy and verified that my Google Auto Complete does indeed work. I'm going to move this thread back to the Workflow Creators forum since it's definitely not a bug and seems to be more of a Workflow request.
  13. The only issue with adding that functionality right now is the nasty Apple bug that makes it hard to grab the currently selected Finder items. Right now, there are times where you could open a folder, select an item and try to action it but when Alfred shows, its referencing another item in another location. This is something that Andrew reported to Apple a good while back and has yet to be fixed.
  14. I wonder if something like this could be created temporarily with the "Recent Folders" workflow that has been created. Create a second action for it that would allow you to open those paths in the file nav...
  15. Brian, I've done things like that with several of my extensions and workflows in the past. I wouldn't think it would be a big enough deal to have to inform the user unless youre going to consuming a large amount of space (which I doubt). AlfredTweet, a workflow I am currently trying to update if I could get Twitter to answer my questions.. slackers.. with cache a list of the users friends/followers for quick local access and autocompletion.
  16. I don't know that that's going to be possible guys..
  17. What does it do when you try to action the item? Open in finder? I don't remember what it does by default and I can't test right now. I'm at Best Buy (I'm waiting on my wife and mom, they are at another store next door haha). Anyway the file filter may be essentially replicating the functionality of using the "Find" keyword. The find keyword by default reveals the file in finder instead of opening. The open keyword would open. If that's what it's doing, you could always press command+o to open the file instead of having to go to a list of actions.
  18. Tony, This can be avoided by using the delay command in Applescript. So between the two "tell System Events" commands, add a: delay .5 and that will add a half second delay before the next command is fired. That should be enough to get past the key press issue. I made a similar solution for someone else and this seemed to work perfectly for them (with the delay)
  19. Welcome to my world. Fixing problems with weird characters have been driving me nuts
  20. Doing this with Applescript: on alfred_script(q) tell application "System Events" to keystroke space using command down tell application "System Events" to keystroke "david" end alfred_script That would open Alfred and type my name into him. If you had passed a parameter into that action (available as q) you could make Alfred type that.
  21. Jon, I don't foresee this becoming a feature (reading the keyword). This same thing could be accomplished in so many ways. You could.. a. Create multiple keywords, multiple actions (bugticket keyword and action, supportcall ticket and action) to do each one. You can't copy an action and paste it yet, but copying and pasting the code could easily be done. b. Multiple inputs with the same keyword that use a single script function, make each keyword call the function differently, passing what you want, and the argument. c. Script filter that allows multiple options, and the script filter passes bugticket (or supportcall) + the arg. Do these options make sense? If not I can try to describe them further or I could build you a few generic examples
  22. You could always just make a File Filter (input) and attach a Hotkey (trigger) to it and set that to Option+Space to do a file search
×
×
  • Create New...