Bitcoin Forum
May 11, 2024, 06:22:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Want to send bitcoins from the command-line in windows  (Read 7028 times)
bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 09, 2013, 10:29:56 AM
 #1

Hi everyone,

i am currently working on a bitcoin-faucet-like script that sends bitcoins to selected people.
I want to let the script send bitcoins from a batch-file at specified intervals.

I have searched for a client that can send bitcoins from the command-linne in windows, but sofar i havent succeeded.
Does anyone know a good windows-based bitcoin-client that can send bitcoins from the command-line ?

Thanks!
Roland.

- bitcoinspot.nl - Alles over bitcoin! -
1715451743
Hero Member
*
Offline Offline

Posts: 1715451743

View Profile Personal Message (Offline)

Ignore
1715451743
Reply with quote  #2

1715451743
Report to moderator
1715451743
Hero Member
*
Offline Offline

Posts: 1715451743

View Profile Personal Message (Offline)

Ignore
1715451743
Reply with quote  #2

1715451743
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
March 09, 2013, 10:45:23 AM
 #2

The standard Satoshi client for Windows comes with bitcoind which acts as server and as an RPC client.

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 09, 2013, 09:07:42 PM
 #3

ok but how do i send commands, sorry stupid question maybe, but i cant seem to do it trough the command line.

thanks in advance!

- bitcoinspot.nl - Alles over bitcoin! -
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
March 10, 2013, 12:50:22 AM
 #4

You need to have setup up at least rpcpassword in bitcoin.conf first then to start the daemon use "start bitcoind" and to test a command:

Code:
bitcoind -rpcpassword=password listtransactions

If you are wanting to use the RPC commands with bitcoind whilst bitcoin-qt is also running then add "server=1" into bitcoin.conf (then start bitcoin-qt first rather than bitcoind as a daemon).

I would also recommend adding "rpcallowip=127.0.0.1" so that external IP addresses cannot send RPC commands.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 10, 2013, 07:19:04 PM
 #5

ok thanks so much for the getting-started, once i got going it was quite easy!

I am now running a windows client that:
- gets mail out of a pop box
- gets the senders email and btc address
- send 0.001 btc to the sender
- sends the sender an email.

If anyone's interested how i did it, just let me know!

Thanks again!
Roland.

- bitcoinspot.nl - Alles over bitcoin! -
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1032



View Profile WWW
March 11, 2013, 12:45:36 AM
 #6

ok thanks so much for the getting-started, once i got going it was quite easy!

I am now running a windows client that:
- gets mail out of a pop box
- gets the senders email and btc address
- send 0.001 btc to the sender
- sends the sender an email.

If anyone's interested how i did it, just let me know!

Thanks again!
Roland.

I'm more interested in sending some emails to this email address!
bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 11, 2013, 07:15:26 AM
 #7

haha, i bet you are

- bitcoinspot.nl - Alles over bitcoin! -
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 12, 2013, 08:16:33 AM
 #8

I'm interested. I want to make something that is semi-automated to do something similar but for a different service. I need to be able to get the balance, so there is getbalance, or listtransactions so I know if I got something back, or while I am waiting for coins sent to me to confirm. And of course, sending coins to an address.

I plan on using one of those Windows command line Basic compilers, since I have some experience with them, calling the bitcoin server (bitcoin-qt or bitcoind).

And of course, it has a lot of if-then-else statements to make sure I don't lose all my coins, or it sends too often or too fast.

bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 12, 2013, 08:46:56 AM
 #9

yeah i just made a batchfile that sends commands to bitcoind, works like a charm Smiley

if you need any help let me know.

- bitcoinspot.nl - Alles over bitcoin! -
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 12, 2013, 03:53:11 PM
 #10

For the newbies out there, can you show us how? I was trying to get the command line to work, but I'm thinking I'm starting this wrong or my bitcoin.conf is missing something.

What I've been able to do is bitcoin-qt and typing in the debug console.

bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 12, 2013, 06:55:49 PM
 #11

Ok i put the whole batchfile here...
the batchfile gets data from a pop box and uses that to send coins and emails
i just keep it continously running om my windows machine.
see REM for the remarks.
At the end of the batchfile i call bitcoind.exe to send the bitcoins

This is what my bitcoin.conf looks like
Quote
server=1
rpcuser=xxxxxxx
rpcpassword=xxxxxxxxx
i keep my bitcoin-qt client running in the background


The batch file
Quote
@echo off
cls
set timeout=10

:_loop
REM call the external popclient program to get messages fro pop3 mailbox
c:\temp\popclient\popclient.exe -configfile c:\temp\popclient\democonfig.xml
REM process all the .txt files downloaded by popclient and call :_readfile for every file
for /f %%A in ('dir /B *.txt') do call :_readfile %%A
echo pause %timeout% sec ....
ping 100.100.100.100 -w 1000 -n %timeout% > nul
REM Back to the start
goto :_loop

::------------------------------------------------------------------------------------

:_readfile

set email=empty
set address=empty
set naam=empty

REM Get email data from the email file and put it in variables
REM in my setup i forward the mail and put em, ad and na in front of the name
REM address and email-adress and put that in the message
type %1 | find "em:" /I > %temp%\temp.txt
echo em:
type %temp%\temp.txt
echo ---
for /f "tokens=2 delims=:" %%a in (%temp%\temp.txt) do (@set email=%%a)
type %1 | find "ad:" /I > %temp%\temp.txt
echo ad:
type %temp%\temp.txt
echo ---
for /f "tokens=2 delims=:" %%a in (%temp%\temp.txt) do (@set address=%%a)
type %1 | find "na:" /I > %temp%\temp.txt
echo na:
type %temp%\temp.txt
echo ---
for /f "tokens=2 delims=:" %%a in (%temp%\temp.txt) do (@set username=%%a)

del %temp%\temp.txt

echo -----------------------------------------------------
echo %date% - %time%
echo file: %1
echo email: %email%
echo address: %address%
echo naam: %username%

pause


REM Put all the data in a logfile
echo ----------------------------------------------------- >> c:\temp\popclient\inbox\log.dat
echo %date% - %time%                                       >> c:\temp\popclient\inbox\log.dat
echo file: %1                                              >> c:\temp\popclient\inbox\log.dat
echo email: %email%                                        >> c:\temp\popclient\inbox\log.dat
echo address: %address%                                    >> c:\temp\popclient\inbox\log.dat
echo naam: %username%                                      >> c:\temp\popclient\inbox\log.dat
move %1 c:\temp\popclient\inbox\processed\

REM Call the bitcoin daemon and send the money to the adress retrieved fro the mail
"c:\Program Files (x86)\bitcoin\daemon\bitcoind.exe" -rpcpassword=xxxxxxxxxx sendtoaddress %address% 0.001 "0.001 naar %email%" "0.001 naar %email%" >> c:\temp\popclient\inbox\log.dat

echo beste %username% > %temp%\bericht.txt
type c:\temp\popclient\template.txt >> %temp%\bericht.txt

set subject="0.001 bitcoins - met de groeten van bitcoinspot.nl"

REM Send mail to email-adress retrieved from mail
c:\temp\popclient\blat %temp%\bericht.txt -to %email% -f z@x.com -subject %subject% -server x.x.nl > %temp%\temp.txt

type %temp%\temp.txt >> c:\temp\popclient\inbox\log.dat

del %temp%\bericht.txt

REM End of procedure, return to loop
goto :EOF

::------------------------------------------------------------------------------------

- bitcoinspot.nl - Alles over bitcoin! -
bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 12, 2013, 06:57:45 PM
 #12

@dabs: do you want to send me an email on webmaster@bitcoinspot.nl, i want to ask you something about the bitcoin megastore.

thanks!

- bitcoinspot.nl - Alles over bitcoin! -
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 13, 2013, 04:16:39 AM
 #13

@bitcoinspot.nl: Someone bought my sig line for 0.1 BTC per month. I think the store sells tshirts, cafepress does a lot of tshirt printing (and other items) for anyone who has a design. I figured it was a good deal considering all I've been doing at other "faucets".

bitcoinspot.nl (OP)
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile WWW
March 13, 2013, 05:49:05 AM
 #14

@bitcoinspot.nl: Someone bought my sig line for 0.1 BTC per month. I think the store sells tshirts, cafepress does a lot of tshirt printing (and other items) for anyone who has a design. I figured it was a good deal considering all I've been doing at other "faucets".

someone bought you sig-line?
wow thats new to me.... always a way to make some money with bitcoins i guess Smiley

- bitcoinspot.nl - Alles over bitcoin! -
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 14, 2013, 01:09:33 AM
 #15

Yeah. If you send me a whole 1.0 BTC, I will put your link in my sig line for an entire year. I post every day or every few days. So you will get at least 365 exposures or more. PM me for an address if you're interested. hehe.

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!