Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rget not understood - produces 0 0
#1
I'm new to forum, have been using QM2 for a while, but in simple tasks. I tried to pass info from Word to QM through the registry. Word updates it perfectly by VBA program. Test program is in code box.
Now I can not get QM2 to read the registry values. Here is what I tried and get Y for sAd and 34 for iPage. When I put a semicoln in front of the forth line ; goto TESTOUT
it prints Did not work.
Help ! Thank you in advance for any input on this. You guys are great.
Jim -- ps I don't know how to put code is color and tabs -- sorry . . .

Code:
Copy      Help
deb
str sAd="Y"
str iPage="34"
goto TESTOUT
rget(sAd "ADVALUE" "HKEY_CURRENT_USER\Andromeda")
rget(iPage "PAGEVALUE" "HKEY_CURRENT_USER\Andromeda")

if sAd = "Y"
    if iPage < 6
        goto A_LOWCOUNT
    else
        goto A_HICOUNT
else if sAd = "N"
    if iPage < 6
        goto N_LOWCOUNT
    else
        goto N_HICOUNT
else out "Did not work"
TESTOUT
out sAd
out iPage
end
A_LOWCOUNT
5.25
A_HICOUNT
15.25
N_LOWCOUNT
8.25
N_HICOUNT
21.25
end
[/list][/code]
#2
Remove HKEY_CURRENT_USER\

Colors, etc - Tips: QM code in the forum (colors, functions, dialogs, etc)
#3
Thank you very much Gintaras,
I did as you said, and with line 4 commented out, I still received
Did not work.
Could I have something misconfigured?
Jim . . .
#4
Gintaras,
I beg your pardon...
I did not do exactly as you said, I left the leading backslash in.
I took it out and ... success !!!
You the man ....
Very sorry.
Much thanks,
Jim . . .
#5
Also, before comparing iPage, convert it to numeric value using function val.

int i=val(iPage)
...
,if i<6
...
#6
Gintaras,
Again, many thanks.
OK guys, we learned a lesson here, never doubt a GURU without double checking every character of the code.
My humble thanks to Gintaras, and may the Lithuanian Force be with you.
Where would we all be without help?
Certainly I for one, would not have come as far.
Thank you,
Jim . . .


Forum Jump:


Users browsing this thread: 1 Guest(s)