Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Is it possible to pull text data from a website into FileMaker. If so, how would you go about doing it? I've never done this before so I am quite new to the idea.

Posted

Alright we have to rework the statement with:

http://fentonjones.com/Articles/25_Bookmarks.html

To get one quote out of an FM calculation you can use 4 quotes (""""). But it gets confusing when you mix the two; sometimes you only need 3 quotes, when you're already inside a text block.

Is there anyone who can spot it???

--sd

Posted

That's a really old article Søren. You'd just use a backslash and a quote in 7/8. Is that what you meant? In answer to Heathbo's question I think I'd just use a Perform AppleScript step:

tell application "Safari"

set theTxt to text of document 1

end tell

set cell "WebTxt" to theTxt

Posted

Hi Fenton,

Man I wish I knew AS like you do. This worked great right out of the box.

Thanks,

lee

Posted

You'd just use a backslash and a quote in 7/8. Is that what you meant?

Yes it was, having doubt whether it only was inside a Evaluate( statement.

While we're at it, say it's a site made by IWP how would you enter data into the site. What I'm brewing up is a robot that work on the same machine as the web server, instead of myFmbutlers engaging java virtual engine that hogs almost 80% of the processing power.

--sd

Posted

Hi Fenton

tell application "Safari"

set theTxt to text of document 1

end tell

theTxt

I tried it in scripteditor instead of embedded with a taget field on a webpage generated by IWP ....guesswhat?;)

""

--sd

Posted

Thanks Fenton that helps a lot. Now to complicate things. What if I wanted to take specific info from a site and put it in a specific field in FileMaker then take other info from the same site and put it in another field? Would I have to get into the html of the site then?

Posted

You then wish to click somewhere with applescript, to get to another layout??? - It's posible to a certain extend, provided the page hasn't got too much CSS etc. take a look here:

http://bbs.applescript.net/viewtopic.php?id=12703

You might learn a trick or two from this http://www.apple.com/applescript/safari/jscript.01.html

There is a download of examples here: http://www.apple.com/applescript/safari/scripts/Safari_Scripts.dmg

But I think we rejected CURL purely on a syntax error in a buggy CF, the issue is that CURL is extremely powerfull for such a purpose, download this http://www.newcenturydata.com/downloads/shell_example.zip and paste in the command area this:

"curl http://www.yahoo.com"

Why is interesting?? because you without engaging another application can load pages and process them either by GREP or filemakers native calc'fields. Ontop of that can CURL be made into behaving like another browser, if cookies tries to decline service to unsupported browsers ...is it simply taken care of as well! Noone can deny the point in lightweight applications.

Next step for me is to tear the IWP generated data appart to pluck e-mail adresses and text for mass issuing of mails from a IWP serving machine without a genuine robot. If anyone have clues to get there would I be pleased to know!!!

--sd

Posted

I would just add that you can use AppleScript to get the source of the page also:

tell application "Safari"

source of document 1

end tell

or

do shell script "curl 'http://www.fentonjones.com'"

But then you've got the parsing problem. You could use either AppleScript by itself, AppleScript with comand line grep, plain command line with grep (via plug-in), or FileMaker (with optional Custom Function), or a combo of the above.

Posted

But I've been chasing a way to get what's seen on a page made by IWP ...preferably things to send as e-mail from an osax or Pine on a webserving machine.

--sd

This topic is 6921 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.