You could try generating the Skype Scripting Bridge header. That will at least 
give you better documentation on what Skype's SB API looks like.

Take a look here: 
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/UsingScriptingBridge/UsingScriptingBridge.html

quick and dirty in the terminal:

sdef /Path/To/Skype.app | sdp -fh --basename Skype

If Skype is using constants that are defined in the header that is generated, 
then you will need to generate a BridgeSupport file from the header and load 
that in your MacRuby script. Good tutorial here:
http://merbist.com/2010/01/17/controlling-itunes-with-macruby/

hth
kam
On May 30, 2012, at 8:43 AM, Steve Clarke wrote:

> Hi Mike,
> 
> I had a quick look at the skype scripting dictionary and it does appear that 
> "sendCommand:scriptName:" is all that's on offer. I assume that 
> ScriptingBridge has renamed the "send" comand like this to fit in with the 
> way that mehods need to be called from Objective C.
> 
> I don't know the skype api so I can't give you a real example, but you might 
> try calling it like this:
> 
> >>skype.sendCommand("some skype command string" , scriptName: 
> >>'your_script_name')
> 
> When I do this exactly as coded above I do see a skype dialog, so something 
> gets through.
> 
> Good luck.
> 
> Steve
> 
> 
> On 30 May 2012, at 16:23, Mike Gleeson wrote:
> 
>> I'm looking to do some scripted control of Skype, and not able to get too 
>> far with MacRuby.  Please let me know if this is not the proper forum to 
>> ask, thanks.
>> 
>> I can find the app:
>> 
>> >> skype = SBApplication.applicationWithBundleIdentifier("com.skype.skype")
>> 
>> And I see in the Applescript editor that there is a single command called 
>> "send" that matches the Skype documentation.  I can't seem to invoke it, 
>> asking for suggestions.
>> 
>> The list of available functions shows a few relevant details:
>> 
>> >> skype.methods(true,true) - Object.methods(true,true)
>> 
>> (This is trimmed):
>> :classesForScriptingNames, :classNamesForCodes, :"sendCommand:scriptName:",  
>> :classForScriptingClass, 
>>  :setDelegate, :delegate, and then a handful of init methods.
>> 
>> It looks like ':"sendCommand:scriptName:"' is that doorway into AppleScript, 
>> but I'm not sure what to do with it.  I don't see "send" anywhere, and I 
>> don't know if that's an issue as it is also a standard Ruby method.
>> 
>> Ideas anyone? 
>> 
>> Thanks,
>> 
>> - Mike G
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel@lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to