Value type for single digit number in registry
Posted by: JamesD
Date: June 16, 2012 02:22AM

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.

Re: Value type for single digit number in registry
Posted by: JujuLand
Date: June 16, 2012 01:31PM

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:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.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.19-6



 
Posted by: adodupan
Date: June 16, 2012 02:26PM

 



Edited 1 time(s). Last edit at 03/01/2016 02:19AM by adodupan.

Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 16, 2012 07: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.

 
Posted by: adodupan
Date: June 17, 2012 02:40PM

 



Edited 1 time(s). Last edit at 03/01/2016 02:19AM by adodupan.

Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 17, 2012 06:39PM

@ 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.

 
Posted by: adodupan
Date: June 17, 2012 07:45PM

 



Edited 1 time(s). Last edit at 03/01/2016 02:20AM by adodupan.

 
Posted by: adodupan
Date: June 29, 2012 04:51PM

 



Edited 1 time(s). Last edit at 03/01/2016 02:20AM by adodupan.

Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 29, 2012 07: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?

 
Posted by: adodupan
Date: June 29, 2012 08:17PM

 



Edited 1 time(s). Last edit at 03/01/2016 02:20AM by adodupan.

Re: Value type for single digit number in registry
Posted by: JamesD
Date: June 30, 2012 12:57AM

@ 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.

 
Posted by: adodupan
Date: June 30, 2012 04:04AM

 



Edited 1 time(s). Last edit at 03/01/2016 02:20AM by adodupan.

K-Meleon forum is powered by Phorum.