Connecting to a server service from Javascript/Mac OS X widget/Dashcode

118 views Asked by At

My question is fairly short: I'm trying to open a simple TCP connection (lets say on port 110 = POP3) sending an command and getting the response with the Javascript API inside Mac OS X widgets using Dashcode. But the problem is that I have no ideas to get this stuff working.

So have you got any ideas? I've tried on XHTTPRequest but as the name says this stuff works with HTTP protocol but I don't need this HTTP stuff.

1

There are 1 answers

1
mythbu On

I found a workaround: using a ruby script makes it easy to fetch those information I need. And ruby seems to be bundled with Mac OS X. The ruby script can be added in Dashcode and called via widget.system("/usr/bin/ruby yourscript.rb", null).

Works for me!