Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
You shouldn't have "get" there...
get... like "get" your shoes. That is not what you are asking for, you what to change something, ..set your shoes on the floor. setRegistry.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Without the get, the set generates a Livecode "can't find handler" error.
With the get, I get a change in the registry value, however it is reported as invalid.
setRegistry is a function, so using get is the correct way (or an if statement).. Perhaps but the "2" in the setRegistry function instead of a variable..
I ran into this problem a few months ago. I was trying to use a variable inside of a function and it kept generating an error. Since it represented user input, it needed it to be a variable. My solution was probably not the best, but it got me passed the problem. I just put the entire statement inside of a do statement and used the "&" to string together the function statement with the variable. Of course that can be a nightmare in itself. I'm sure there is an easier way, and I will be following this thread to see what the answer is.
In your case though I think the problem is in the registry value itself. I think you need to convert the "2" in tValue to 32 bit format.
Ignore my previous comments. I have been playing with this for some time, and I can't seem to get LC to send the value to the registry in a format that it can understand. In C++ there was always the annoying need to pass the pointer to the value of a dword entry instead of the value itself. I wonder if setRegestry function just cannot send data that way.
put "2" into tValue
get setRegistry("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", binaryEncode("I",tValue), "dword")
works here.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
put "2" into tValue
get setRegistry("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", binaryEncode("I",tValue), "dword")
works here.
Simon
Thanks Simon, worked here too, now I know where my shoes are...