If you want to get the source code of any URL then it can be populated easily. Create a new layout to show a WebViwer and add your URL to it. Give a name to the WebViwer like "Web" in inspector. In your script add this script step
Set Variable [$$Source; Value:GetLayoutObjectAttribute ( "Web";"content" )]
Now $$Source variable will have the exact source code you want. So there is no need to open the same url in any browser and grab the source code of that URL manually by you. But you have to apply your own logic to parse the same source in order to get the Lattitude and Longitude value. I dont think FMP 12 have any functions to parse the source code to get the desired result.
If you are using FMP 12, there is a new scriptstep that is easier to use than GetLayoutObjectAttribute() and does not require a webviewer:
Insert From URL [Select; No dialog; <table::field>; Resource URL]
This works: Insert From URL [select; No Dialog; <table::field>>; "http://rpc.geocoder.us/service/csv?address=1600+Pennsylvania+Ave%2CWashington+DC"
It returns 38.898748 and -77.037684, the location of the White House
@Jade. Hey Jade, I was trying to accomplish this very thing. However when I try Insert from URL, I end up with about 50 lines of info in the text field.
How do I get it to return the longitude & latitude? Or in otherwords....what am I missing?
Are you using the same URL syntax as Jim C?
If you inadvertently omit the 'csv' from the URL you will get at least 50 lines of HTML.
Using Jim C's example, I get the following inserted in my text field:
38.898748,-77.037684,1600 Pennsylvania Ave NW,Washington,DC,20502
If you just want the Latitude and Longitude values, scrape the first 2 values from your text field. For example:
Insert from URL[ Select; your_table::your_text_field ; "http://rpc.geocoder.us/service/csv?address=1600+Pennsylvania+Ave%2CWashington+DC"]
Set[ your_table::your_text_field ; LeftWords( Substitute( your_text_field ; "," ; " " ) ; 2 ) ]