AutoHotkey Community

It is currently May 27th, 2012, 11:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: September 19th, 2010, 10:58 am 
Offline

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
Sorry but I dont find that the basic help file covers this very well.
I have tried writing a value to the registry but have not succeeded and when I have found a few examples here but they are different I mean they dont use \ but , eg
RegWrite, HKEY_CURRENT_USER, Software, onOne Software\Mask Pro 4.0
I'm confused
cant someone write some examples to
Write a new registry key
Delete a key
Write a value
Delete a value
------------------
In contrast I managed to Follow the example of RegDelete in the AutoIt help file with no problems, but I would prefer to use AHK

_________________
"Choose your parents wisely"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 19th, 2010, 11:05 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Code:
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\onOne Software\Mask Pro 4.0, MyValueName, Test Value

RegRead, OutputVar, HKEY_CURRENT_USER, SOFTWARE\onOne Software\Mask Pro 4.0, MyValueName
MsgBox % OutputVar

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 19th, 2010, 11:13 am 
Offline

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
HotKeyIt wrote:
Code:
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\onOne Software\Mask Pro 4.0, MyValueName, Test Value

RegRead, OutputVar, HKEY_CURRENT_USER, SOFTWARE\onOne Software\Mask Pro 4.0, MyValueName
MsgBox % OutputVar


But if you want to write a key instead of a value you leave out the REG_SZ at the beginning I suppose?
ok just tried it you need the REG_SZ
seem to have gotten the hang of it now, just found the sometimes commas sometimes not confusing
oh and thank you for the RegRead example, Thats a good tip and I am too stupid to have thought of it

_________________
"Choose your parents wisely"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2010, 4:33 am 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
best to leave the freakin registry alone unless your already well versed AHK should/better not be your learning experience

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2010, 11:19 am 
Offline

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
tank wrote:
best to leave the freakin registry alone unless your already well versed AHK should/better not be your learning experience

Good advice! Got me scared now, LOL :shock:
no i am being carefull, honest, backing up the key first or only testing made up keys etc. I am not going to try anything clever. Good advice though. Do you follow your own good advice?

_________________
"Choose your parents wisely"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2010, 4:22 pm 
Offline

Joined: February 17th, 2008, 7:09 am
Posts: 536
tank wrote:
best to leave the freakin registry alone unless your already well versed AHK should/better not be your learning experience


Probably a good idea. However IniRead/IniWrite should be safe; Assuming you only point to one you make.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2010, 4:38 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
"HelloWorld" wrote:
tank wrote:
best to leave the freakin registry alone unless your already well versed AHK should/better not be your learning experience

Good advice! Got me scared now, LOL :shock:
no i am being carefull, honest, backing up the key first or only testing made up keys etc.
The problem with your approach of "being careful" is it doesnt take into consideration what happens if your command overwrites or mod's other keys.

For instance a common problem with reg edits and parses ( due to there length and often their complex naming schemes ) are typeO's.
So make sure you are backing up the WHOLE REGISTRY not just a single key!!!!

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 20th, 2010, 7:38 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
"HelloWorld" wrote:
Do you follow your own good advice?
you will find precious few if any references from me to the registry just to avoid making someone feel comfortable. I learned about registry long before ahk's parent was even a wet dream in autoits eye. and i made many mistakes with it. It is easy to be cocky but i advise you plan on reinstalling your entire OS from a freshly formatted drive if your not well versed

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group