Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
49 user(s) are online (43 user(s) are browsing Forums)

Members: 1
Guests: 48

flash, more...

Support us!

Headlines

 
  Register To Post  

Useful DOS scripts for OS4
Just can't stay away
Just can't stay away


See User information
I thought I'd start this thread so people can post their DOS scripts here.

Please only post working scripts and a short description of what they do and how to use them.

This one does a complete flush and reports the totals at the end

usage: cut'n'paste it in notepad, save it as c:fullflush, open a shell and 'protect c:fullflush +s' then just enter 'fullflush' to run it...

-------------------------------------------------
echo Flushing...
set original `avail virtual`
lab loop
        set before 
`avail virtual`
        
set after `avail virtual flush`
        
set freed `eval $after - $before / 1024`
        echo 
Flushed$freed kb.
        if 
$freed EQ 0
                skip done
        
endif
skip loop back

lab done
echo ""
echo Free ram before flush: `eval $original / 1024kb.
echo 
Free Ram after flush: `eval $after / 1024kb.
set freed `eval $after - $original / 1024`
echo 
ram freed$freed kb.
unset 
original
unset before
unset after
unset freed

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: Useful DOS scripts for OS4
Just popping in
Just popping in


See User information
@Severin

here a small primitive script I did to allow me to sleep a few minutes and wake up with the music I choose. You should edit the path to Amigaamp or choose another player if you want !

Have fun

Luca

************************
REQUESTSTRING Wake_UP How_long_do_you_want_to_sleep?: >ENV:n
REQUESTFILE TITLE="Choose your music" >ENV:m
IF $n EQ ""
QUIT
ELSE
WAIT min=$n
YOURPATH:amigaamp/amigaamp $m
ENDIF
**************************

Go to top
Re: Useful DOS scripts for OS4
Just can't stay away
Just can't stay away


See User information
@Ricossa

hmmm... redirecting output to env is a bit naughty, you could use
setenv n `requeststring <blah> <blah>`

or
requeststring <blah> <blahTO env:n

I prefer to use the set, get & unset commands as they just store variables in memory instead of using a device. ie.
set n `REQUESTSTRING "Wake Up" "How many minutes do you want to sleep?"`
IF 
$n EQ ""
 
QUIT
ELSE
 
set m `REQUESTFILE TITLE="Choose your music"`
 
WAIT min $n
 YOURPATH
:amigaamp/amigaamp $m
ENDIF
unset 
n
unset m

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: Useful DOS scripts for OS4
Not too shy to talk
Not too shy to talk


See User information
@Severin

how about

[joke]
delete sys:kickstart#? all force
reboot
[/joke]

While you shouldn't perform the above, and can be seen as humourous, it does highlight how powerful dos is and how easily a naughty script could render an os4 machine non bootable.

A1XE, A1200T, X1000, X5020, CDTV, CD32 , A500+ A500
OS4.1b / OS3.2b
Go to top
Re: Useful DOS scripts for OS4
Just can't stay away
Just can't stay away


See User information
@Jurassicc

at least get it right...

[joke]
delete sys:kickstart/#? all force
reboot
[/joke]


Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: Useful DOS scripts for OS4
Not too shy to talk
Not too shy to talk


See User information
@Severin

swings and roundabouts if your getting rid of the kmods might as well get rid of the directory at the same time.

A1XE, A1200T, X1000, X5020, CDTV, CD32 , A500+ A500
OS4.1b / OS3.2b
Go to top
Re: Useful DOS scripts for OS4
Just can't stay away
Just can't stay away


See User information
@Severin

Quote:

hmmm... redirecting output to env is a bit naughty, you could use
setenv n `requeststring <blah> <blah>`


It is not only naughty but it is forbidden. setenv must be used.

@Jurassicc

delete sys:kickstart/kicklayout is enough

Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Useful DOS scripts for OS4
Just popping in
Just popping in


See User information
@Severin

Thank you for your suggestions... as I said, I am an eternal newbie

Now another script. You know that the latest Pagestream for OS4 PPC can only print to postscript. What if you don't have it ? Print to a file into RAM, name it out.ps and run my script, then print with AmiPDF. I know, Pagestream can export directly into PDF, but if you go through PDF, it gives better results. You can use the Acrobat.Distiller PPD that comes with Pagestream.

**************************

stack 200000
ghostscript:gs -q -dNOPAUSE -sDEVICE=pdfwrite -r360x360 -sOutputFile=ram:pgs.pdf ram:out.ps -c quit
requestchoice "PDF" "Document ready" "OK" >NIL:

**************************

Luca

Go to top
Re: Useful DOS scripts for OS4
Not too shy to talk
Not too shy to talk


See User information
@Severin

Is ps2pdf available for OS4?

if so, then someone could do an alias something like:

Quote:

alias mkpdf "ps2pdf -dEmbedAllFonts=true -dUseFlateCompression=true -sPAPERSIZE=Letter"


Of course you would modify the PAPERSIZE option to fit your own paper, and the syntax to work with OS4's terminal/shell.

I use it on my Ubuntu machine to make PDFs of my writings because I have niggling problems with OpenOffice2's PDF export function (it won't include characters entered through the insert character dialog in the PDF output, but it will include them in the postscript output; go figure).

I used to have a DOS script that I used to back up my A1200 when it was still working. It copied everything over to a special partition that I used to burn CD-R back ups. Worked a treat, but obviously, I don't have that close at hand right now.

For those who are brave enough to want to know me better, visit
my Home Page, my Storefront, and blogsey
Go to top
Re: Useful DOS scripts for OS4
Just can't stay away
Just can't stay away


See User information
@Severin

Goes into infinite loop here via 'workbench execute'?

Go to top
Re: Useful DOS scripts for OS4
Just can't stay away
Just can't stay away


See User information
@Snuffy

yeah, I've had that happen once, seems to be 32k here so replace:

if $freed EQ 0

with

if $freed NOT GE 33

BTW: Woohoo 100th post...

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project