home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1997 #3
/
amigamamagazinepolishissue03-1
/
my_favourite
/
easy_tools
/
easytools
/
easygfx
< prev
next >
Wrap
Text File
|
1996-12-13
|
6KB
|
163 lines
/*
$VER: EASYgfx 1.0 (05.08.95) by David De Groot
This script works with 'gfx2ascii' in your c: dir
*/
signal on break_c
options failat 21
NL = '0a'x
bool = exists('libs:rexxreqtools.library')
if bool = 0 then say "You need RexxReqTools.library"
else call addlib('rexxreqtools.library',0,-30)
gcheck = exists('c:gfx2ascii')
if gcheck = 0
then do
call rtezrequest("GFX2ASCII is not in C:.",,
"Sorry!","ATTENTION!!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
exit
end
else
call rtezrequest("Do you want normal dithering" nl "or try the settings yourself?",,
" Normal!|Let's try... ","Info",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 1
then call def
else
again:
dither = rtgetstring("{#@08Oo+=-::..___}","Alter the default convertstring" nl,
"to your likings..." nl "" nl,
"(from left to right: dark -> light)" nl "" nl,
"Note that you can not use blanks!" nl,
"Keep the {} aswell!"," EASYgfx ",,
"Press <Return>",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0
then do
call rtezrequest("You should press the <Return> button" nl,
"on the keyboard for the full effect." nl,
"Please try again.",,
"I will!", "Info", 'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
signal again
end
filename = rtfilerequest('ram:',,"Pick a picture to convert:", ,,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0
then call rtezrequest("You picked no picture." nl,
"That ends this session I'm afraid!",,
"Ok!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
else do
width = rtgetlong("80","How many lines (width)" nl "" nl,
"Height will be calculated keeping" nl,
"the original aspect ratio of the" nl,
"text image's width.","Enter number:", ,,
'rt_reqpos=reqpos_centerscr rtgl_min = 1 rtgl_max = 512 rtez_flags=ezreqf_centertext')
if rtresult == 0
then call rtezrequest("You didn't specify the width." nl,
"That ends this session I'm afraid!",,
"Ok!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
else do
oname = rtgetstring(,"Enter a name for the ASCIIfile" nl,
"(File will be saved to Ram:)",
"","EASYgfx",,
"_Ok",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0
then call rtezrequest("You didn't specify a name." nl,
"That ends this session I'm afraid!",,
"Ok!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
else do
address command
'gfx2ascii ' || filename || ' -oRAM:' || oname || ' -w' || width || ' -d ' || dither || ''
say ""
say ""
say "
That's quick! :-) "
say "
"
end
end
end
exit
def:
filename = rtfilerequest('ram:',,"Pick a picture to convert:", ,,
'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0
then call rtezrequest("You picked no picture." nl,
"That ends this session I'm afraid!",,
"Ok!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
else do
width = rtgetlong("80","How many lines (width)" nl "" nl,
"Height will be calculated keeping" nl,
"the original aspect ratio of the" nl,
"text image's width.","Enter number:", ,,
'rt_reqpos=reqpos_centerscr rtgl_min = 1 rtgl_max = 512 rtez_flags=ezreqf_centertext')
if rtresult == 0
then call rtezrequest("You didn't specify the width." nl,
"That ends this session I'm afraid!",,
"Ok!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
else do
oname = rtgetstring(,"Enter a name for the ASCIIfile" nl,
"(File will be saved to Ram:)",
"","EASYgfx",,
"_Ok",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
if rtresult == 0
then call rtezrequest("You didn't specify a name." nl,
"That ends this session I'm afraid!",,
else do
address command
'gfx2ascii ' || filename || ' -oRAM:' || oname || ' -w' || width || ''
say ""
say ""
say "
That's quick! :-) "
say "
"
end
end
end
exit
break_c:
call rtezrequest("You entered a break." || NL ||,
"This quits EASYgfx...!",,
"Right!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
/* Futureplans: EXPAND! ;-) */