AminetAminet
Search:
84510 packages online
About
Recent
Browse
Search
Upload
Setup
Services

comm/misc/FSwatcher.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:A transfer gauge for downloading a file
Author:Thomas at Igracki.de
Uploader:Thomas Igracki de
Type:comm/misc
Version:1.4
Requires:MUI, Textinput.mcc
Architecture:m68k-amigaos
Date:2002-05-24
Download:http://aminet.net/comm/misc/FSwatcher.lha - View contents
Readme:http://aminet.net/comm/misc/FSwatcher.readme
Downloads:521

   / FSwatcher - FileSizeWatcher /
   ==============================

What for is it?
  If you download a file with a program which doesn't have a transfer-
  window showing the current filesize, bps, time togo etc. you should
  try FSwatcher.


Detailed description:
---------------------
It opens a small window where you have to specify the filename
and the filesize.
Then press "Start" and the window changes to the gauge, where
the current size in bytes, the bytes transfered per second, the
time since the file was created and the approx. time it takes
to transfer the whole file.
Under the gauge is also a percentage scale.

You can also drop a file from a workbench window or dopus lister
anywhere into the window to specify the filename.
If the comment of the filename is set to a number, it will be used
as the total filesize (in bytes).
Also if you press the "Start!" button without specifying a filesize
(-> the "Size:" gadgets contents is "0"), the filesize is read from
the comment of the file.

Or you specify the filename and the filesize (if the filename didn't
have its comment set to the filesize) at startup.

The values are updated every 3 seconds.

When the transfer it finished a requester pops up, saying its
finished;-) You can disable the requester by setting the shell
argument AUTOEXIT to ON or YES at startup, the program then quits
automatically after a download is finished.

New in v1.3:
============
Since v1.3, you can set the environment variable "FSwatcher" to your
default args! Just like as you have typed them on the commandline!
For example: SetEnv SAVE FSwatcher "BPSBar ON"
To implement this I had to change the AUTOEXIT/S arg to a /T arg.
This means you have to put a "ON" or "YES" after the arg to activate
it and a "OFF" or "NO" to deactivate an argument!

If you have used programs which used the AUTOEXIT arg, you can patch
them by replacing "AUTOEXIT" with "EXIT YES" or wait for an update
of the program;-)


New in v1.4:
============
There is now a button called "!" at the right of the filesize gauge.
If you press this button a script (defaults to s:FSwatcher.bat) is
executed asynchronicly (sp?) with the currently used filename as an
argument.
The included script (s/FSwatcher.bat) supports playing of mp3 songs
(you have to have "mpega" in your search path) and mpg movies via
"frogger" (you have to have it in your search path, or edit the script).
This script makes use of the program MatchPattern which I have
included in this archive (c/MatchPattern).


Hint:
  You can click on the gauge to get back to the settings page of the
  window.

Hint #2:
  The values of the "Name" and "Size" Gadgets are saved after quiting the
  programm in the env and envarc.


Usage: Name=FileName,Size=FileSize/N,TimeOut/N,Delay=UpdateDelay/N,
       SM=SizeMode,Com=Command,ComCon=CommandConsole,
       BPSBar/T,EXIT=AUTOEXIT/T,QUIET/T

FileName, FileSize and AutoExit described above, now lets explain the
other:

  TimeOut/N: New in v1.3
     If a transfer is stalled (-> the "---" display) AND AUTOEXIT/T is
     set to ON, the window will close after 'TimeOut' seconds.
     Defaults to 10. You can use values from 0 to 30. 0 means, no timeout.

  Name=FileName:
     see above
     
  Size=FileSize/N:
     see above

  TimeOut/N:
     If a transfer is stalled (-> the "---" display) AND AUTOEXIT/T is
     used, the window will close after 'TimeOut' seconds.
     Defaults to 10. You can use values from 0 to 30. 0 means, no timeout.

  Delay=UpdateDelay/N: New in v1.3
     Update the display every x seconds. Defaults to 2.
     You can use values from 1 to 10.

  SM=SizeMode: New in v1.4
     It can be set to "KB" or "MB", to display the current size
     and the filesize in Kilobytes (divided by 1024!) or MegaBytes
     (divided by 1024*1024, with 3 numbers after the comma).
     If its set to a different string, "bytes" are used.

  Com=Command: New in v1.4
     This command will be executed if you press the "!" button!
     You can use it f.e. to play the currently downloading mp3 song!
     Default is "s:FSwatcher.bat".
     The 's' and/or 'x' bit have to be set, if the command is
     a shell-script!

  ComCon=CommandConsole: New in v1.4
     This is used to specify a console window where the output of
     the command is send to.
     Default: CON:210/400/500/120/FSwatcher action command/CLOSE
     If you don't want a window, use ComCon = NIL:.


  BPSBar/T: New in v1.3
     Should a small gauge showing the current bps relative to the
     max bps be displayed?

  EXIT=AUTOEXIT/T
     If means no finished-requester at the end and quit the program
     after the is download finished.
     EXIT YES

  QUIET/T [suggested by jah] New in v1.3
     Should ALL error requesters be suppressed?
     Well the "Dos.ReadArgs() failed!" isn't suppressed;-)


Contents of comm/misc/FSwatcher.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  251     260  96.5% -lh5- 7a03 Mar 15  1995 c/MatchPattern
[generic]                  780    1868  41.8% -lh5- adef May 20  2002 s/FSwatcher.bat
[generic]                11059   20164  54.8% -lh5- 470b May 20  2002 FSwatcher
[generic]                 1534    3440  44.6% -lh5- 7f04 May 20  2002 txt/FSwatcher.history
[generic]                 2104    4987  42.2% -lh5- 03c7 May 20  2002 txt/FSwatcher.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         5 files   15728   30719  51.2%            May 24  2002

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>