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!
Download!
Download this amazing program by going to http://josh0n.weebly.com/batch.html and getting SDraw.
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!
----
CREATING IMAGES
----
Draw images using the image editor tool, or you can type
E.X:
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:
00EEE00
0E000E0
0E000E0
0E000E0
00EEE00
E is a light yellow, 0 is a black.
Can you guess what it'd draw:
----
DRAWING IMAGES
----
Type "sdraw /img x y imgname" to draw an image at x, y
E.X.
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
Y*01234567890
0
a1
x2
i3
s4
5
6
7
8
9
10
----
GETTING MOUSE
----
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
E.X.
EXAMPLE CODE:
sdraw /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:
::READ CODE
::make sure you have already "setlocal enabledelayedexpansion" , else, uncomment this next line of code
::setlocal enabledelayedexpansion
set c=0
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!
----