Normal Topic Pie in the Sky Idea (Read 886 times)
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Pie in the Sky Idea
Jun 7th, 2005 at 12:46am
Print Post Print Post  
Okay ... so with Sesame, I can use @Asychshell to pull up a specific website (Canada411.com) to look up a phone number, because the http address is based on retrieve specs (http://findaperson.canada411.ca/10649/search/Find_Person?firstname_begins_with=1...)

Is there an easy way to have that website data pasted into a database field?

Blair
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Pie in the Sky Idea
Reply #1 - Jun 7th, 2005 at 3:09am
Print Post Print Post  
Not automated, but quick using keyboard:

1a.  Using Firefox/Mozilla/Netscape browser:
CTL-L, goes to URL field and highlights it.

OR

1b.  Using MSIE browser:
ALT-D goes to URL field and highlights it.

2.  CTL-C, copies URL to clipboard
3.  Move to field in Sesame
4.  CTL-V to paste from clipboard.
----------------------------------------------------------

A small third party utility could  be written to save the URL to a file and then Sesame could read the line from the saved file. Then you could have Sesame run two @Shell commands, the first to open the browser, the second to run the utility.

---------------------------------------------

But....... if you can have Sesame open the browser to the correct page with @SynchShell, then make the page a variable and just make the Element equal to the variable.
Will look something like this (syntax not correct):

Code
Select All
var vURL as String
vURL = http://findaperson.canada411.ca/10649/search/Find_Person?firstname_begins_with=1&firstname=&name=wettlaufer&city_zip=hamilton&state_id=ON

@SyncShell("broswer vUrl")

Element = vURL 







  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Pie in the Sky Idea
Reply #2 - Jun 7th, 2005 at 3:46am
Print Post Print Post  
Hi Bob!

Actually, I'm not looking to retrieve the URL, but the text from the webpage itself.

So, let's say I have a button called Get411, and I program it to run on element entry:

var vButton as int

vButton = @ASynchShell("http://findaperson.canada411.ca/10649/search/Find_Person?firstname_begins_with=1...)

How do I take the text that is retreived by say, IE, and put it in a field to be saved as data?

Blair
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Pie in the Sky Idea
Reply #3 - Jun 7th, 2005 at 4:18am
Print Post Print Post  
The work EASY in your original question will not apply here.
You are looking for multiple fields of data

1.  In the browser, File Save As Path\File1.txt
2.  Use Sesame FileOpen
3.  Use Sesame FileReadLn to parse the data out. 
--------------------------------------
The parsing is more than I can provide here, can only suggest the technique:

You could use FIND to Search for lines with "resultlink"  like these lines I saved from that Search Web page: [quote]      swapElementText('resultlink_1','__FIRST__',"A");
swapElementText('resultlink_1','__LAST__',"Spires");
swapElementText('resultlink_1','__CITY__',"Richmond");
swapElementText('resultlink_1','__STATE__',"BC");
swapElementText('resultlink_1','__ADDRESS_ESC__',"4600%20Westwater%20Dr,%20Ste%2
0316");
write the results to another smaller file. 
Code
Select All
@Shell(FIND "resultlink" Path\File1.txt  >> Path\File2.txt) 



Now use Sesame FileOpen("Path\File2.txt") and the FileReadLn to parse out the values at the ends of the lines using something like @MidString.  Wll need to make a loop to process all of the "resultlink" lines to save values as variables and then send the values to the Elements.

------------------------------------------
Note: possible structure only provided here.  Syntax to be defined by you.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Pie in the Sky Idea
Reply #4 - Jun 7th, 2005 at 4:46am
Print Post Print Post  
Oh, hey!  That's got some options Bob!  Thanks.

So if I could run some sort of batch program or shareware as a @Shell or @Asynchshell to retrieve a website and save it as a text file, I could then use FileOpen and FileReadLn to retrieve that temporary text file and put the data in to a field on my form...

Thanks!
Blair
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged