ARexx Hdinfo.lzh?
7 messages in this thread
Ok, I downloaded the HDINFO.lzh script and guess what? I doesn't work!
Seems that the only info it shows is for dh0:. After playing with it for
untold hours, I came close. Here is my problem: is there any way to
suppress the newline generated by the 'say' command?? The string parsing
after the otherwise command was way off base. Seems that the word()
function doesn't separate words in a string properly. I had better results
with the substr() function, but the newline added to the 'say' command
makes the output ugly. Help!
Robert, have you tried opening '*' for output, and then 'WriteCh()'?
I guess this should work. Haven't tried it tho.
No I haven't tried using the WriteCh() function, but that looks like the
easiest way to go. I was looking for a quick & dirty solution, like a
simple option in the 'Say' command like 'Say/n' or something like that.
It's even easier than opening "*". Just use…
writech(stdout, whatever)
-larry
Thanks Larry. Have you tried HDINFO? I'm curious if anyone has gotten it to
work as advertised. Bob…
I took a quick look at it, Robert, but I didn't bother with it. Here's how
I would do it…
/* hdinfo.rexx */
address command 'info >ram:tempinfo'
disks = 'DH1: DH3: DH4: Work:' /* put your HD names here */
call open(infile,'ram:tempinfo')
say 'Mounted disks:'
do forever
line = readln(infile)
if word(line,1) = 'Volumes' then leave
if find( disks, word(line,1) ) > 0 then
say line
end
call close(infile)
address command del 'ram:tempinfo' quiet
Hope this works better for you.
-larry
Thanks Larry! I'll type it in and give it a try.