Stikkit Forums
November 19, 2008, 03:11:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Creating Stikkits with Quicksilver  (Read 8566 times)
michael
Guest
« on: December 05, 2006, 09:49:55 PM »

The following has been tested and works well with the β51 (3800) version of Quicksilver. Other versions may not play as nice. Double check each step, and if all else fails, ask in this thread for some help troubleshooting it.

1. Create a new AppleScript using Script Editor (found in /Applications/AppleScript/) using the following text:

Code:
using terms from application "Quicksilver"
on process text stikkit
set remoteApp to "http://www.stikkit.com/stikkits"
set URLEncodedVars to "api_key=yourapikeyhere&stikkit[raw_text]=" & stikkit
do shell script "curl -d " & "\"" & URLEncodedVars & "\"" & space & remoteApp
-- uncomment the following line if you'd like a confirmation dialog
-- display dialog "Sent to Stikkit"
end process text
end using terms from

You'll need to replace 'yourapikey' with the API key found in the export URLs for your events. The URL will look something like this, with your API key in place of [your api key]:

Code:
http://30boxes.com/add.php?webcal=webcal://www.stikkit.com/calendar.ics?api_key=[your api key]

Remember that API keys are private - don't share them with anyone.

2. Save the script in ~/Library/Application Support/Quicksilver/Actions as stikkit.scpt. Make sure that the file format Script Editor saves it in is in "script" format. You may need to create the Actions folder if it doesn't exist. Also in OS X path names, the tilde (~) represents your home directory. For me, ~/Library is the same as saying /Users/michael/Library.

3. Restart Quicksilver

4. Trigger Quicksilver (I have mine set to Command+Space) and type . (that's a period). You should now have a text window. Anything you type here will be sent to Stikkit, so you can treat it just like the Stikkit form on the website. To enter a new line in Quicksilver's text input mode, hit Option+Enter. You can add tags, set reminders, create lists, and do anything that you can do in the web interface here.

When you're done, hit tab, and then type 'stikkit' (you might only need to type 'sti' or less). Hit enter, and the text will be sent to Stikkit.

Other Notes:
If you name the AppleScript file to something other than stikkit, you can rename the action by opening Quicksilver Preferences, selecting Actions, and scanning through the list of actions for the file you created.

Let me know if you get it working - I'll create a screencast of what I've described above when time permits.
« Last Edit: December 05, 2006, 10:31:01 PM by michael » Logged
ayjay
Member
**

Karma: 5
Posts: 93


WWW
« Reply #1 on: December 06, 2006, 02:50:25 PM »

Works perfectly for me, at least from my home computer (can't get it to work from my office, I think because of a firewall issue). So thanks!

I had already sent some messages to my Stikkit email account via the "Send Directly" action in Quicksilver, and that works almost as quickly -- but Quicksilver sends the text of the message also as the subject, which means that when it shows up as a Stikkit the text is there three times: the title of the note, and then as two lines in the body of the notes. That ain't cool, so the script is a big improvement.
Logged
victor
Member
*

Karma: 0
Posts: 8


« Reply #2 on: December 13, 2006, 02:48:48 AM »

Got it working.  Thanks for the hack.
Logged
Andrhia
Member
*

Karma: 0
Posts: 5


« Reply #3 on: December 18, 2006, 07:26:49 PM »

...and to save yourself another precious three or more keystrokes, consider making a custom trigger for Stikkit. Basically have it run your command stikkit.scpt to "Process text." I set my custom trigger to cmd= so no pesky tabbing or periods, just trigger and type.

Logged
michael
Guest
« Reply #4 on: December 18, 2006, 08:40:08 PM »

Andrhia - this is excellent!
Logged
seankhiggins
Member
*

Karma: 0
Posts: 2


« Reply #5 on: December 22, 2006, 09:52:42 AM »

Is it possible to paste into the text area in Quicksilver and then stikkit? The script works for me when I type new text, but not when I copy and paste so far.

Also, is it normal to get the following response after stikking with Quicksilver? Do I maybe have something wrong with my script?

<html><body>You are being redirected.</body></html>
Logged
michael
Guest
« Reply #6 on: December 22, 2006, 11:37:53 AM »

Odd - I'm able to copy and paste into the text input for Quicksilver.

And yes - the response is normal (we'll need to make a friendlier one some day).
Logged
seankhiggins
Member
*

Karma: 0
Posts: 2


« Reply #7 on: December 22, 2006, 11:43:58 AM »

Thanks for confirming the message, and I'll try the copy/paste again!
Logged
Luhmann
Member
*

Karma: 0
Posts: 15


« Reply #8 on: January 01, 2007, 05:35:17 AM »

Is it possible to edit the scrip to provide confirmation via Growl instead of a dialog box?
Logged
michael
Guest
« Reply #9 on: January 01, 2007, 08:54:31 PM »

Luhmann - I want to say yes, but I'll tinker with it a bit first. I don't see why it'd be difficult - I use Quicksilver with Growl all the time. The trick is going to be in finding the proper Applescript Terms.

Growl comes with a Notify Text action that you might be able to pipe some kind of response into.

I'll give it a try tomorrow and report on my findings.
Logged
medamaoyaji
Member
*

Karma: 0
Posts: 1


« Reply #10 on: January 05, 2007, 11:54:34 AM »

I'm having trouble with the Applescript itself. I've cut and paste, and typed from scratch but keep receiving "Syntax Error: File some object wasn't found" when I try to save or compile the script. The cursor return with the quote at the end of "Qucksilver" highlighted.

Any ideas?

Cheers,
Anthony
Logged
triley60
Member
*

Karma: 0
Posts: 3


« Reply #11 on: January 07, 2007, 04:28:59 PM »

HOw do I find my api_key?
Logged
michael
Guest
« Reply #12 on: January 08, 2007, 04:42:43 PM »

triley60 - you can find your API key in any of the RSS feed URLs we provide for your stikkits. When the API comes out officially, it'll obviously be easier to find out.
Logged
triley60
Member
*

Karma: 0
Posts: 3


« Reply #13 on: January 08, 2007, 06:46:24 PM »

OK here's MY script with my API code (last three digits blocked out), not working and I suspect it has to do with the path, yours is some fancy 30 boxes tie-in...what's the prob here?
!--
using terms from application "Quicksilver"
   on process text stikkit
      set remoteApp to "http://www.stikkit.com/stikkits"
      set URLEncodedVars to "api_key=ea46209a78a7fc1a0daafba8dc62aXXX[raw_text]=" & stikkit
      do shell script "curl -d " & "\"" & URLEncodedVars & "\"" & space & remoteApp
      -- uncomment the following line if you'd like a confirmation dialog
      -- display dialog "Sent to Stikkit"
   end process text
end using terms from
-->

Cool video dragging ical event into stikkit... tell me, how can I access my latest saved stikkits when I'm NOT ONLINE?

Logged
triley60
Member
*

Karma: 0
Posts: 3


« Reply #14 on: January 10, 2007, 06:27:36 AM »

Progress! But not perfection, yet:

http://www.stikkit.com/stikkits/new.atom?api_key=ea46209a78a7fc1a0daafba8dc62axxx&stikkit[raw_text]=" & stikkit

This actually CONFIRMS I've sent a msg to stikkit, but doesn't show up anywhere...

tx in advance, TR
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!