Re: Simple Safari/IE Script problems
Re: Simple Safari/IE Script problems
- Subject: Re: Simple Safari/IE Script problems
- From: John Allen <email@hidden>
- Date: Sun, 02 Feb 2003 14:33:11 -0800
Thank you both for your contributions and you are right that WOULD be the
better way to go IF I could access this website that way. Actually there a
couple of FileMaker plugins that would do a very good job with that also.
The problem in both of those approaches is that it is a website that really
needs to be accessed through the browser because there are cookies involved.
It isn't a true protected website (anyone can log on) but it does require
registration and one's browser stores that data in its cookies and thus
every time a request is sent to that website via one's browser it works
fine. So when I send the following request via FileMaker and the browser
(in which FMP1, FMP2 and FMP3 are fields from my database) the browser gives
me the full page and it works fine:
http://search.ancestry.com/cgi-bin/sse.dll?f3=&f4=&f23=&f0=FMP1&f1=FMP2&f2=F
MP3&f20=&advqt=/search/rectype/vital/ssdi/main.htm&db=ssdi&ti=0&su
bmit423.x=43&submit423.y=9&f13=&f15=&f14=&f12=&f9=&f8=&f10=&f6=&f5=&f7=
However if I send it via the shell script as you suggest I just get back:
"<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a
HREF=\"
http://www.ancestry.com\">here</a></body>"
In fact speed here isn't of paramount importance and I would be more than
happy to just be able to simple copy the contents of a Safari or IE webpage
and paste it into FileMaker using AS. Combined with what I have already set
up for the group within FileMaker this will already shorten what has been
until now a very tedious task by over 95%! So if you or anyone has a
suggestion as to how to do that or if one can use cookies in a shell script
as you mention and you could help me get started with that, I would be very
grateful for advice in either or both directions!
Thanks again for the help you have given already,
John Allen
>
From: Andrew Oliver <email@hidden>
>
To: John Allen <email@hidden>,
>
<email@hidden>
>
>
First of all, don't use Safari.
>
>
This code snippet will fetch the source of Apple's home page and put it into
>
an AppleScript variable, from where you can put the data into FileMaker.
>
>
set theSource to do shell script "curl -url http://www.apple.com/"
>
>
It's way faster than using Safari since a) the browser doesn't need to be
>
open, and b) you don't need to wait for the page rendering to finish.
>
>
Also, by working in the background you don't interrupt the user's web
>
browsing experience (if you used the browser code, you'd pop up a new
>
browser window in front of whatever the user was looking at).
>
>
Andrew
>
:)
Message: 11
>
set theSource to do shell script "curl -url http://www.apple.com/"
Actually that should be "--url
http://www.apple.com/" the single dash
version turns on the U, R, and L options of curl.
In this case you can leave the "--url" part off entirely
8)
----------------------------------
Chris Janton - face at CentosPrime dot COM
Netminder for Opus1.COM
--__--__--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.