EmilyLove Posted October 28, 2016 Share Posted October 28, 2016 (edited) So here's the script $sBinaryVideoPath = RegRead("HKEY_CURRENT_USER\SOFTWARE\NVIDIA Corporation\Global\ShadowPlay\NVSPCAPS", "DefaultPathW") ;Value = 0x43003A005C00550073006500720073005C0062006500740061006C005C004F006E006500440072006900760065005C0044006F00630075006D0065006E00740073005C0056006900640065006F0073000000 $sVideoPath = BinaryToString($sBinaryVideoPath, 2) $sVideoPath &= "\TEST" InputBox("","",$sVideoPath) This gets the folder that Nvidia ShadowPlay saves its videos to. Don't worry if you don't have ShadowPlay Installed, just replace $sBinaryVideoPath with the commented value. Then it converts the binary string to a regular string so we can read and use it. Then I append "\TEST" to the end of that string. Finally I display the variable. The problem is it won't append anything to the end of the variable once it is assigned. I can prepend something to this string but appending fails for some reason. Can someone help me figure out this issue? Edited October 28, 2016 by BetaLeaf Link to comment Share on other sites More sharing options...
Tekk Posted October 28, 2016 Share Posted October 28, 2016 BinaryToString is leaving the null character on the end of the path, you'll have to strip it away. $sBinaryVideoPath = RegRead("HKEY_CURRENT_USER\SOFTWARE\NVIDIA Corporation\Global\ShadowPlay\NVSPCAPS", "DefaultPathW") $sVideoPath = BinaryToString($sBinaryVideoPath, 2) $sVideoPath = StringStripWS($sVideoPath, 2) $sVideoPath &= "\TEST" InputBox("","",$sVideoPath) EmilyLove and Xandy 2 Link to comment Share on other sites More sharing options...
Developers Jos Posted October 28, 2016 Developers Share Posted October 28, 2016 The last character is the string is Hex 00, so you need to strip that: $sBinaryVideoPath = Binary("0x43003A005C00550073006500720073005C0062006500740061006C005C004F006E006500440072006900760065005C0044006F00630075006D0065006E00740073005C0056006900640065006F0073000000") $sVideoPath = BinaryToString($sBinaryVideoPath, 2) $sVideoPath = StringTrimRight($sVideoPath, 1) $sVideoPath &= "\TEST" ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sVideoPath = ' & $sVideoPath & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console Jos Xandy 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
EmilyLove Posted October 28, 2016 Author Share Posted October 28, 2016 Got it. Thanks everyone. Xandy 1 Link to comment Share on other sites More sharing options...
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