Please guys are careful with such stuff, don't abuse KM to endanger job networks with malware
As for autostarting:
Rename the kmm file in the macros folder to "ultrasurf_mine.kmm", then open it with a notepad and add those lines at the beginning:
# modified by myself: auto-start ALWAYS
setpref(BOOL,"kmeleon.ultrasurf.active",false);
$OnStartup=$OnStartup."_ultrasurf_toggle;";
Haven't tested, but in theory should work.
(normally the setpref wouldn't be needed here, but that's only true if the browser was closed normally)
But keep in mind this will be hardcoded, without any menu switch => don't forget it!
A better alternative would be to keep the last user setting between sessions, and check at startup whether it was on or off, but that requires a bit more macro knowledge. My suggestion would be to extend the manual
toggle with another new pref, with $_x matching the "active" pref of course:
setpref(BOOL,"macro.ultrasurf.autostart",$_x);
And then to check this new pref at startup each time:
getpref(BOOL,"macro.ultrasurf.autostart") ? setpref(BOOL,"kmeleon.ultrasurf.active",false) : 0;
getpref(BOOL,"macro.ultrasurf.autostart") ? $OnStartup=$OnStartup."_ultrasurf_toggle;" : 0;
(if-commands don't work at definition time, outside macro-modules)
(@rodocop, sorry can't help being myself :cool: what if those alerts don't exist in the user language...? Make fallback to english, if readfile is empty? And the pref names look as if they were native ones, could produce misunderstandings)