@echo off
cd C:\Users\"%username%"\Downloads\vanity\gen
@echo off
set /p Address=""
vanitygen -X 0 1%Address%
@echo off
for /f "tokens=2" %%a in ('vanitygen 1%Address% ^| findstr Privkey ') do echo %%a|clip
msg "%username%" Generation complete! Your private address has been copied to your clipboard!
PAUSE
This code works, however instead of copying the privaddress, it runs the script again, and copies that code. I need it to copy the first result, not the second one, as they will both be different. What can be done to make it only copy the one displayed?
It's difficult to figure out what you mean by "it runs the script again" - You havent indicated what
vanitygen
is, but if the stringPrivkey
occurs more than once in its output, this change should fix the problem.