I have a script that runs thru iChat and allows me to remotely control my networked computers. One of the “commands” is a weather command that uses a python script to scrap yahoo weather and returns the results. Since I’m calling a handler in the weather script to return the weather results is there a way to have a non relative path?
This is my weather “command”.
on AAIR(dynamicCommand) --set weather_loc to findLoc() set weather_loc to POSIX path of ((path to home folder as text) & "Documents:AAIR:weather.py") try if dynamicCommand is "weather" then set theResponse to "NULL area code." else set theWeather to do shell script ("python " & weather_loc & " " & dynamicCommand) set theResponse to theWeather end if on error error_message set theResponse to "Weather Control - error retrieving weather. " & error_message end try --set theResponse to weather_loc return theResponse end AAIR
When I compile this script weather_loc get’s stuck to my systems information. Is there a way around this?