Improvement requests :  K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary. 
weather icon on main toolbar
Posted by: ndebord
Date: February 08, 2009 10:47PM

Can someone tell me how to use one of the existing icons to create a weather icon on the main toolbar and any other changes that need to be implmented.

Tks.

N

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: desga2
Date: February 09, 2009 03:04AM

I can help you but I need you post me that you exactly like do.

K-Meleon in Spanish

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: ndebord
Date: February 09, 2009 08:14AM

desga2,

OK, right now I'm using James "Mypersonal.kmm" file to load up Weatherunderground on a hotkey (or a click).

Is this the kind of info you need? As for the icon, I'm currently using Early Blue, but I can change to another theme if that is required and I don't much care what the icon looks like, so long as I KNOW what it does! <VBG>

Tks

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

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
#
# ---------- MyPersonal.kmm
# ---------- K-Meleon Macro Language Personal Macros ---------------
#
# Dependencies : main.kmm
# Resources : -
# Preferences : -
# Version : 0.5 2008-08-01
# --------------------------------------------------------------------------------
_AIM{
exec("C:\\AIM\\AIM.EXE");
}
_Faview{
exec("C:\\Program Files\\K-meleon\\fav-view\\faview.exe");
}

_Keepass{
exec("C:\\Program Files\\K-meleon\\keepass\\keepass.exe");
}

_CookieMonster{
exec("C:\\Program Files\\K-Meleon\\CookieMr\\Cookiemonster.exe");
}
_Foxmail{
exec("C:\\Foxmail\\Foxmail.exe");
}
_GUL{
exec("C:\\Program Files\\K-meleon\\GUL\\gul.exe");
}
_Kompozer{
exec("C:\\Program Files\\Kompozer\\kompozerportable.exe");
}
_Popcorn{
exec("C:\\Program Files\\K-Meleon\\Popcorn\\popcorn.exe");
}
_Weather{
$OpenURL="http://www.weatherunderground.com/cgi-bin/findweather/getForecast?query=11101";;
&OpenURL_InNew;
#&OpenURL_InBg;
#&OpenURL_InNewWindow;
}
_MyPersonal_ModMenu{
$_MyPersonal_Popm = "My Personal";
setmenu("&Tools",popup,$_MyPersonal_Popm,Misc);
setmenu($_MyPersonal_Popm,macro,"AIM",_AIM);
setmenu($_MyPersonal_Popm,macro,"Faview",_Faview);
setmenu($_MyPersonal_Popm,macro,"Keepass",_Keepass);
setmenu($_MyPersonal_Popm,macro,"CookieMonster",_CookieMonster);
setmenu($_MyPersonal_Popm,macro,"Foxmail",_Foxmail);
setmenu($_MyPersonal_Popm,macro,"GUL",_GUL);
setmenu($_MyPersonal_Popm,macro,"Kompozer",_Kompozer);
setmenu($_MyPersonal_Popm,macro,"Popcorn",_Popcorn);
setmenu($_MyPersonal_Popm,macro,"Weather",_Weather);
setmenu($_MyPersonal_Popm,separator,1);
&_MyPersonal_Setaccel;
}
_MyPersonal_Setaccel{
setaccel("ALT A","macros(_AIM)");
setaccel("ALT C","macros(_CookieMonster)");
setaccel("ALT G","macros(_GUL)");
setaccel("ALT K","macros(_Kompozer)");
setaccel("ALT M","macros(_Foxmail)");
setaccel("ALT P","macros(_Popcorn)");
setaccel("ALT W","macros(_Weather)");
}
$OnInit=$OnInit."_MyPersonal_ModMenu;";
$macroModules=$macroModules."MyPersonal;";
#


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

N

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: JamesD
Date: February 09, 2009 10:27PM

Here is my way to add a toolbar icon for your weather app. First I have placed an icon (16x16 size) here. http://www.yourfilelink.com/get.php?fid=485518 It is a couple of clicks into their file system to get it.

You will need to make a folder under Skins and name it Default. Put the new icon in that folder.

Next is to make a change to toolbars.cfg in your skin. Add this code

	Weather{
	macros(WeatherSite)
	Open Weather Site
	weather.bmp
	weather.bmp
	weather.bmp
	}

Also I needed to make some small changes to the macro. Since we are calling weather from the toolbar, it must have a public name. That means we take away the "_" from it. There were some other small changes needed in the macro. There are changes in WeatherSite, ModMenu, and Setaccel.

WeatherSite{
$_WeatherURL= urlencode("www.weatherunderground.com");
open($_WeatherURL);
#openBg($_Weather);
#openNew($_Weather);
}
_MyPersonal_ModMenu{
$_MyPersonal_Popm = "My Personal";
setmenu("&Tools",popup,$_MyPersonal_Popm,Misc);
setmenu($_MyPersonal_Popm,macro,"AIM",_AIM);
setmenu($_MyPersonal_Popm,macro,"Faview",_Faview);
setmenu($_MyPersonal_Popm,macro,"Keepass",_Keepass);
setmenu($_MyPersonal_Popm,macro,"CookieMonster",_CookieMonster);
setmenu($_MyPersonal_Popm,macro,"Foxmail",_Foxmail);
setmenu($_MyPersonal_Popm,macro,"GUL",_GUL);
setmenu($_MyPersonal_Popm,macro,"Kompozer",_Kompozer);
setmenu($_MyPersonal_Popm,macro,"Popcorn",_Popcorn);
setmenu($_MyPersonal_Popm,macro,"Weather",WeatherSite);
setmenu($_MyPersonal_Popm,separator,1);
&_MyPersonal_Setaccel;
}
_MyPersonal_Setaccel{
setaccel("ALT A","macros(_AIM)");
setaccel("ALT C","macros(_CookieMonster)");
setaccel("ALT G","macros(_GUL)");
setaccel("ALT K","macros(_Kompozer)");
setaccel("ALT M","macros(_Foxmail)");
setaccel("ALT P","macros(_Popcorn)");
setaccel("ALT W","macros(WeatherSite)");
}


Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: desga2
Date: February 10, 2009 06:31AM

I modified the JamesD Weather icon with more similar Early Blue colors:


K-Meleon in Spanish

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: ndebord
Date: February 13, 2009 11:06PM

desga2,

thanks for that. I do like to keep to the Early Blue theme!

<g>

N

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: ndebord
Date: April 21, 2009 09:38AM

Quote
desga2
I can help you but I need you post me that you exactly like do.

I was just looking through the macro library and I realized that there is no new macro for the old weather DOT com

weather_report {
menu = "Weather Report";
$acode = prompt("Enter Area Code:", "Weather Report");
$site = "http://www.weather.com/weather/local/";;
opennew($site . $acode);
}




Has anyone redone this for use with KM 1.5xx??

Tks

N

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: disrupted(unlogged)
Date: April 21, 2009 06:45PM

it should work.. i checked weather.com address code and it still works.. this is best for users in the u.s.a.. i think bbc weather service is better for international users.. for most european countries, they have local weather sites that would make better macro but bbc will be good for international weather(especially business travellers/tourists)

weather_report{
menu = "Weather Report";
$acode = prompt("U.S. residents enter zip Code, or City name for international users:", "Weather Report");
$site = "www.weather.com/weather/local/";
opentab($site .$acode);
}

weather_BuildMenu{
setmenu(WebServices,macro,"Check Weather",weather_report);
}
$OnInit=$OnInit."weather_BuildMenu;";

$macroModules=$macroModules."weather;";


copy code and make macro (weather.kmm) and check if it works

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: disrupted(unlogged)
Date: April 21, 2009 07:21PM

this check international cities with bbc weather service
http://kmeleon.swiftfree.net/bbcweather.kmm

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- bbc weather -

bbcweather{
$acode = prompt("Enter City name:", "Check Weather");
opentab("www.bbc.co.uk/cgi-perl/weather/search/new_search.pl?search_query=" .$acode);
}

bbcweather_BuildMenu{
setmenu(WebServices,macro,"International Weather",bbcweather);
}
$OnInit=$OnInit."bbcweather_BuildMenu;";

$macroModules=$macroModules."bbcweather;";


Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: disrupted(unlogged)
Date: April 21, 2009 07:29PM

use this one better.. so if you click cancel, it won't open bbc tab with no query

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- bbc weather -

bbcweather{
$code = prompt("Enter city name or U.K postal code(e.g. SW1E):", "Check Weather", $code);
$code == "" ? "" : opentab("www.bbc.co.uk/cgi-perl/weather/search/new_search.pl?search_query=" .$code);
}

bbcweather_BuildMenu{
setmenu(WebServices,macro,"International Weather",bbcweather);
}
$OnInit=$OnInit."bbcweather_BuildMenu;";

$macroModules=$macroModules."bbcweather;";


Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: desga2
Date: April 22, 2009 02:28AM

Quote
disrupted(unlogged)
weather_report{
menu = "Weather Report";
$acode = prompt("U.S. residents enter zip Code, or City name for international users:", "Weather Report");
$site = "www.weather.com/weather/local/";
opentab($site .$acode);
}

weather_BuildMenu{
setmenu(WebServices,macro,"Check Weather",weather_report);
}
$OnInit=$OnInit."weather_BuildMenu;";

$macroModules=$macroModules."weather;";

Only one note about your code, this lines are redundat:
- This is the line used in old versions where setmenu() function not exist or isn't used because menu entry is defined in menus.cfg file.
menu = "Weather Report";

- This line is used in version with new macro language where menu definitions is include with setmenu() function in kmm macro file.
setmenu(WebServices,macro,"Check Weather",weather_report);

If you use setmenu() function for menu definition in your macro files for 1.5.x version please replace
menu = "Weather Report";
to
macroinfo = "Weather Report";
.

K-Meleon in Spanish



Edited 2 time(s). Last edit at 04/22/2009 02:29AM by desga2.

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: disrupted
Date: April 22, 2009 05:21AM

thanks desga..i always forget that bit.. but hey, it's not missing any semicolons grinning smiley

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: ndebord
Date: April 22, 2009 10:15AM

disrupted,

I now have 3 different ways of getting my weather fix. RSS feeds, Jame's macro and now yours!

Much thanks.

Accuweather through Aggreg8's RSS Feed

http://rss.accuweather.com/rss/liveweather_rss.asp?metric=0&locCode=11211


WeatherUnderground as a "James" Url ( myurls.kmm )

&OpenURL_InNew;
}

_Weather{
$OpenURL="weatherunderground.com/cgi-bin/findweather/getForecast?query=11101";
&OpenURL_InNew;
}

_MyURLs_BuildMenu{
$_MyURLs = "My URLs";
setmenu($_MyURLs,macro,"Weather",_Weather);
}
$OnInit=$OnInit."_MyURLs_BuildMenu;";

N

Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: caktus
Date: April 22, 2009 01:57PM

RE: Weatherunderground.

For an instant I thought you may have been talking about a terrorist organiztion from the passed.surprised smileygrinning smiley

Charlie

~~If it ain't broke, why screw it up?~~


Options: ReplyQuote
Re: weather icon on main toolbar
Posted by: ndebord
Date: April 23, 2009 11:30AM

Quote
caktus
RE: Weatherunderground.

For an instant I thought you may have been talking about a terrorist organiztion from the passed.surprised smileygrinning smiley

Well, they are located in Michigan!


;-)

N

Options: ReplyQuote


K-Meleon forum is powered by Phorum.