Click here for important information about

Batch with Clickable button

Toshiba Satellite l505d-s5965 notebook
March 31, 2010 at 03:22:18
Specs: Windows 7, 1024
i found this batch script but cant find it anymore what it was was a batch that allowed the user to double click a word, they use [close] and once that was click it would use a goto and close the batch.

was rather neat but can find it. does anyone know how reproduce that?

thank you

See More: Batch with Clickable button

March 31, 2010 at 07:46:35
Looks a bit like this, but then only with OK button instead of YES or NO


Report •

March 31, 2010 at 11:42:09
no, this was really clicking on the CMD windows no popups at all.

all i remember was there was a echoed [close] but has i think 3 lines of code then when you clicked on that word[close] it would GOTO and close.

Report •

March 31, 2010 at 20:20:52
It's possible, but not with batch alone.

I'm not sure if it can be achieved with something like a debug generated .com but there is a suite of plain dos utilities(that run a little on the slow side in windows) that do it and it's possible to use the windows api(see - ReadConsoleInput) in languages that can access it.

I actually wrote a whole program around ReadConsoleInput (link) and could probably knock together a utility(yes/no dialog box or something) if you want.

Report •

Related Solutions

March 31, 2010 at 21:18:30
hey, yes, i would very much be interested to see how they did it in shortcode! not being sarcastic, just curious as hell!
(Not that i'm big on combining gui with command-prompt, kinda defeats the whole point imo) just curious...

Report •

April 1, 2010 at 01:57:47

Yeah thats nice but what im talking about done in batch fully.

it was neat. ill keep look and if i find it ill post it here for you guys to look at.

Report •

April 1, 2010 at 03:07:11
I'm not sure how it's possible but I am very happy to be wrong.

My guess is a batch with embedded debug script but I couldn't find anything on the web...

Sorry I can't be anymore help than that.

Please don't forget to post it if you find it!

Report •

April 1, 2010 at 03:15:18
Found it.

@echo off&& set cx=0
mode con cols=80 lines=25
echo.&& echo.&& echo.&& echo.&& echo.&& echo [CLOSE]
if %cx%==1 (call:cmps) else (set cx=1)
goto :ini

echo.exit|cmd/K prompt $_a100$_mov ax,5$_int 33$_cmp ax,1$_jl 0100$_mov ax,3$_int 33$_$_g10D$_rdx$_$_rcx$_$_q>$
call:gtC_f 12&& set x=%reg:~3,4%
call:gtC_f 13&& set y=%reg:~3,4%
for /f "usebackq skip=%1 delims=" %%a in (`debug^<$^|find "0"`) do set reg=%%a&& goto:eof

for %%a in (A0 A8 B0 B8 C0 C8 D0 D8) do if %x%%y%==00%%a0028 exit

Report •

April 1, 2010 at 03:31:50
Yep it's got embedded debug ;)

Report •

April 1, 2010 at 03:38:36
do you think that could be used to create different buttons on one CMD screen and each button do a different function?

Report •

April 1, 2010 at 03:57:06
In theory you could do that but it won't work on 64bit windows, it sucks down heaps of cpu time(spin lock) and it will require anyone who uses it to turn quickedit off if it's enabled.

Report •

April 1, 2010 at 07:37:22
It looks cool ... but wouldn't it be easier to try the same in a C-compiler ?

Report •

Ask Question