scrshoot: less options

git-svn-id: svn://kolibrios.org@7832 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-04-28 14:50:37 +00:00
parent 3805e04938
commit 0c92eb0b2e
4 changed files with 31 additions and 94 deletions

View File

@ -6,9 +6,7 @@ pusha
cmp byte [fname_buf],0 cmp byte [fname_buf],0
je .no_file_name je .no_file_name
mov edi,sign_n_input mov [sign_n],4
call zstr_to_int
mov [sign_n],al
; ŁĽ­Ľŕ¨ŕ㼏 ¨Źď ä ŠŤ  ; ŁĽ­Ľŕ¨ŕ㼏 ¨Źď ä ŠŤ 
xor eax,eax xor eax,eax

View File

@ -20,7 +20,7 @@
format binary as "" format binary as ""
title equ 'Screenshooter v 1.2' ; ‡ £®«®¢®ª ®ª­  title equ 'Screenshooter v1.21' ; ‡ £®«®¢®ª ®ª­ 
include '../../develop/libraries/box_lib/load_lib.mac' include '../../develop/libraries/box_lib/load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../config.inc' ;for nightbuild include '../../config.inc' ;for nightbuild
@ -153,7 +153,6 @@ red:
and [ch2.flags],dword 0 and [ch2.flags],dword 0
or [ch5.flags],dword 1 or [ch5.flags],dword 1
and [ch3.flags],dword 0
mov [OpenDialog_data.draw_window],dword draw_window_direct mov [OpenDialog_data.draw_window],dword draw_window_direct
call shoot call shoot
@ -201,7 +200,6 @@ key:
; stdcall [edit_box_key], edit1 ; stdcall [edit_box_key], edit1
stdcall [edit_box_key], edit2 stdcall [edit_box_key], edit2
stdcall [edit_box_key], edit3 stdcall [edit_box_key], edit3
stdcall [edit_box_key], edit4
jmp still jmp still
button: button:
@ -218,7 +216,6 @@ mouse:
; stdcall [edit_box_mouse], edit1 ; stdcall [edit_box_mouse], edit1
stdcall [edit_box_mouse], edit2 stdcall [edit_box_mouse], edit2
stdcall [edit_box_mouse], edit3 stdcall [edit_box_mouse], edit3
stdcall [edit_box_mouse], edit4
;---------------------------------- ;----------------------------------
checkboxes_mouse2 check_boxes,check_boxes_end checkboxes_mouse2 check_boxes,check_boxes_end
;----------------------------------- ;-----------------------------------
@ -283,24 +280,14 @@ start_draw_window ;
mcall SF_CREATE_WINDOW, 100*65536+320 mcall SF_CREATE_WINDOW, 100*65536+320
; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­® ; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­®
mov ebx,4 shl 16
movsx ecx,word [scr.width] ; è¨à¨­  íªà ­  movsx ecx,word [scr.width] ; è¨à¨­  íªà ­ 
mov edx,95 shl 16 mcall SF_DRAW_NUMBER, <4,0>, , <188,[label1.top]>, [sc.work_text]
mov dx,[label1.top]
push dx
mov esi,[sc.work_text]
mcall SF_DRAW_NUMBER
movsx ecx,word [scr.height] ; ¢ëá®â  íªà ­  movsx ecx,word [scr.height] ; ¢ëá®â  íªà ­ 
mov dx,[label2.top] add edx, 37 shl 16
mcall mcall
add edx, 36 shl 16
mov ebx,2 shl 16 mov ebx,2 shl 16
movsx ecx,word [scr.bitspp] ; ¡¨â ­  ¯¨ªá¥«ì movsx ecx,word [scr.bitspp] ; ¡¨â ­  ¯¨ªá¥«ì
mov edx,240 shl 16
pop dx
mcall
mov ebx,6 shl 16
mov ecx,[scr.bytesps] ; ¡ ©â ­  áâபã
mov dx,[label2.top]
mcall mcall
call draw_number ; ¯à®à¨á®¢ë¢ ¥¬ ­®¬¥à á­¨¬ª  call draw_number ; ¯à®à¨á®¢ë¢ ¥¬ ­®¬¥à á­¨¬ª 
@ -311,7 +298,6 @@ start_draw_window ;
; stdcall [edit_box_draw], edit1 ; stdcall [edit_box_draw], edit1
stdcall [edit_box_draw], edit2 stdcall [edit_box_draw], edit2
stdcall [edit_box_draw], edit3 stdcall [edit_box_draw], edit3
stdcall [edit_box_draw], edit4
;------ end check all editbox ------- ;------ end check all editbox -------
call draw_PathShow call draw_PathShow
@ -368,7 +354,6 @@ shoot:
jnc @f jnc @f
ret ret
@@: @@:
bt dword [ch2.flags],1 ; ¯®ª § âì ®ª­® ¯à¥¤¯à®á¬®âà  ? bt dword [ch2.flags],1 ; ¯®ª § âì ®ª­® ¯à¥¤¯à®á¬®âà  ?
jnc @f jnc @f
cmp [PrintScreen],0 cmp [PrintScreen],0
@ -388,19 +373,9 @@ shoot:
.1: .1:
; prepare for PathShow ; prepare for PathShow
stdcall [PathShow_prepare], PathShow_data_1 stdcall [PathShow_prepare], PathShow_data_1
call [OpenDialog_data.draw_window] call [OpenDialog_data.draw_window]
call save_file call save_file
@@: @@:
bt word [ch3.flags],1 ; ¢®ááâ ­®¢¨âì ®ª­® ?
jnc @f
delay 100
mov ecx,[slot_n]
activ_window
@@:
ret ret
;--- ¯®«ãç¨âì ¯ ¬ïâì ¤«ï á­¨¬ª  --- ;--- ¯®«ãç¨âì ¯ ¬ïâì ¤«ï á­¨¬ª  ---
@ -449,9 +424,7 @@ ret
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪ã饣® ­®¬¥à  --- ;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪ã饣® ­®¬¥à  ---
draw_number: draw_number:
mov edi,sign_n_input mov [sign_n],4
call zstr_to_int
mov [sign_n],al
mov cx,[label9.top] mov cx,[label9.top]
shl ecx,16 shl ecx,16
mov cx,10 mov cx,10
@ -625,16 +598,9 @@ grab_text:
db title,0 db title,0
labels: labels:
label1 label 5,5,0,text.1 ; è¨à¨­  íªà ­  label1 label 5,8,0,text.1 ; screen size and color depth
label2 label 5,15,0,text.2 ; ¢ëá®â  íªà ­ 
label3 label 5,25,0,text.3 ; ¢¢¥¤¨â¥ ¨¬ï ä ©«  label3 label 5,25,0,text.3 ; ¢¢¥¤¨â¥ ¨¬ï ä ©« 
label4 label 150,5,0,text.4 ; ¡¨â ­  ¯¨ªá¥«ì
label5 label 150,15,0,text.5 ; ¡ ©â ­  áâபã
label6 label 115,138,0,text.6 ; 100 = 1 ᥪ.
;label7 label 10,190,0,text.7
;label8 label 10,225,0,text.8
label9 label 5,52,0,text.9 ; ­®¬¥à ⥪ã饣® ᨬª  label9 label 5,52,0,text.9 ; ­®¬¥à ⥪ã饣® ᨬª 
label10 label 5,185,0,text.10
status label 5,201,0,no_shoot status label 5,201,0,no_shoot
labels_end: labels_end:
@ -654,48 +620,39 @@ end_l_libs:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
editboxes: editboxes:
;edit1 edit_box 300,5,35,cl_white,0,0,0,0,300,ed_buffer.1,mouse_dd,ed_focus,10,10 ; ¯ãâì ª ä ©«ã ;edit1 edit_box 300,5,35,cl_white,0,0,0,0,300,ed_buffer.1,mouse_dd,ed_focus,10,10 ; ¯ãâì ª ä ©«ã
edit2 edit_box 35,75,134,cl_white,0,0,0,0,9,ed_buffer.2,mouse_dd,ed_figure_only,3,3 ; § ¤¥à¦ª  edit2 edit_box 35,170,134,cl_white,0,0,0,0,9,ed_buffer.2,mouse_dd,ed_figure_only,3,3 ; § ¤¥à¦ª 
edit3 edit_box 35,165,164,cl_white,0,0,0,0,9,ed_buffer.3,mouse_dd,ed_figure_only ;  ¢â®­ã¬¥à æ¨ï edit3 edit_box 35,165,164,cl_white,0,0,0,0,9,ed_buffer.3,mouse_dd,ed_figure_only ;  ¢â®­ã¬¥à æ¨ï
edit4 edit_box 16,165,181,cl_white,0,0,0,0,1,sign_n_input,mouse_dd,ed_figure_only,1
editboxes_end: editboxes_end:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
buttons: buttons:
but1 txt_button 150,5,15,65,2,0,0,but_text.1,one_shoot ; ᤥ« âì á­¨¬®ª but1 txt_button 150,5,15,65,2,0,0,but_text.1,one_shoot ; ᤥ« âì á­¨¬®ª
but2 txt_button 145,160,15,65,3,0,0,but_text.2,save_shoot ; á®åà ­¨âì á­¨¬®ª but2 txt_button 34,274,15,34,3,0,0,but_text.2,save_shoot ; "..." - ¢ë¡à âì ¯ãâì á®åà ­¥­¨ï
but3 txt_button 140,115,12,120,4,0,0,but_text.3,show_scr_window ; ¯®ª § âì á­¨¬®ª but3 txt_button 145,160,15,65,3,0,0,but_text.3,show_scr_window ; ¯®ª § âì á­¨¬®ª
but4 txt_button 80,205,15,163,5,0,0,but_text.4,apply_number ; ¯à¨¬¥­¨âì ­®¬¥à but4 txt_button 80,205,15,163,5,0,0,but_text.4,apply_number ; ¯à¨¬¥­¨âì ­®¬¥à
but5 txt_button 150,5,15,85,6,0,0,but_text.5,start_autoshoot ; ­ ç âì  ¢â®áêñ¬ªã but5 txt_button 150,5,15,85,6,0,0,but_text.5,start_autoshoot ; ­ ç âì  ¢â®áêñ¬ªã
but6 txt_button 145,160,15,85,7,0,0,but_text.6,stop_autoshoot ; ®áâ ­®¢¨âì  ¢â®áêñ¬ªã but6 txt_button 145,160,15,85,7,0,0,but_text.6,stop_autoshoot ; ®áâ ­®¢¨âì  ¢â®áêñ¬ªã
but7 txt_button 40,205,10,150,8,0,0,but_text.7,show_set_rect_window ; § ¤ âì ®¡« áâì but7 txt_button 40,70,10,180,8,0,0,but_text.7,show_set_rect_window ; § ¤ âì ®¡« áâì
buttons_end: buttons_end:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
check_boxes: check_boxes:
ch1 check_box2 (5 shl 16+11),(105 shl 16 +11),5,cl_white,0,0x80000000,ch_text.1,ch_flag_en+ch_flag_middle ; ᢥà­ãâì ®ª­® ch1 check_box2 (5 shl 16+11),(105 shl 16 +11),5,cl_white,0,0x80000000,ch_text.1,ch_flag_en+ch_flag_middle ; ᢥà­ãâì ®ª­®
ch2 check_box2 (5 shl 16+11),(120 shl 16 +11),5,cl_white,0,0x80000000,ch_text.2,ch_flag_en+ch_flag_middle ; § â¥¬ ᤥ« âì  ªâ¨¢­ë¬ ch2 check_box2 (5 shl 16+11),(120 shl 16 +11),5,cl_white,0,0x80000000,ch_text.2,ch_flag_en+ch_flag_middle ; show screenshot
ch3 check_box2 (1455 shl 16+11),(105 shl 16 +11),5,cl_white,0,0x80000000,ch_text.3,ch_flag_en+ch_flag_middle ; ¯®ª § âì á­¨¬®ª
ch4 check_box2 (5 shl 16+11),(135 shl 16 +11),5,cl_white,0,0x80000000,ch_text.4,ch_flag_en+ch_flag_middle ; § ¤¥à¦ª  ch4 check_box2 (5 shl 16+11),(135 shl 16 +11),5,cl_white,0,0x80000000,ch_text.4,ch_flag_en+ch_flag_middle ; § ¤¥à¦ª 
ch5 check_box2 (5 shl 16+11),(150 shl 16 +11),5,cl_white,0,0x80000000,ch_text.5,ch_flag_en+ch_flag_middle ch5 check_box2 (5 shl 16+11),(150 shl 16 +11),5,cl_white,0,0x80000000,ch_text.5,ch_flag_en+ch_flag_middle
ch6 check_box2 (5 shl 16+11),(165 shl 16 +11),5,cl_white,0,0x80000000,ch_text.6,ch_flag_en+ch_flag_middle ch6 check_box2 (5 shl 16+11),(165 shl 16 +11),5,cl_white,0,0x80000000,ch_text.6,ch_flag_en+ch_flag_middle
use_rect check_box2 (145 shl 16+11),(150 shl 16 +11),5,cl_white,0,0x80000000,ch_text.7,ch_flag_middle ; ¨á¯. ®¡« áâì use_rect check_box2 (5 shl 16+11),(180 shl 16 +11),5,cl_white,0,0x80000000,ch_text.7,ch_flag_middle ; ¨á¯. ®¡« áâì
;  ¢â®­ã¬¥à æ¨ï ;  ¢â®­ã¬¥à æ¨ï
check_boxes_end: check_boxes_end:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
if lang eq ru if lang eq ru
text: text:
.2 db '‚ëá®â  íªà ­ :',0 .1 db '<27> §¬¥à íªà ­  ¨ £«ã¡¨­  梥â : å å bit',0
.1 db '˜¨à¨­  íªà ­ :',0 .3 db '<27>ãâì ¤«ï á®åà ­¥­¨ï á­¨¬ª :',0
.3 db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã:',0
.4 db '<27>¨â ­  ¯¨ªá¥«ì:',0
.5 db '<27> ©â ­  áâபã:',0
.6 db '100 = 1 ᥪ㭤 ',0
;.7: db '‚¢¥¤¨â¥ ¨¬ï ä ©« :',0
;.8: db '‚¬¥áâ® "*" ¢ ¨¬¥­¨ ä ©«  ¡ã¤¥â ¢áâ ¢«ïâìáï ­®¬¥à.',0
.9 db '<27>®¬¥à ⥪ã饣® á­¨¬ª :',0 .9 db '<27>®¬¥à ⥪ã饣® á­¨¬ª :',0
.10 db 'Š®«¨ç¥á⢮ §­ ª®¢ ¢ ­®¬¥à¥:',0
but_text: but_text:
.1 db '‘¤¥« âì á­¨¬®ª íªà ­ ',0 .1 db '‘¤¥« âì á­¨¬®ª íªà ­ ',0
.2 db '‘®åà ­¨âì á­¨¬®ª íªà ­ ',0 .2 db '...',0
.3 db '<27>®ª § âì á­¨¬®ª ᥩç á',0 .3 db '<27>®ª § âì á­¨¬®ª ᥩç á',0
.4 db '<27>ਬ¥­¨âì',0 .4 db '<27>ਬ¥­¨âì',0
.5 db '<27> ç âì  ¢â®áꥬªã',0 .5 db '<27> ç âì  ¢â®áꥬªã',0
@ -705,8 +662,7 @@ but_text:
ch_text: ch_text:
.1 db '‘¢¥à­ãâì ®ª­®',0 .1 db '‘¢¥à­ãâì ®ª­®',0
.2 db '<27>®ª § âì á­¨¬®ª',0 .2 db '<27>®ª § âì á­¨¬®ª',0
.3 db '§ â¥¬ ᤥ« âì  ªâ¨¢­ë¬',0 .4 db '‡ ¤¥à¦ª  ¢ ¬¨««¨á¥ªã­¤ å:',0
.4 db '‡ ¤¥à¦ª :',0
.5 db '€¢â®á®åà ­¥­¨¥',0 .5 db '€¢â®á®åà ­¥­¨¥',0
.6 db '€¢â®­ã¬¥à æ¨ï, ­ ç¨­ ï á',0 .6 db '€¢â®­ã¬¥à æ¨ï, ­ ç¨­ ï á',0
.7 db 'Ž¡« áâì',0 .7 db 'Ž¡« áâì',0
@ -722,24 +678,18 @@ disk_filled db '
bad_fat_table db '’ ¡«¨æ  FAT à §àã襭 ',0 bad_fat_table db '’ ¡«¨æ  FAT à §àã襭 ',0
ac_den db '„®áâ㯠§ ¯à¥é¥­',0 ac_den db '„®áâ㯠§ ¯à¥é¥­',0
device_er db 'Žè¨¡ª  ãáâனá⢠',0 device_er db 'Žè¨¡ª  ãáâனá⢠',0
not_shooted db '‘¤¥« ©â¥ á­¨¬®ª !!!',0 not_shooted db 'Žè¨¡ª : ¢­ ç «¥ ᤥ« ©â¥ á­¨¬®ª',0
no_file_name db '‚¢¥¤¨â¥ ¨¬ï ä ©«  !!!',0 no_file_name db 'Žè¨¡ª : á«¥¤ã¥â ¢¢¥á⨠¨¬ï ä ©« ',0
invalid_rect db '<27>¥¤®¯ãáâ¨¬ë¥ à §¬¥àë ®¡« áâ¨',0 invalid_rect db '<27>¥¤®¯ãáâ¨¬ë¥ à §¬¥àë ®¡« áâ¨',0
keyforexit db '<27>â® ¢ è á­¨¬®ª. ‚ë室 - «î¡ ï ª« ¢¨è .',0 keyforexit db '<27>â® ¢ è á­¨¬®ª. ‚ë室 - «î¡ ï ª« ¢¨è .',0
else else
text: text:
.2 db 'Screen width:',0 .1 db '<27> §¬¥à íªà ­  ¨ £«ã¡¨­  梥â : å å ¡¨â',0
.1 db 'Screen height:',0 .1 db 'Screen size and color depth: å å bit',0
.3 db 'Enter full path to the file:',0 .3 db 'Screenshot save path:',0
.4 db 'Bits per pixel:',0
.5 db 'Bytes per line:',0
.6 db '100 = 1 second',0
;.7: db 'Enter name of file:',0
;.8: db 'Instead of "*" in filename the number will be included.',0
.9 db 'Current photo number:',0 .9 db 'Current photo number:',0
.10 db 'Amount of digits in number:',0
but_text: but_text:
.1 db 'Make screen photo',0 .1 db 'Make screen photo',0
@ -753,8 +703,7 @@ but_text:
ch_text: ch_text:
.1 db 'Minimize window',0 .1 db 'Minimize window',0
.2 db 'Show photo',0 .2 db 'Show photo',0
.3 db 'then make active',0 .4 db 'Delay in milliseconds:',0
.4 db 'Delay:',0
.5 db 'Autosave',0 .5 db 'Autosave',0
.6 db 'Start numeration from',0 .6 db 'Start numeration from',0
.7 db 'Area',0 .7 db 'Area',0
@ -770,8 +719,8 @@ disk_filled db 'Disk is full',0
bad_fat_table db 'FAT table destroyed',0 bad_fat_table db 'FAT table destroyed',0
ac_den db 'Access denied',0 ac_den db 'Access denied',0
device_er db 'Device error',0 device_er db 'Device error',0
not_shooted db 'Make a photo !!!',0 not_shooted db 'Error: you need to make a photo first',0
no_file_name db 'Enter file name !!!',0 no_file_name db 'Please, enter file name.',0
invalid_rect db 'Wrong area size',0 invalid_rect db 'Wrong area size',0
keyforexit db 'This is your screenshot. Press any key.',0 keyforexit db 'This is your screenshot. Press any key.',0
@ -836,8 +785,6 @@ db 0
start_temp_file_name: db '1.png',0 start_temp_file_name: db '1.png',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
sign_n_input:
db '2',0
PrintScreen db 0 PrintScreen db 0
autoshoot_flag db 0 autoshoot_flag db 0

View File

@ -38,16 +38,7 @@ scr_window:
stop_draw_window stop_draw_window
ret ret
.close: .close:
bt word [ch3.flags],1 ; 「ョ矣笄ュョ「ィ粮 ョェュョ ? mcall 60,2,[app.pid],messages.act_window,2
jnc @f
mov eax,60
mov ebx,2
mov ecx,[app.pid]
mov edx,messages.act_window
mov esi,2
mcall
@@:
jmp close jmp close
.label label 20,20,0x80000000,keyforexit .label label 20,20,0x80000000,keyforexit

View File

@ -400,6 +400,7 @@ draw_messages:
draw_log_area: draw_log_area:
DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph] DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph]
mcall 13, <6,WIN_W-13>, <LOG_Y+1,LOG_H-1>, 0xFFFfff mcall 13, <6,WIN_W-13>, <LOG_Y+1,LOG_H-1>, 0xFFFfff
DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph]
ret ret
;********************************************************************* ;*********************************************************************
draw_window: draw_window: