forked from Byaidu/image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.bat
48 lines (44 loc) · 989 Bytes
/
window.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
set image=size cmd
if "%image%"=="size cmd" "%~dp0cmd.exe" /c "%~f0"&goto:eof
setlocal EnableDelayedExpansion
set image=buffer box 300 240 0 0 255
set image=load bg window.png
set image=[cmd] draw bg 0 0
set image=[box] draw bg 0 0
pause
set image=show box /T testing /I FreeArc.ico
pause
set image=[box] draw bg 100 100 alpha 64
pause
set image=resize box 600 480
rem set image=hide cmd
set image=target box
set image=pen 0 255 0
set image=brush -1
set box.wm=
set x=0
set y=0
:loop
set image=getmsg box box.wm
if not "!box.wm!"==" " (
for %%a in (!box.wm!) do (
ECHO %%a
for /f "tokens=1,2,3 delims=." %%b in ("%%a") do (
if "%%b"=="MouseMove" (
set image=line !x! !y! %%c %%d
set x=%%c
set y=%%d
)
if "%%b"=="MouseDown" (
if "%%c"=="Left" set image=pen 0 0 255
if "%%c"=="Right" set image=pen 255 0 0
)
if "%%b"=="MouseUp" set image=pen 0 255 0
if "%%b"=="Close" pause&goto :eof
)
)
)
::»º½âCPU
set image=sleep 16
goto loop