Bitcoin Forum
November 03, 2024, 08:23:23 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Namecoin Windows Interface  (Read 1453 times)
ZMinner (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
December 30, 2012, 03:05:22 PM
 #1

Moved from newbies 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 /F /IM "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 /F /IM "namecoind.exe"
PAUSE
:END


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

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
phelix
Legendary
*
Offline Offline

Activity: 1708
Merit: 1020



View Profile
January 02, 2013, 10:40:28 AM
 #2

>Don't use any command while namecoind.exe is loading (It can take some seconds).
Would be nice if namecoind would do something to let you know it is up and ready, wouldn't it.

are you aware of these:
https://bitcointalk.org/index.php?topic=123271    (namecoin stock control)
http://dot-bit.org/forum/viewtopic.php?f=2&t=495    (nmc auto update)
(both based on namecoin python interface)

just thinking it could be of interest to you


Also I have heard rumors about a GUI  Cheesy    Seriously, there is a GUI.
Linux_Worm
Newbie
*
Offline Offline

Activity: 13
Merit: 0



View Profile WWW
January 03, 2013, 07:47:51 AM
 #3

>Don't use any command while namecoind.exe is loading (It can take some seconds).
Would be nice if namecoind would do something to let you know it is up and ready, wouldn't it.

are you aware of these:
https://bitcointalk.org/index.php?topic=123271    (namecoin stock control)
http://dot-bit.org/forum/viewtopic.php?f=2&t=495    (nmc auto update)
(both based on namecoin python interface)

just thinking it could be of interest to you


Also I have heard rumors about a GUI  Cheesy    Seriously, there is a GUI.

the only GUI  i have seen for NMC

http://dot-bit.org/forum/viewtopic.php?f=9&t=341

https://i.imgur.com/UQw3w.png
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!