Jump to content

twinpeaks

Member
  • Content Count

    171
  • Joined

  • Last visited

  • Days Won

    1

twinpeaks last won the day on May 17 2013

twinpeaks had the most liked content!

About twinpeaks

  • Rank
    Member

Recent Profile Visitors

1,020 profile views
  1. So I am trying to search the clipboard history of alfred by date. I remember copying something on a certain day and can pull that up but can't pull up things I copied around that date and time. Any help? I tried opening the database with bbedit and was pretty jumbled. If this is possible and answered please forgive the duplicate but if not, any help would be much appreciated. Cheers!
  2. if you want to add it, writes safari's tabs to frontmost foldingtext window or opens the app if necessary. -- All code grabbed and requested help with from generous parties and unsuspecting github users. -- -- Create Markdown link from front most tab in safari and append -- to end of current FoldingText document as new list item. -- UNCOMMENT FOR USE IN ALFRED on alfred_script(q) --on run -- -- -- -- -- -- -- -- -- -- -- BEGIN - INSERT ROUNDED TIME FUNCTION -- -- SHOULD MAKE IT A LIBRARY -- i.e. path from "go to file" or clintxs' "getCurrentDocument()" -- -- -- -- -- -- -- -- -- -- -- https://gist.github.com/Zettt/1081322 -- -- Inserts rounded time (15 minutes). Can be called from, e.g. TextExpander. (AppleScript version) -- AM/PM script by - http://forums.macrumors.com/showpost.php?p=9845114&postcount=2 set currentHour to hours of (current date) set currentMinute to minutes of (current date) set pre to "AM" -- AM/PM script addition if (currentHour > 12) then -- AM/PM script addition set currentHour to (currentHour - 12) -- AM/PM script addition set pre to "PM" -- AM/PM script addition end if -- AM/PM script addition if (currentHour ≥ 0) and (currentHour < 10) then set currentHour to "0" & currentHour end if if (currentMinute ≥ 0) and (currentMinute ≤ 7) then set currentMinute to "00" else if (currentMinute > 7) and (currentMinute ≤ 23) then set currentMinute to "15" else if (currentMinute > 23) and (currentMinute ≤ 37) then set currentMinute to "30" else if (currentMinute > 37) and (currentMinute ≤ 52) then set currentMinute to "45" else if (currentMinute > 52) then set currentMinute to "00" set currentHour to currentHour + 1 ----Get "AM or PM" --set Pos to offset of " " in timeStr --set theSfx to characters (Pos + 1) through end of timeStr as string else return "Error" end if -- return (currentHour as string) & ":" & (currentMinute as string) -- -- -- -- -- -- -- -- -- -- -- END - INSERT ROUNDED TIME FUNCTION BEGIN -- -- -- -- -- -- -- -- -- ---- set time_stamp_rounded to (currentHour as string) & ":" & (currentMinute as string) & (pre as string) -- & " " & (pre as string) -- AM/PM script addition -- return time_stamp_rounded set the date_stamp to (short date string of (current date)) set parentText to ("# ") & time_stamp_rounded & " - " & the date_stamp & return & ("### Safari Tabs") & " - " & " @ta g1" & return ## ") & time_stamp_rounded & " - " & the date_stamp & " - " & ("Safari Tabs") & " @linklist" & return set MDLink to "" tell application "Safari" set safariWindow to window 1 try repeat with t in (tabs of safariWindow) set TabTitle to (name of t) set TabURL to (URL of t) as text set MDLink to (MDLink & (" - [" & TabTitle & "]" & "(" & TabURL & ") ") & return) end repeat end try end tell tell application "FoldingText" tell front document evaluate script "function(editor, options) { var tree = editor.tree(); var range = tree.createRangeFromLocation(tree.textLength(), 0); tree.replaceTextInRange(range, options.link); }" with options {link:(parentText & MDLink)} end tell end tell --end run end alfred_script
  3. This script is great but way too hotkey intensive for me to use as much as I'd like. - Anyway to get a scriptfilter set to optional? Start typing and you filter down the list to the command your looking for but in this way not necessary to remember the variables or the hotkeys as they are listed automatically in alfred's menu... That would make this so much more useful for me. I will play around some more and see if I can get it working off the example of another workflow but I tried before and got discouraged so I'll let you know but 1+ days you can be sure I have threw in the towel. Cheers!
  4. Save Link does one thing and does it pretty well but remember this workflow was also coded when Alfred v2 was in beta testing. Hell no excuses, I like this workflow and still use it. Anyways, don't ask me for features as I was the recipient of this little guy when I asked for a feature addition to SendURL - Coded generously by Jonas Erikson so don't ask me for any additions as I can't help myself let alone you. Quick break down: - "Later" is the keyword which populated the subtext with the url of the site your adding/viewing. - Save, Link, Workflow, Tag, and, okay - 5 tags I have given the page. output to your file is written as: [Posting New Topic - Alfred App Community Forum](http://www.alfredforum.com/index.php?app=forums&module=post&section=post&do=new_post&f=3) #2014-05-27 #Save #Link #Workflow #Tag #okay links - keyword to browse list and modifiers offer the ability to remove saved links, send them to instapaper mobilizer and no duplicates ever as you can update the tags of an already saved website by revisiting the site and entering new tags. Perfect workflow besides a few minor personal aesthetic choices **Features I'd enjoy:** Save browsing sesssion, Lots of tabs all grabbed and written to their own file. As seperate files sessions could be invoked and browsed by their date or theme/tag and if selected then "Drill Down" into the specific saved session of tabs to see which sites it contains . That's about it. Thanks and sorry for the crappy run down as you can tell I do not share much ... Download: http://www.datafilehost.com/d/373c22e4
  5. well deserved exposure with the perk of helping even more users! congrats bud.
  6. This should work with Safari if allow javascript from smart search field is checked (in the develop menu - last listed)... correct? I never have much luck with bookmarklets but this would be a lifesaver if I can get it going. I will tinker if you say I 'might' have success... Cheers and thanks as always Vitor.
  7. @Florian, straight to the point while still confusing! What is to be gained from the workflow or gained from beta testing? Either way, I needed the laugh. - You gain a better workflow, maybe someone who can provide feedback and fixes on your workflows along with some good karma. @ Tyler Eich - I think you blew everyone away with colors 1.0, I am glad to see your challenging yourself and not resting on your laurels so to speak. +1 for sharing the results of your hard work with us and even allowing open participation for sought after features, those which you haven't found a use case for at least. This workflow takes the cake for number of "connectors," even the guts are aesthetically pleasing. Again, thank you for keeping us leeches in your thoughts and I'll attempt to give some feedback if anything appears out of order, both appearance wise and functionality.
  8. Okay a bit confusing with the snippets all doing different tasks. Here is a solution that will - Give you a prompt asking where the webloc file should be saved (it is here that you can move around and save it to a different directory) - The name of the file to be saved is pre-populated with the name/title of the browser window. tell application "Safari" to set thename to name of front document tell application "Safari" to set theUrl to URL of front document tell application "Finder" set resultFile to (choose file name with prompt "Save As File" default name thename default location path to desktop) as text -- if resultFile does not end with ".webloc" then set resultFile to resultFile & ".webloc" make new internet location file to theUrl with properties {name:thename} end tell I need more info and clear info if this does not work. Please clear up if you want to use Safari or Chrome as they have different methods of grabbing browser info, just wording changes but it matters. You do want webloc files correct? I am super confused by the last script where you have it save the url to a .url file prefixed with `[internetShortcut]URL=` (the shell in that script is doing nothing but taking the url passed to it and adding the [internetShortcut]URL= to it URL) Please let me know if I missed what you needed completely, what is wrong, items to change, ideally could use...
  9. Thanks again for doing all the heavy lifting! Definitely do not bother with the hotkey phantom bug and I say that as there could be a plethora of other reasons I ran into the problem of one hotkey working while another attached to the same script failed. If I have some time soon I will make a thorough test of the "problem" and report any notable results. I am still on 10.8.5 so maybe it is that, enough with the speculation though and I have nothing more to go on as I truly haven't attempted to reproduce the effects, or lack thereof an actions menu being called up by the key code(s). I have it working so I am happy whatever I changed, possibly the very well hidden hotkey trigger options, but I can't say for certain and to make it a bit murkier I do not know what the real differences of the options are although I am glad you learned of a new feature to take advantage of in your current and future workflows. If I think of anything mind blowing, doubtful, I will shoot you a message. I have always been "bothered" by unsaved docs, especially temporary scratch pad type text documents I seem to accumulate. I have to really think this out as I have no idea what this feature of the workflow's end goal would be let alone accomplishing it so if I iron out anything that makes sense hopefully I can translate my intention. Okay, Throwing it out very quickly absolutely no thought given to it other than the last few minutes, my disclaimer of sorts. Anyways, say the user has a temp textedit file open and they want to save the file with a title based on the first sentence of the file, say everything before the first punctuation mark becomes the title and it is saved in a folder under the bundle identifier of the app that "saved" it. If no front window is open/showing but the app is running feeding alfred a list of the files to choose form or action when ready m no, no, no - absolutely nothing to do with the intent and purpose of this workflow. Let me think about it! Thanks again for all the help, Cheers!
  10. There you go teaching me something new again. I have hazel set to Archive downloaded files every 3-4 days and then sort them by by date added in ~/downloads/archives/* and your right. The workflow is perfect now that the file was moved/archived by hazel but I guess ignorance with a bad archiving setup combined with bad luck of having a couple days left before the downloads get sorted into daily folders left me thinking I had a major problem. Long story short, I appreciate you taking the time to reply with this golden nugget of knowledge. I honestly probably would never, at least not until I finally use Mavericks full time, have given the workflow another short or tried to remedy the problem. Luckily it was a problem that was ultimately easy to fix and mostly perceived as a problem even when it was no longer affecting the workflow. Thank you sir for the specific help related to my problem above, pretty good when you don't even have to fix anything just told me to give it another shot. Workflow magic?Anyhow, you do deserve a huge thanks for keeping your workflows in pristine shape, source and zipped workflows are updated constantly for minor fixes and lots of large ones. Always enjoy receiving those notifications. Cheers and keep claiming the "most updated repo of alfred workflows known to man." Take it easy bud.
  11. Finally figured out what was going on, at least in my case but you will be able to confirm with your settings. I had multiple hotkeys for each script, I know, a bit much but so darn useful it deserves more! Anyways, with those key codes being called with system events in the same script only one hotkey was actually pulling up file action menu while the other stopped at the selected file. I thought pulling up the selected file in the file browser was the intent until I read your post over with a little attention being spared. If you have the hotkeys configured to "Pass Through Modifier Keys (Fastest)" which is not the default but rather the third option after double clicking the hotkey cell and then control click on the actual hotkey combination. I usually always get rid of the default "Simulate modifier keys" and throw in the fastest option so it was not until I swapped their behavior until realizing that the modifiers alfred was simulating was causing the file action to never get invoked. Default right arrow shouldn't witness these problems but perhaps you have yours set this way once you build and share the workflow as they are working with standard settings offering to simulate modifiers by the time i download the workflow. Either way, all is well and I have a new most used hotkey, two of them! Thanks again and if you do not see any reason why having the alfredfinder,scpt hotkey to have it's default option be to skip/pass through modifiers it might save some people a headache wondering why it doesn't work or going on thinking that the file action has to be invoked manually if they do not use the right arrow as an action key. I am glad you put this idea into the workflow, A hotkey for bringing me to the file where I can manually glob search the directory after hitting delete or invoke the file action with control or function. Two hotkeys inevitably helped me find the problem, now they will be the problem when I can't remember anything and every accidental key stroke invokes a random script tied to alfred triggers.
  12. Yeah, both are useful if your drowning in workflows but after working with both for awhile you will decide that it may just be best to backup all your workflows and Alfred's current preferences and state and then re-install only the very useful ones, defining useful is the hardest part. And now for my workflow idea: Nothing flashy happens and it pretty much would only show results in alfred once it has had time to observe how you use workflows but pretty much this OG statistician workflow would automatically report back with simple in-line feedback with numbers relating to each section. For instance, 10 - Used Today 16 - Used In The Last 7 Days - 8 of the 16 were used outside of today. 25 - Used in the last month Wow, it seemed like a great idea when I started but after thinking of the feedback I am not so sure about this anymore lol. Anyways, it dawned on me that having some nice usage specific to workflows would help a lot of us remove and not just disable those workflows we don't use. And now I believe Alfred 2 should have a "backup workflow" type of feature as well in the context menu, say next to export workflow menu option. Sure, exporting is good, no it's great, those days of manually entering everything was no fun at all. Anyhow, I tend to disable a lot of workflows I don't think i have a use for but I feel if I delete them then the scenario where they can be used will pop-up and if i'm not on ym local machine that has my old alfred workflows folder locally that doesn't sync and isn't stored along side alfred's data so it all's nice and organized I can't access them and so I feel better to just disable and end up with more workflows than minutes in the day. Not recommend but you can always do this manually, create a filter if you want and accomplish the goal of knowing that your unused workflows are being saved into a dedicated directory either in Alfred 2's application support directory or the folder that masquerades as a file, Alfred.alfredpreferences... Solution created by you and not officially sanctioned, but still works - perhaps people would use this. I really do not know if I would but I know that I have too many workflows and just thought about this after remembering when I believed the two mentioned above would shame me into trimming the fat. Nothing gets trimmed and those workflows, Mr. Rice's "Help" specifically is the only one that ever sees the light of day and that is to find which workflow is holding a hotkey combo I want to use hostage.
  13. Wow, I really need to make sure I am not simply reading the last post ever again. Sorry I missed the initial response so this is the third time I start over since I raise and/or answer items no longer relevant. I'll make this quick if your still around. - Most important, thank you! I appreciate you taking the time to consider and better yet adding the feature to the workflow. I hope others find it as useful as I do. - As you can tell... Yes, you hit the functionality I was hoping to have implemented or thought could be useful dead center. - Everything is fast and solid but I use either function or control not the right arrow button to bring up the file action pane. I found a resource of keycodes and plugged both in there but control and fn are not receiving the same kind of love as the default ➡ key does and so I am going to play with it for a bit and see if I can get it working and most likely need to delay it a bit more. Find keycode chart here but you can find them with lots of one trick third pony applications. I believe I remember terminal responding with key codes in the past. .. http://apple.stackexchange.com/questions/36943/how-do-i-automate-a-key-press-in-applescript Again, thanks for implementing the feature and taking it a step further with the action panel being invoked automatically by the applescript. That is really the end result most of us are hoping to achieve so this is great, I just need to get my setup (function(fn) and control modifiers to work. Definitely should so let me not take up more of your time unless I simply have racked my brain and still am receiving only the file path with file selected.
  14. This is really useful. I also appreciate the rewrite as splitting actions up into separate scripts has made it much easier to modify and understand. Most likely already implemented in one way or another but I wanted to make a quick addition to the workflow and replicate the very useful "Get and Browse document in Alfred" workflow but using the template you created. so I had everything in one workflow. It would take you 10 seconds to put this together yourself but perhaps you don't want it or just forgot about revealing in alfred's file browser. Hopefully someone finds it useful, only takes you to the directory and can't select the file for you like the workflow can in Finder, new feature of latest update and my favorite. on run theType -- get path to frontmost document tell application "Finder" to set dir to POSIX path of ((container of (path to me)) as alias) -- if theType as string is "MS" then -- different loading script if user has MS Office -- set pathscript to load script dir & "pathMS.scpt" -- else set pathscript to load script dir & "path.scpt" -- end if set p to getPath() of pathscript -- open in finder tell application "Alfred 2" to search p end run I do not think this warrants a pull request but I am sure it can be more robust. Would you use this addition to your workflow or have you already strung a couple of scripts together for this functionality and the ability to use Alfred 2's wildcard support? Thanks again for posting this here and maintaining a repo of workflows so updates are easy to stay on top of.
  15. You have compiled a hit with this one! No it's not as informative or comes out of the box providing users with lots or any configs as recent downloads by ddjfreedom does but it is capable of taking on arguments or follow-up scripts and is much faster and more accurate. Clinton Strong made the afformentioned workflow 100% faster and added awesome enhancements like % complete for safari downloads. However, if I had to choose one workflow and never receive another update, yours wins no question. I know this workflow is never breaking down which is half/all my fault for not being capable of fixing ruby scripts. I had to get that out there and scold everyone who has downloaded this and not posted a quick thanks or tapped the button. We wonder why so many great scripters have gotten fed up with fixing scripts and sharing new creations with this board... SWC, I am going to check out your other workflows in a moment and keep a backup of this script filter for safe keeping. By the way, would you consider creating a github repository of all your workflows since the number is staggering? If you prefer not would you care if I did and simply had you email updates or new workflows to be posted? Don't get discouraged by the lack of appreciation, we are a very spoiled group here and it's going to bite us in the ass even more than it already has.
×
×
  • Create New...