Intro: SDraw - Batch .EXE
Ever wanted to draw a cool picture in batch? Or get the mouse X and mouse Y when the user clicks? Do not fear! SDraw is here! using SDraw will allow you to do all of the questions I asked!
Step 1: Download!
Download this amazing program by going to http://josh0n.weebly.com/batch.html and getting SDraw.
Step 2: Looking at the Stuff
Inside of the SDraw folder, you will have an example folder and "SDraw Programs". The example folder is a batch file, that uses SDraw to draw a pretty picture and get the mouse X and Y.
The SDraw programs is the folder that contains SDraw itself, and has the SDraw Image Creator, so you can easily create images without typing anything.
Also, there is a readme. This is important to read if you're not watching the video.
Thanks for looking at this instructable! Have a wonderful day using SDraw!
EASY IMAGE CREATION
Use SDraw Image Creator to easily create images!
Just click on a color in the second row
and draw somewhere in the console!
Then click the save button and it's saved as "pic.txt"
Easy as pie!
Draw images using the image editor tool, or you can type
if you type "color /?" into the color it gives you some numbers and letters meaning a color
such as how you do "color 0a", black background light green foreground
so draw an image with the color you want to show:
E is a light yellow, 0 is a black.
Can you guess what it'd draw:
Type "sdraw /img x y imgname" to draw an image at x, y
Lets say we used the image above.
we saved the image as "face.txt" and we want to draw it at 0, 0
sdraw 0 0 face.txt
then the program would draw it.
NOTE: if you don't understand console X and Y,
*X axis 1
the other useful thing about SDraw is how you can get the mouse
using "sdraw /click" you can get the user to click
then "sdraw /click x" grabs the x of the click
"sdraw /click y" grabs the y of the click
sdraw /click x
echo X: %errorlevel%
sdraw /click y
echo Y: %errorlevel%
NOTICE: sometimes this method of getting x and y is not always reliable. You'll need
to read from the "mouse.txt" file yourself to correctly get the X and Y.
Some code reading the file:
::make sure you have already "setlocal enabledelayedexpansion" , else, uncomment this next line of code
for /f "delims=~" %%A in (mouse.txt) do (
if "!c!" == "0" set x=%%A
if "!c!" == "1" set y=%%A
set /a c=!c!+1
echo X: !x! Y: !y!