Jump to content

Recommended Posts

Posted (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 by BetaLeaf

 

 

  • Developers
Posted

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

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.
  :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...