Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
continue offline?
Posted by: disrupted
Date: September 02, 2009 07:51PM

http://kmext.sourceforge.net/macros/offlinecheck.7z

similar to internet explorer; checks at startup if k-meleon is working in offline mode and prompts to switch to online mode.



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

# ---------offline prompter----------------------------

offline_chk{
$offline=getpref(BOOL,"kmeleon.general.offline");
$woff=("true");
$offline==$woff?&offprompt:0;
}

offprompt{
$continue=confirm("K-Meleon is currently working in offline mode. Would you like to go online?" , "Offline Mode", YESNO, QUESTION);
$continue=="YES"?&goonline:0;
}

goonline{
id(ID_OFFLINE);
}


$OnStartup=$OnStartup."offline_chk;";
# --------------------------------------------------------------------
$macroModules=$macroModules."offlineprompter;";


Options: ReplyQuote
Re: continue offline?
Posted by: siria
Date: April 23, 2010 04:05PM

Just a suggestion, same thing a bit easier ;-)

offline_chk{
getpref(BOOL,"kmeleon.general.offline") ? &offprompt:0;
}

offprompt{
confirm("K-Meleon is currently working in offline mode. Would you like to go online?", "Offline Mode",YESNO,QUESTION)=="YES"?id(ID_OFFLINE):0;
}

Options: ReplyQuote
Re: continue offline?
Posted by: disrupted
Date: April 23, 2010 04:52PM

it's because i'm used to autoit, i tend to write defining statements and then send out to the next step. it might seem unnecessary in some macros but spreading out the statements into separate functions helps me a lot when updating specific commands since they become clearly visible.

to the enduser it's the same but to me it's easier that way

Options: ReplyQuote
Re: continue offline?
Posted by: siria
Date: April 23, 2010 04:57PM

I thought so. I'd not be able to work with different complicated syntax languages, would mix them up all the time, that's for sure.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.