Short: A transfer gauge for downloading a file Author: Thomas@Igracki.de Uploader: Thomas Igracki de Type: comm/misc Version: 1.4 Requires: MUI, Textinput.mcc Architecture: m68k-amigaos / 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;-)