Source language: Translate to:

Weather

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Weather

Postby Alex » Mon Oct 23, 2006 7:26 am

Hi, do you know how do a program with the France weather ?

I t must be download : http://www.meteofrance.com/FR/index.jsp

and transfert the info in a text or I don't know.

Thanks

Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Neobook » Tue Oct 24, 2006 11:13 am

Hi,
Very good ideab ut I don't know sorry
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby Alex » Wed Oct 25, 2006 4:13 am

Thanks

Can any budy help me please ??


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Gaev » Wed Oct 25, 2006 5:58 am

Alex:

I am not sure what you want "transfered" from the web page into your application (variable/file) ... however, note that (at the bottom of the webpage) it says Droits de reproduction et de diffusion réservés © METEO FRANCE 2003 ... which might make it illegal for you to do so.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Alex » Wed Oct 25, 2006 7:40 am

Hi,

Not, I will do a legal transfert, look, why must I go on the webpage if I can push a button ?

I will have a TextEntry, a pushbutton and a result

If in the TextEntry I write : Montargis, it gives me the weather in Montargis


Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Wrangler » Wed Oct 25, 2006 8:01 am

You could push a button, and load the web page in a browser object. No copyright violations doing so.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Gaev » Wed Oct 25, 2006 8:06 am

Alex:
Not, I will do a legal transfert, look, why must I go on the webpage if I can push a button ?
... perhaps I do not understand what you want the result to be ... or copyright/reproduction laws are different in different countries ... in North America, you can not extract/display "parts of a copyrighted item" ... e.g. display parts of a Yahoo or Google (Search Results) page "that do not contain e.g. the ad-links" ... as they expect to make money when users click on these links.
I will have a TextEntry, a pushbutton and a result
If in the TextEntry I write : Montargis, it gives me the weather in Montargis
... from this page ... http://www.meteofrance.com/FR/mameteo/p ... UID=FRANCE ... I typed Montargis in the TextEntry Box in the left column .. and then clicked on the Go button ... and it took me to this page ... http://www.meteofrance.com/FR/mameteo/p ... ID=FR45208

So, you could have a Browser object (e.g. WebBrowser1) and then do ...
Code: Select all
BrowserGoTo "WebBrowser1" "http://www.meteofrance.com/FR/mameteo/prevVille.jsp?LIEUID=FR45208"
... and the same page can be viewed in the Browser Object.

Is that what you were looking for ... or do you want to extract specific text into a NeoBook variable ... if so, what ?
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Alex » Wed Oct 25, 2006 8:12 am

I will extract the weather in Montargis or in a specifie town into a NeoBook variable
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby AlfB » Wed Oct 25, 2006 11:05 pm

hi Alex,
if you have a list of French postal codes, you could do it, as the LIEUID is FR+postal code. BUT be careful: not every village will be shown there, so you have to try a little bit. Maybe it would be better only to take towns.

hope this helped

ALF
User avatar
AlfB
 
Posts: 132
Joined: Sun Apr 03, 2005 12:43 am

Postby Alex » Wed Oct 25, 2006 11:18 pm

Thanks

Hi,

How can I do that ?
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Neobook » Sat Oct 28, 2006 1:38 am

Hi Alex

Look, if you have a TextEntry1, you can write the PostalCode and it goes search the weather.
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby Alex » Sat Oct 28, 2006 3:21 am

Thanks
But How it is working, how can i do it, I don't understand


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Gaev » Sat Oct 28, 2006 2:34 pm

Alex:

I am not sure what you are asking ... more than what has already been posted by me and others on the forum.

If you want to be able to "extract text from the weather page for a village" ... I can't help you because it is illegal to do so.


However, if you are interested in viewing the exact same page that you currently see in your Web Browser (like Internet Explorer or Firefox or Opera) ... only in a WebBrowser Object within a NeoBook Application window ... I can summarize what your countrymen have already posted ... remember that I am not familiar with France's postal code.

a) First, you need to have a Browser Object on your NeoBook pub ... set its Internet Address to http://www.meteofrance.com/FR/mameteo/p ... UID=FRANCE ... so when your pub starts, this index page will be displayed.

b) From here, you can type the name of the village (e.g. Montargis) into the box in the web page in the left column ... and click on the button marked Go !

c) If you don't want to repeatedly type such names, you might consider a facility where you copy/paste ... i.e. click on a village name in (perhaps) a Listbox in your program ... and have it copy the name to the [ClipBoard] ... then you click inside this box in the web page ... and finally do Ctrl+V (hold down the Ctrl key and press V) to paste the text into this box.


d) Alternately, you will have to do some preparatory work first ... this is because (as per AlfB's post) this website stores its information indexed by Postal Codes (not village names)

As you can see, the page address for Montargis was http://www.meteofrance.com/FR/mameteo/p ... ID=FR45208 ... where I am assuming 45208 is the postal code for Montargis.

So if you want the weather for other villages, you will need to know their postal codes ... assuming you have the postal codes for the villages you are interested in, you could then have a TextEntry Box (e.g. TextEntry1) in which you type the postal codes ... and a button which would ...
Code: Select all
SetVar "[weatherURL]" "http://www.meteofrance.com/FR/mameteo/prevVille.jsp?LIEUID=FR[TextEntry1]"
BrowserGoTo "WebBrowser1" "[weatherURL]"
... which will display the corresponding page in the WebBrowser object.

e) But if you want to build a facility that will accept village names instead of postal codes ... you will need to have some kind of file that contains all the postal codes corresponding to all the villages in France ... or at least the villages you need to see in your program ... if you have such a file ... something like ...

Montargis,45208
abcd,12345
pqrs wxyz,98765

... then let me know ... and I can help with how you might be able to write some commands to translate user input (of village names) into postal codes that you supply to this website.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Alex » Sun Oct 29, 2006 5:00 am

Thanks

But there is a bug in Meteo France, because Montargis is 45200, and 45700 is Villemandeur, and the ComboBox is not very a good idee, I don't know How can I have the Weather.

Thanks

Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests