vrocco Posted January 29, 2008 Posted January 29, 2008 (edited) I know I am missing something simple here. Please help me out with why the code below won't work correctly. $profile = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", "DefaultProfile") MsgBox(4096, "test", "default profile is:"+$profile) When I do that, the message box just says "0" (without quotes) When I do: $profile = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", "DefaultProfile") MsgBox(4096, "test", "default profile is:", $profile) I get "default profile is:" and nothing else. What am I doing wrong? Edited January 29, 2008 by vrocco
ResNullius Posted January 29, 2008 Posted January 29, 2008 (edited) I know I am missing something simple here. Please help me out with why the code below won't work correctly. $profile = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", "DefaultProfile") MsgBox(4096, "test", "default profile is:"+$profile) When I do that, the message box just says "0" (without quotes)MsgBox(4096, "test", "default profile is:" & $profile) & is the string concantenator in AutoIt. + is the mathematical addition and AutoIt performs a conversion to numbers when trying to use +; so a string converts to zero, and 0+0 = 0. EDIT: see "Operators" under "Language Reference" in the Help File Edited January 29, 2008 by ResNullius
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now