General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Help needed with macros!!!
Posted by: Alex
Date: March 20, 2002 10:08PM


Hi,

I'm a newbie with K-meleon, a least regarding writing macros for it. I was trying
earlier to create a couple of macros and associated buttons to turn on/off images and
cookies. Essentially, I wanted to accomplish the same thing you can do from the menus in
Edit -> Preferences -> Privacy (such as "accept site images" or "accept all images", etc.),
but without having to go through all the menus and options, just with a direct toggle
button from the toolbar, as I do this operations often.

I searched the documentation area, the diverse files with bits and pieces of information.
I found the ones regarding mozilla preferences and kmeleon preferences, but nowhere did I
find anything about site images or cookies. Then, I was looking at my prefs.js file and
I found what seemed two user preferences related to this:

user_pref("network.cookie.cookieBehavior", 2);
user_pref("network.image.imageBehavior", 1);

So I wrote the following macro (in macro.cfg):

setimages {
togglepref(INT, network.image.imageBehavior, 1,2)
}

And the button (in toolbars.cfg):

Setimages {
macros(setimages)
tool2.bmp[10]
tool1.bmp[10]
}


But it doesn't seem to work. So what am I doing wrong? is the "network.image.imageBehavior"
variable the right one to use? Any other kind of dumb mistake on my part?

I would also like to know if there is somewhere full documentation on these preferences. And if
there is a single downloadable documentation file for everything about K-meleon (a limited
set of files would do). I have no problem with the documentation as it is (fine if you
just want to find something rather specific), but tedious if you just want to print
the whole thing and leisurely read it afterwards... That was a lot of work and I'm sure
I missed some hyperlinks...

A final question... has anyone produced additional toolbar button images, like the tool2.bmp
and tool1.bmp files?

Thanks to any charitable soul for any help in advance... smiling smiley

Alex

Options: ReplyQuote
Re: Help needed with macros!!!
Posted by: Andrew
Date: March 20, 2002 11:14PM

Alex,

All the K-Meleon preferences listed here:

http://kmeleon.sourceforge.net/docs/preferences.php

are all of the current K-Meleon preferences. Note: this will change in the next release.

There is no comprehensive list of Mozilla preferences that I'm aware of. Look at your all.js file here:

C:\Program Files\K-Meleon\defaults\pref\all.js

to see a fairly extensive list of Mozilla preferences.

I handle most of the Docs for K-Meleon. Let me know what Docs you would like in a single download.

Andrew

Options: ReplyQuote
Re: Help needed with macros!!!
Posted by: Alex
Date: March 21, 2002 12:42AM


Andrew,

Thanks for the pointers to the documentation. I had gone through the docs already,
but hadn't browsed through the defaults\pref folder, which was quite instructive, thanks again.

On the all-inclusive documentation proposal, what I was thinking of was to essentially create a "manual" on K-meleon. I realize this would be a pain in the neck, specially
since you've already done such a nice job with all the individual web pages... But I was wondering if there aren't any tools available to sort of "collapse" a web tree into
a single document that could be later printed... In the end this is what matters: How can I print the whole thing in a single scoop? No way, huh? smiling smiley

- Alex

Options: ReplyQuote
Re: Help needed with macros!!!
Posted by: po
Date: March 21, 2002 01:00AM

your image toggling macro looks ok to me. have you tried adding it to a menu and triggering it from there, to see if the problem might be with the button part of the arrangement? the menus seem to be the most sure-fire way of calling macros, as far as i can tell.

also, you might try adding

user_pref("network.cookie.warnAboutCookies", true);

which will prompt about cookies at unknown sites, and allow you to have it remember sites that are and aren't allowed to access cookies. it's handy.

Options: ReplyQuote
Re: Help needed with macros!!!
Posted by: Andrew
Date: March 21, 2002 04:12AM

Alex,

I'll add, make sure that you have K-Meleon closed to make these changes. Changes made through the Preferences tabs have been a bit wonky.

I'll see what I can work up with the Docs. I might be able to string something together. Are there particular topics you are looking for or everything?

Andrew

Options: ReplyQuote
Re: Help needed with macros!!!
Posted by: Alex
Date: March 21, 2002 09:24AM


Po and Andrew,

Thank you both for your suggestions. I'll try them later on today, as well as bit more experimenting I'm thinking of.

Andrew, I 'm afraid I sort of meant *everything*. smiling smileysmiling smileysmiling smiley On the other hand, don't worry about just me, of course. That would be a lot of work for a single "customer"... Give it
some thought if you receive additional feedback. I'm impressed at the amount of
excellent work you guys are doing with K-meleon in all areas. You ought to know it
is recognized and much appreciated by most of us... in spite the impatient comments
by some. smiling smiley

I'll post again on the macro subject if I ever discover what went wrong. Ciao for now,

- Alex

Options: ReplyQuote
Re: Help needed with macros!!!
Posted by: Andrew
Date: March 21, 2002 01:25PM

Alex,

OK, I'll see what I can do. I guess if my goal is everything, I don't have to worry about what should be in and what is out.
:-)

Andrew

Options: ReplyQuote


K-Meleon forum is powered by Phorum.