newsfox help
Posted by:
disrupted(unlogged)
Date: August 08, 2008 03:35PM
i changed the newsfox execution macro to open in a new window instead of tab "OpenURL_InNewWindow"; however it opens ina very tiny and quite frustrating size that i have to resize every time(no save settings), i was wondering how i can predefine the newsfox window to open in a specific width and height.. thanks en advance
Re: newsfox help
Posted by:
disrupted(unlogged)
Date: August 08, 2008 03:38PM
update:
also, if there's a way to only have a one instance running of newsfox, so that if it's executed from the menu, it doesn't keep on opening new windows/instances.
Re: newsfox help
Date: August 08, 2008 06:56PM
NewsFox doesn't have any preset sizes since we want to use whatever space the user has set up.
For the first question, I would try opening a new window with about:blank and then changing the location.href.
For the second question, you basically need to check if it is open. That's what we do in Firefox in browser overlay code, but there aren't overlays in K-Meleon. Here is a rough start to a macro(KM 1.5 only) I have lying around that takes a URL as an input and then either selects a tab with that URL or opens it in a new tab. You might be able to use some of the ideas, but I'm only writing for a single window(all I ever use) and also for user input on the URL.
***begin OpenSelect.kmm code
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- Open new tab with URL or select existing tab ----------------------------------------------------------
#
# Dependencies : main.kmm
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------
OpenSelect{
$findURL = prompt("URL:","");
id( ID_TAB_LAST );
$tmp = $URL;
id( ID_TAB_PREV );
$done = 0;
while ($done == 0) &_toNext;
$done == -1 ? opentab($findURL): 0;
}
# ----- PRIVATE
_toNext{
$findURL == $URL ? $done=1 : $URL == $tmp ? $done=-1 : id( ID_TAB_PREV );
}
_OpenSelect_BuildMenu{
setmenu("&Load Session",macro,"Open/Select","OpenSelect");
}
$OnInit=$OnInit."_OpenSelect_BuildMenu;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."OpenSelect;";
Re: newsfox help
Posted by:
disrupted(unlogged)
Date: August 08, 2008 09:48PM
thanks, first i tried fiddling with the internal jar newsfox.xul but that didn't work obviously..then i tried executing the urlpage for newsfox in fixed width,height..no luck..
eventually i got tired so i took the easy road and just linked the rss feed menu to an external application(feedreader3).. i like it better than newsfox though it uses ie trident engine for preview.. while i was at it, i though i'll link it to send link to/page to..comes in handy for automatic addition of xml feed links on sites..if anyone needs it:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- RSS Feedreader---------------------------------------------------------------------------
#
# Dependencies : main.kmm (Go), sendto.kmm (menus), mail.kmm (menus)
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------
RS_OpenPage{
$_RS_Open=$URL; &_RS_Open;
}
RS_OpenLink{
$_RS_Open=$LinkURL; &_RS_Open;
}
RS_OpenURL{
$__text=$URLBAR; $__text==""?$__text=$URL:0;
$_RS_Open=$__text; &_RS_Open;
}
# ----- PRIVATE
_RS_Open{
# fallback command line (may fail on NT):
$_RS=sub("%s",_("Program Files"),"\"H:\\applications2\\RSSreader\\extended\\feedreader.exe\" %1");
# PATCH (invalid IE7 registry data)
index($__data,".")>index($__data,"%1")?$__data="\H:\\applications2\\RSSreader\\extended\\feedreader.exe\" %1":0;
# PATCH
$__data==""?0:$_RS=$__data; exec(sub("%1",$_RS_Open,$_RS));
}
_RS_BuildMenu{
index($macroModules,";SendTo;")>-1?&_RS_BuildMenu_SendTo:&_RS_BuildMenu_Default;
}
_RS_BuildMenu_Default{
$__m="RSS Feedread";
setmenu(DocumentOpenExternal,macro,$__m,RS_OpenPage);
setmenu(LinkOpenExternal,macro,$__m,RS_OpenLink);
#setmenu(ImageOpenExternal,macro,$__m,RS_OpenImage);
setmenu(_Go_Open,macro,$__m,RS_OpenURL);
}
_RS_BuildMenu_SendTo{
$__m="RSS Feedread";
setmenu($_SendTo_Page,macro,$__m,RS_OpenPage);
setmenu($_SendTo_Link,macro,$__m,RS_OpenLink);
#setmenu($_SendTo_Image,macro,$__m,RS_OpenImage);
setmenu($_SendTo_URL,macro,$__m,RS_OpenURL);
}
_RS_SetAccels{
setaccel("CTRL ALT Q","macros(RS_OpenPage)");
}
$OnInit=$OnInit."_RS_SetAccels;_RS_BuildMenu;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."RS;";
for some odd reason when i set the menu for the feedreader in the same macro, it just disabled the send page/link entires..so i made a different macro for the mail/news menu:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- RSS Feedreader tools menu---------------------------------------------------------------------------
#
# Dependencies : main.kmm (Go), mail.kmm (menus)
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------
FS_OpenPage{
$_FS_Open=$URL; &_FS_Open;
}
# ----- PRIVATE
_FS_Open{
# fallback command line (may fail on NT):
$_FS=sub("%s",_("Program Files"),"\"H:\\applications2\\RSSreader\\extended\\feedreader.exe\" %1");
# PATCH (invalid IE7 registry data)
index($__data,".")>index($__data,"%1")?$__data="\H:\\applications2\\RSSreader\\extended\\feedreader.exe\" %1":0;
# PATCH
$__data==""?0:$_FS=$__data; exec(sub("%1",$_FS_Open,$_FS));
}
_FS_BuildMenu{
# tools menu
index($macroModules,";Mail;")>-1?setmenu(_Mail_News,macro,"Read &RSS Feeds",FS_OpenPage):setmenu(MailNews,macro,"Read &RSS Feeds",FS_OpenPage);
}
$OnInit=$OnInit."_FS_SetAccels;_FS_BuildMenu;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."FS;";
thanks a lot for the code mistrep, i'm sure it will come in handy very soon!