• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: extract URL from general text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extract URL from general text


  • Subject: Re: extract URL from general text
  • From: Geoff Sheehan <email@hidden>
  • Date: Thu, 20 Mar 2008 10:33:36 +1000

This bit of code works using curl and writing the received XML to an output file.

tell application "Finder"

set dbLocation to (path to application support from user domain as text)
set dbXML to dbLocation
set dbXML to dbXML & "macpomme:bpuxml.xml"

if exists file dbXML then
try
delete file dbXML
on error
display dialog "Could not delete old XML file. Delete manually please."
end try
end if

end tell

set loca to POSIX path of dbLocation

set caFilePOSIX to quote & loca & "macpomme/abcxyz.net.pem" & quote

set loca to quote & loca & "macpomme/bpuxml.xml" & quote

-- Then, build the curl script
set theURL to "https://abcxyz.net/bigpondusage/BigPondUsage.aspx?alldaily=true "
set theCURL to "curl -v --cacert " & caFilePOSIX & " -o " & loca & " - u " & theUser & ":" & thePass & " " & theURL


Hope this helps in some way.

Best Regards
Geoff / Macpomme

www.macpomme.com


On 20/03/2008, at 10:13 AM March, Stockly, Ed wrote:
However, I am wondering if curl could help turning an AS alias into a file
URL. I have repeatedly looked at the curl man page, but nothing reveals itself
to me. Am I barking up the wrong tree?


Yes, wrong tree. Here is the right tree:

tell application "Finder"
   URL of myAliasFile
end tell




_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: extract URL from general text (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: extract URL from general text
  • Next by Date: Re: script editor formatting
  • Previous by thread: Re: extract URL from general text
  • Next by thread: Re: Print to PDF
  • Index(es):
    • Date
    • Thread