Author

Topic: [RELEASE] Middlecoin Balance Scraper for Windows (in PowerShell) (Read 3390 times)

jr. member
Activity: 51
Merit: 1
Is the ten-year project still alive?
full member
Activity: 125
Merit: 100
Quote
Reserved.

tired of this retarded shit
full member
Activity: 140
Merit: 100
Hi all,

Due to PowerShell being the scripting language I'm most familiar with (I'm a Windows guy, please don't shoot me!), I decided to write a PowerShell script that would parse your Middlecoin data and output your stats in a couple of ways:


All these can be turned on/off by specifying a 0 or 1 (1 = on).

It generates an output like so:

Code:
Middlecoin Info for: 112ChqhtNhSSYi3hBeNBW1bMkFD265Utcm
Accepted MH/s Last Hour: 2.7403
Immature Unexchanged Balance: 0.00387548
Unexchanged Balance: 0.01216673
Confirmed Balance: 0.01479748
Estimated Current Balance (to be paid): 0.03083969 ($24.36)
Total Paid Out: 0.06202011 ($49)

The default option is for the script to open the text file summary with your default text editor. If you have a usable SMTP server this is the file that will be emailed to you.

The NotifyMyAndroid notification looks like this:



Getting Started:

  • 1) If you've never run PowerShell on your computer before, you'll need to set the Execution Policy. Right click the shortcut to PowerShell and choose "Run as Administrator". Type Set-ExecutionPolicy -Unrestricted and confirm with a Y. This will allow scripts to run.
  • 2) Save the script somewhere on your computer, open it up and paste your bitcoin address into the line:
    Quote
    $bitcoinAddresses = ""
    Save the Script.
  • 3) Right click the script and choose "Run with PowerShell".

... and that should be it! You can run this on demand, or if you wish you can set the script to run as frequently as you want as a Scheduled Task.

NotifyMyAndroid configuration:


Scheduled Task Configuration:

  • Create a basic scheduled task.
  • For program specify powershell.exe
  • For arguments specify "& 'c:\path\to\Middlecoin-Balance-Scraper'"

A free account allows 5 notifications per day, whereas a premium account has a much higher limit and costs $4.99.

Whilst I'd have liked to have coded this for PS v3 and above (which has advantages for this kind of thing, especially if h20 provides more information in the .json output file he currently provides) I made sure that it was compatible with PowerShell v2 which many of you may still be running on your Windows systems. If you'd like to upgrade PowerShell and need advice please send me a PM although it's not necessary for this script to function.

I hope this helps people and I haven't missed any key information out. I'm more than happy to discuss adding additional features Smiley

Download:
http://theboywonder.co.uk/Middlecoin-Balance-Scraper.ps1

If you'd like to say thank you, you have my complete gratitude. My address is: 1Ji1qND7RCf6HvQ21dazNZuWwoe5zkmnmf
or:
Jump to: