AnsweredAssumed Answered

Applescript Calc using cURL - how to insert variables to url

Question asked by ChrisClatterbuck on Aug 31, 2011
Latest reply on Sep 1, 2011 by IwaoAVE!

Title

Applescript Calc using cURL - how to insert variables to url

Post

So I'm trying to download an xml using cURL.  here's what it looks like

Let (
[
lastRecord = "\"" & T24_Import::Entry ID & "\"";
lastImport = "\"" & T14_PREFERENCES::lastRecord &"\"";
theDate = "\"" & "xtra" & Filter(Get(CurrentDate)-7;1234567890) & "\""
];
"tell application \"Finder\""
& ¶ &
"set myPath to POSIX path of (path to documents folder)"
& ¶ &
"end tell"
& ¶ &
"do shell script \"/usr/bin/curl -L -o '\"& myPath &" & theDate &" & \".xml' -u HL7U-HSTP-G3CZ-385P:footastic 'https://firstorlando.wufoo.com/api/v3/forms/av-event-request/entries.xml?Filter1=EntryID+Is_greater_than+" & lastImport & " &?Filter2=EntryID+Is_less+than+" & lastRecord & "'\"" )

 

My problem is with the URL.  I can get the following to work:

"do shell script \"/usr/bin/curl -L -o '\"& myPath &" & theDate &" & \".xml' -u HL7U-HSTP-G3CZ-385P:footastic 'https://firstorlando.wufoo.com/api/v3/forms/av-event-request/entries.xml?Filter1=EntryID+Is_greater_than+'\" & "& lastImport &""

and

"do shell script \"/usr/bin/curl -L -o '\"& myPath &" & theDate &" & \".xml' -u HL7U-HSTP-G3CZ-385P:footastic 'https://firstorlando.wufoo.com/api/v3/forms/av-event-request/entries.xml?Filter1=EntryID+Is_greater_than+767&?Filter2=EntryID+Is_less_than+780"

My problem is I can't get both variables to work in the url for some reason.  I keep getting "expected end of line"

 

Any help?

Outcomes