Wazup and dynamic values... Thread last updated on 2007-07-15 20:14:05

Posted by member 256241 on 2007-07-14 22:04:48

Hi, I'm trying to convert some wazup code, a weather reader:

WeatherURL "http://xoap.weather.com/weather/local/$Location$?cc=*&dayf=3&unit=$Format$"

I want to be able to change the $location$ at run time, so I tried having it as an mzscript variable: ocal/%{Location}?cc=
but that stops the wazup from functioning. If I define Location outside of my mzscript varsfile it works, but I don't know how to make it dynamic...

If anyone could shed some light on this for me I'd be appreciative, thanks.

I started having a look at changing it with textreplace, but I haven't sucessfully got it to replace anything yet:

!execute [!TextReplace @$ThemeDir$theme.rc@ @^Location .@ @Location %[textinput]%@]

Is this a good way to go about it? What's wrong with that code?


Thanks for your time.

Xander.

Posted by member 212670 on 2007-07-14 22:47:22 link

I use the same module and same weather site in FBL Dynamic. Have a look in the script.rc, starting on line 514. Also look in the labels.rc, starting on line 280.

Posted by member 256241 on 2007-07-15 20:14:05 link

Thanks, a bit of headscratching and looking over your code I managed to get there. Now I'm at the point where I can add new locations to a dynamic popup, although I don't know how to name the new popup entries. Ideally, I'd want them to be the location part of the wazup get...:

WeatherOutputString "Location: {%1}Temp: {%6}º

{%1} seems to be the data that I want to grab into a value... It's just that I don't know how to get that data from wazup.

Thanks again for your time.

Never mind, seems that
[!WazupParseCommand Weather !varset locname "{%1}"
does the trick nicely.