Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rset and rget
#1
Hey i was wondering.
Im usin rget and rset
But i am unsure on how to add things to it Without overwriting what was already there.
Say i have information in it like:

My Name: Tyler
Then next time i use it i want to add my Hobby.
My Hobby: Football

So in the registry there will be
My Name:Tyler
My Hobby: Football

Thanks,
Tyler
#2
It is easier to use two separate registry values for name and hobby.

Macro
Code:
Copy      Help
rset "Tyler" "My Name" "\Tyler"
rset "Football" "My Hobby" "\Tyler"

Here \Tyler is your key (it is like a folder) where you can store My Name, My Hobby and other values.
#3
Oh i get you,
So you think, if i had a dialog and they enter a text,
and when they press a Enter button, it stores in Registry
something like
str a.getwintext(id(1 "Dialog"))
rset a "\Tyler"
:?:
#4
In my examples, there are 3 arguments, not 2. Everytime use a different string for the second argument, and then registry values will not be overwritten.
#5
But then how would you rget that for future reference ?
#6
Use the same second and third arguments as with rset.

Did you ever used regedit.exe?
#7
Hi, need some help again lol
If i have a function with this..
Function 1:
str Name
if(!inp(Name "Enter your First Name here" " RudeBoi's Rapid Caddy" "Enter Your Name")) ret
rset Name "DialogHello" "\Tyler"

In a new function how would i rget but use in a string?
str hello
hello="Hi,"
hello+rget "DialogHello" "\Tyler"
out hello

I Know that doesn't work, but thats what i want it to do
so it ends up Hi,Tyler in the out box Big Grin
#8
Macro
Code:
Copy      Help
str hello
rget hello "DialogHello" "\Tyler"
hello-"Hi,"
out hello
#9
Thanks man Big Grin
works great
#10
If i have a dialog where they enter a name in an Edit box.
And then press a button "Save"
so it saves to registry.
But everytime i do this it overwrites.
How could i prevent this from happening.
Can you tell me the rget and rset to do this.
The idea is a storage list Big Grin
Thanks,
Tyler
#11
Macro
Code:
Copy      Help
str names name
rget names "names" "\Test" ;;get the list

out; out "-- All names --"; out names

if(!inp(name "Add new name") or !name.len) ret

names.addline(name) ;;add to the list
rset names "names" "\Test" ;;save the list


Forum Jump:


Users browsing this thread: 6 Guest(s)