continue offline?
Posted by: disrupted
Date: September 03, 2009 02:51AM

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;";


Re: continue offline?
Posted by: siria
Date: April 23, 2010 11: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;
}

Re: continue offline?
Posted by: disrupted
Date: April 23, 2010 11: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

Re: continue offline?
Posted by: siria
Date: April 23, 2010 11: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.

K-Meleon forum is powered by Phorum.