I started working on asLJ after I came across this. One of the problems that I quickly ran into was that the URLs in the
tell application "<url>" to call xmlrpc ...
bits had to be hard-coded. That is, AppleScript didn’t like it when I tried to assemble the URL string on the fly. It took me a while to come up with a workaround, which should slightly impact the speed of the call, but doesn’t seem to make a noticeable difference. Here’s my generic handler for making LJ-based server XML-RPC calls:
– make a LiveJournal-type XML-RPC call to serverString for the method methodName with the parameters in parameterArray
-
on callLJraw(serverString, methodName, parameterArray)
-
run script "on run {paramArray}
-
tell application \"http://" & serverString & "/interface/xmlrpc\" to call xmlrpc ¬
-
{method name:\"LJ.XMLRPC.\" & \"" & methodName & "\", parameters:{paramArray}}
-
end run" with parameters {parameterArray}
-
return result
-
end callLJraw