General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Value type for single digit number in registry
Posted by: JamesD
Date: June 15, 2012 07:22PM

I am trying to get a registry key with the either a zero (0) or a one (1) in the value. I would prefer a boolean value but I don't see that as a choice. Choices listed here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724884(v=vs.85).aspx

I tried with REG_DWORD but my value looks like this: 0x00000001 (1)

This line of macro code needs a true/false anwser.
menuchecked = readreg("HKCU\\Software\\KMELEON\\DNT_mgr\\Status");

I am looking for any suggestions on how to do this.

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
Re: Value type for single digit number in registry
Posted by: JujuLand
Date: June 16, 2012 06:31AM

I think of a little tool which keep a parameter (path+key), and return 1 or 0.
It could be made using AutoIt, and could be called like this:

menuchecked = exec("tools\\dword.exe "."HKCU\\Software\\KMELEON\\DNT_mgr\\Status");

It ought to be easy to do, but I have now time now to do it. Next week, probably ...

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
 
Posted by: adodupan
Date: June 16, 2012 07:26AM

 



Edited 1 time(s). Last edit at 02/29/2016 07:19PM by adodupan.

Options: ReplyQuote
Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 16, 2012 12:12PM

Many thanks to JujuLand and adodupan. I had dropped a comma in my readreg statement.

I would prefer to use a pref but the answer also has to be read by Javascript. The proposed standard for 'do not track' is that the user can control whether to enable or disable the feature. The header for DNT is either a 1 or a 0.

Now all I have to do is get donottrack.js to read the registry item.

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
 
Posted by: adodupan
Date: June 17, 2012 07:40AM

 



Edited 1 time(s). Last edit at 02/29/2016 07:19PM by adodupan.

Options: ReplyQuote
Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 17, 2012 11:39AM

@ adodupan

I think you are right. I cannot discover what object to use to with the read statement when in donottrack.js.

I am seriously thinking of removing donottrack.js from my system. All the free stuff on the web is paid for by advertisers. If nobody sees their adds then they will see no value to providing the sites.

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
 
Posted by: adodupan
Date: June 17, 2012 12:45PM

 



Edited 1 time(s). Last edit at 02/29/2016 07:20PM by adodupan.

Options: ReplyQuote
 
Posted by: adodupan
Date: June 29, 2012 09:51AM

 



Edited 1 time(s). Last edit at 02/29/2016 07:20PM by adodupan.

Options: ReplyQuote
Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 29, 2012 12:54PM

@ adodupan

I seem to not have follow instructions correctly, I guess. In any case, I am not getting a correct header.

I did as follows:
1. I made a new donottrack.js file by coping your updated code from your post. I put that in root\components folder.
2. I created donottrack.kmm file by copying your code. I put that in my user macro folder.
3. I created a donottrack.js file in root\defaults with the line to set the pref to 1.

The menu works, and my configuration file has the "navigator.doNotTrack" value as set by the last menu change. I have confirmed that the menu changes the value.

When I go here: http://browserspy.dk/donottrack.php
I get: No Do Not Track Header detected!

Did I misinterpret an instruction?

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
 
Posted by: adodupan
Date: June 29, 2012 01:17PM

 



Edited 1 time(s). Last edit at 02/29/2016 07:20PM by adodupan.

Options: ReplyQuote
Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 29, 2012 05:57PM

@ adodupan

I stopped KM and deleted the two files. Restarted KM and observed no change. The website you suggested said my browser did not support do not track.

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
 
Posted by: adodupan
Date: June 29, 2012 09:04PM

 



Edited 1 time(s). Last edit at 02/29/2016 07:20PM by adodupan.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.