Jump to content
Server Maintenance This Week. ×

xmlrpc /soal


This topic is 5784 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I have been trying to get either xmlrpc or soap to work from an applescript. It has not worked. I get an appleevent time out when I try to save the script. I have also add a tell finder command to the start of the script and that does not seam to help.

set address to "new york city, new york"

tell application "http://rpc.geocoder.us/service/xmlrpc"

set response to call xmlrpc {method name:"geocode", parameters:{address}}

end tell

Link to comment
Share on other sites

I think your address is not very good. This works:

set address to "1728 Meade Ave, San Diego, CA"

tell application "http://rpc.geocoder.us/service/xmlrpc"

set response to call xmlrpc {method name:"geocode", parameters:{address}}

end tell

-- You can also pull out the long and lat of the result (which is returned as a record within a list):

long of item 1 of response

lat of item 1 of response

[P.S. I'm on 10.4.11, so I don't know if you're having a Leopard problem.]

Link to comment
Share on other sites

Fenton,

Thanks for the quick response. I tried the code you have attached an get the same result.

When I entering it into the "preform applescript" options screen as native code. I hit ok and the spinning wheel comes up and after a minute I get "AppleEvent timed out" dialog box popping up.

I guessing this is a leopard thing, but I appreciate the try.

Link to comment
Share on other sites

I don not know if this helps anyone. I have taken the code and run it in Apple's Script Editor and it works fine on my Leopard machine. Unfortunately, I am new to Mac and FMP so this process is slow for me.

Link to comment
Share on other sites

Yeah, you're right. I can't get it to work within FileMaker either. You could run it as an external AppleScript applet. But that's a little awkward. Here is another method, which uses AppleScript and command line. It gets the latitude and longitude, if that's what you're after.

Geocode.fp7.zip

Link to comment
Share on other sites

Fenton,

Thanks a bunch! : You have a definitely saved me allot of time. Being new, I would not have found that work around very easily.

I'm still a little surprised FMP did not support this type of call, but there probably is a good reason somewhere.

kmcb

Link to comment
Share on other sites

This topic is 5784 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.