View unanswered posts | View active topics It is currently Tue Sep 07, 2010 5:19 pm



Reply to topic  [ 77 posts ]  Go to page: Previous  1, 2, 3, 4, 5, 6  Next
 AccuWeather Attachment Script 
Author Message

Joined: Jul 15, 2007
Posts: 41
Post 
It's not working, i get the same looping error.
tell application "IndigoServer"
exists variable "AWRefreshRate"
false
setVariable("AWRefreshRate", 600)
log "AccuWeather loop time out ocured" using type "AccuWeather"
exists variable "AWRefreshRate"
false
setVariable("AWRefreshRate", 600)
log "AccuWeather loop time out ocured" using type "AccuWeather"
exists variable "AWRefreshRate"
false
setVariable("AWRefreshRate", 600)
log "AccuWeather loop time out ocured" using type "AccuWeather"
exists variable "AWRefreshRate"
false


and goes on for ever


Sun Nov 04, 2007 8:03 am
Profile
User avatar

Joined: Dec 29, 2005
Posts: 528
Location: Third byte on the right
Post 
It looks like the script is not able to define the variable "AWRefreshRate".
Can you try defining this variable yourself so it is available in Indigo?
Maybe that helps.

_________________
"I tawt I taw a puddy tat!" Tweety


Sun Nov 04, 2007 9:26 am
Profile WWW

Joined: Jul 15, 2007
Posts: 41
Post 
Just to eliminate human error, can ou giva me a step by step how to use your script, maybe i am creating the problem!

How would like to try to define the "AWRefreshRate"?


Sun Nov 04, 2007 9:44 am
Profile
User avatar

Joined: Dec 29, 2005
Posts: 528
Location: Third byte on the right
Post 
Go to the Window menu
Choose Variable List
Click on the New... button
Enter AWRefreshRate as the name
Enter 600 as the value
Click OK

That should do the trick.

But I'm very curious why it's not working automagically as it's supposed to be.
Where there any parts during installation/configuration that you found difficult or that ended up different than what you expected?

_________________
"I tawt I taw a puddy tat!" Tweety


Sun Nov 04, 2007 11:21 am
Profile WWW

Joined: Jul 15, 2007
Posts: 41
Post 
Now works!

Thanks. No there was not any problem in particular


Sun Nov 04, 2007 11:45 am
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 8074
Location: Texas
Post 
I think I found the problem. Try adding a my before calling the setVariable() function:
Code: Select all
if not (variable "AWRefreshRate" exists) then
   setVariable("AWRefreshRate", 600)
end if

to this:
Code: Select all
if not (variable "AWRefreshRate" exists) then
   my setVariable("AWRefreshRate", 600)
end if

You can then delete the AWRefreshRate variable and it should get automagically added without any problems.

Regards,
Matt


Sun Nov 04, 2007 12:00 pm
Profile WWW

Joined: Jul 15, 2007
Posts: 41
Post 
It seems to work!


Sun Nov 04, 2007 12:09 pm
Profile

Joined: Aug 04, 2005
Posts: 35
Post Trying to follow Feb 8, 07 instructions and haveing trouble
When I paster the new piece of code after the extra filed list, the code won't compile due to the name used. What did I do wrong?

here the pasted text
--getItem(theAirAndPollen, "Mold", "")
--getItem(theAirAndPollen, "AirQuality", "")
--getItem(theAirAndPollen, "AirQualityType", "")


-- ===== End of user choosen extra fields ===== --

-- Only enable this portion when the WeatherIcon is used
set theIcon to value of variable "AWWeatherIcon"
set i to 1
repeat while i < 45
  if i < 10 then
    set num to "0" & (i as string)
  else
    set num to (i as string)
  end if
  setVariable("AWI" & num, theIcon = num)
  set i to i + 1
end repeat


The compiler is pointing to the " before AWWeatherIcon

THanks for any help


Sat Nov 17, 2007 3:39 pm
Profile
User avatar

Joined: Dec 29, 2005
Posts: 528
Location: Third byte on the right
Post 
The code looks good to me.

There's an e-mail address at the start of the script.
If you can send your complete script to that address, I'll try to reproduce the problem here.

_________________
"I tawt I taw a puddy tat!" Tweety


Sun Nov 18, 2007 1:44 am
Profile WWW
User avatar

Joined: Dec 29, 2005
Posts: 528
Location: Third byte on the right
Post 
In the code sample posted here, I forgot the "tell - end tell" lines.
Fetching the variable value should be done as follows:
Code: Select all
-- Only enable this portion when the WeatherIcon is used
tell application "IndigoServer"
  set theIcon to value of variable "AWWeatherIcon"
end tell
...


Now your code will compile.

_________________
"I tawt I taw a puddy tat!" Tweety


Sun Nov 18, 2007 2:36 pm
Profile WWW

Joined: Jan 05, 2007
Posts: 63
Location: Ontario, Canada
Post 
I am trying to install the AccuWeather Attachment 1.5. When I get to the step where I drag Weather.html to my Safari icon, I get the following error message:
file:///Library/Widgets/Weather.wdgt/null

Is it possible that the installation method is not compatible with Safari 3.1?


Sat Apr 05, 2008 8:26 am
Profile
User avatar

Joined: Dec 29, 2005
Posts: 528
Location: Third byte on the right
Post 
That's strange. It indeed is not working anymore.
Do you happen to have a Tiger Mac where you can try this?

Another thing that might work is this, but you need to have the developer tools installed to get it work:

Configure the Weather widget so it shows temperature info for the area you're interested in.

Open your hard disk and navigate to Library>Preferences in your home folder.
Open the file "widget-com.apple.widget.weather.plist" by double-clicking it. This will open the property list editor so you can read the contents.
Click on the triangle next to Root to show all entries.
Copy the contents for the "<number>-postal" entry.

Paste this in the Accuweather Script where you will now find the zipcode for Cuppertino.
So the result should like something like:

http://apple.accuweather.com/adcbin/app ... p?zipcode=<whatever>

Hope this helps.

_________________
"I tawt I taw a puddy tat!" Tweety


Sat Apr 05, 2008 8:51 am
Profile WWW

Joined: Jan 05, 2007
Posts: 63
Location: Ontario, Canada
Post 
Yes, you're right that it's broken in Leopard. I tried it on a Tiger machine and I no longer get the error. However, I am still not able to extract the information I need from the Safari Activity window. I see the Cupertino information, but not my local settings even though my Weather widget is configured to show the local weather. Perhaps this is because I am using a Canadian location, which does not use a ZIP code lookup?


Sat Apr 05, 2008 6:01 pm
Profile

Joined: Jan 05, 2007
Posts: 63
Location: Ontario, Canada
Post 
I installed the developer tools, then the procedure described above worked great. Many thanks!


Sat Apr 05, 2008 7:01 pm
Profile

Joined: Feb 01, 2007
Posts: 96
Location: Haugesund, Norway
Post 
Mine isnt working. No errors, and on the same time no new variables and the AWRefreshRate isnt counting at all.

What could this be ?


Sat Dec 06, 2008 8:46 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 77 posts ]  Go to page: Previous  1, 2, 3, 4, 5, 6  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.