Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
78 user(s) are online (59 user(s) are browsing Forums)

Members: 1
Guests: 77

PEB, more...
Support us!
Recent OS4 Files
OS4Depot.net





Useful DOS scripts for OS4
Just can't stay away
Joined:
2006/11/24 18:52
From Gloucestershire, UK.
Posts: 1171
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>
   Report Go to top

Re: Useful DOS scripts for OS4
Just popping in
Joined:
2006/11/29 6:42
From Geneva CH
Posts: 227
@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
**************************

   Report Go to top

Re: Useful DOS scripts for OS4
Just can't stay away
Joined:
2006/11/24 18:52
From Gloucestershire, UK.
Posts: 1171
@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>
   Report Go to top

Re: Useful DOS scripts for OS4
Not too shy to talk
Joined:
2006/11/27 18:02
From Somerset, UK
Posts: 353
@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 & X5000
   Report Go to top

Re: Useful DOS scripts for OS4
Just can't stay away
Joined:
2006/11/24 18:52
From Gloucestershire, UK.
Posts: 1171
@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>
   Report Go to top

Re: Useful DOS scripts for OS4
Not too shy to talk
Joined:
2006/11/27 18:02
From Somerset, UK
Posts: 353
@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 & X5000
   Report Go to top

Re: Useful DOS scripts for OS4
Just can't stay away
Joined:
2006/12/9 10:44
From Lyon, France
Posts: 1337
@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
   Report Go to top

Re: Useful DOS scripts for OS4
Just popping in
Joined:
2006/11/29 6:42
From Geneva CH
Posts: 227
@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

   Report Go to top

Re: Useful DOS scripts for OS4
Not too shy to talk
Joined:
2006/12/3 12:02
From Beside the "Father of Waters", the Mississippi, in St. Louis, Missouri, USA
Posts: 272
@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
   Report Go to top

Re: Useful DOS scripts for OS4
Just can't stay away
Joined:
2006/12/6 21:18
From Michigan
Posts: 1027
@Severin

Goes into infinite loop here via 'workbench execute'?

   Report Go to top

Re: Useful DOS scripts for OS4
Just can't stay away
Joined:
2006/11/24 18:52
From Gloucestershire, UK.
Posts: 1171
@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>
   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project