Author

Topic: Namecoin Windows Interface (Read 1564 times)

newbie
Activity: 14
Merit: 0
June 12, 2013, 04:05:05 AM
#3
Good utility.
I like Namecoins.
newbie
Activity: 7
Merit: 0
June 12, 2013, 03:02:29 AM
#2
Thanks for this, it works perfect for me.

It's a lot easier than dealing with the command line, very nice.

If I had anything to donate, I would Smiley
newbie
Activity: 8
Merit: 0
December 29, 2012, 04:41:21 PM
#1
I am posting here because can't post on the other forums, please move it to the correct forum.


Hello, I have developed a Namecoin interface. It's just a bat file that allows you to use easily commands and configure the namecoin client.
When you run it you will be asked to create the namecoind necessary files (if you haven't done it yet). And once configured you will see this menu:




Then you can select any command of the list just typing its number and the needed parameters.

I have created it because it seems that there isn't suport enough to the other developed interfaces and they aren't fully working. This script works on the official namecoin cliend for windows so you can be sure that there is no malware in it.

Here is the code:

Code:
@echo off

set MyDir=%CD%

cd %APPDATA%
if not exist Namecoin goto createdir
cd namecoin
if not exist bitcoin.conf (goto nofile) else (goto start)

:createdir
echo Namecoin folder doesn't exist, do you want to create it?
set /p act1=y/n:
if "%act1%"=="n" goto END
if "%act1%"=="y" mkdir Namecoin
echo Namecoin folder created in %CD%
echo.
goto nofile

:nofile
echo bitcoin.conf doesn't exist, do you want to create it?
set /p act2=y/n:
if "%act2%"=="n" goto END
if "%act2%"=="y" goto createfile

:createfile
set /p rpcuser=Set user:
echo rpcuser=%rpcuser% > bitcoin.conf
set /p rpcpassword=Set password:
echo rpcpassword=%rpcpassword% >> bitcoin.conf
echo rpcport=8336 >> bitcoin.conf
echo daemon=1 >> bitcoin.conf
echo bitcoin.conf created in %CD%
echo.
echo.
goto start

:start

cd %MyDir%
start namecoind.exe
goto menu

:menu
echo.
echo    Select a task:
echo    =============
echo.
echo    1) Info                                                     
echo    2) Received namecoins
echo    3) Create address
echo    4) Send namecoins
echo    5) Current number of blocks
echo    6) Current difficulty
echo    7) Show avaiable commands (help)
echo    8) Type a namecoind command
echo    9) Reset namecoind
echo   10) Close namecoind
echo.
echo Don't use any command while namecoind.exe is loading (It can take some seconds).
echo.

set /p task=Select option [1-10]:
echo.

if "%task%"=="1" goto case1
if "%task%"=="2" goto case2
if "%task%"=="3" goto case3
if "%task%"=="4" goto case4
if "%task%"=="5" goto case5
if "%task%"=="6" goto case6
if "%task%"=="7" goto case7
if "%task%"=="8" goto case8
if "%task%"=="9" goto case9
if "%task%"=="10" goto case10

:case1
start /b namecoind getinfo
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case2
start /b namecoind listreceivedbyaddress 0 true
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case3
set /p account=Account name:
start /b namecoind getnewaddress %account%
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case4
set /p sendto=Send to:
set /p amount=Amount to send:
set /p act3=You are going to send %amount% to %sendto%. Sure? y/n:
if "%act2%"=="n" goto menu
if "%act2%"=="y" goto createfile
start /b namecoind sendtoaddress %sendto% %amount%
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case5
start /b namecoind getblocknumber
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case6
start /b namecoind getdifficulty
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case7
start /b namecoind help

ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case8
set /p task=command:
start /b namecoind %task%
ping -n 3 0.0.0.0 > nul
pause
cls
goto menu

:case9
start /b namecoind stop
ping -n 2 0.0.0.0 > nul
taskkill namecoind.exe
start  namecoind.exe
ping -n 1 0.0.0.0 > nul
pause
cls
goto menu

:case10
start /b namecoind stop
ping -n 3 0.0.0.0 > nul
taskkill namecoind.exe
PAUSE
:END


And here is the link:
http://depositfiles.com/files/kxa0srrvr

Place this file in your namecoin path, if you don't have it yet you can get it from here: http://namecoin.info/files/namecoind_v350_win32.zip

If you found an error just let me know and I will solve it as soon as i can.

To start with namecoin software run it and wait until all blocks are downloaded. (See the current downloaded blocks with the "Info" command, and all the existing blocks with "Current number of blocks" command).
Feel free to ask any doubs you have.


If I have helped you please make a donation  Wink.

Bitcoin: 19R9LyJUeQqgZYkwMvpnJn2orm7rxBMMQK
Namecoin: NBbtK3bXwEjmyxDudoLsDswJPf8He87Hk
Jump to: