home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Exec 5
/
CD_Magazyn_EXEC_nr_5.iso
/
Recent
/
biz
/
dopus
/
DOpusRxTrash.lha
/
Cestino.dopus5
next >
Wrap
Text File
|
2001-06-01
|
3KB
|
110 lines
/* Global trashcan for Directory Opus 5.60+
by Stefano Regattin with the precious help of Dave Clarke
http://utenti.tripod.it/esseerre/Stefano.html
e-mail: esseerre@lycos.it
$VER: Cestino.dopus5 1.0 (1.6.2001)
Assign your birth date to LaMiaDataDiNascita */
LaMiaDataDiNascita=8111966
LF='0a'x
Options Results
Options FailAt 21
Lib='rmh.library'
If ~Show('L',Lib) Then
Do
If ~AddLib(Lib,0,-30) Then Exit
If AddLibrary('rexxsupport.library')~=0 Then Exit
If ~OpenPort(trashport) Then Do
Say 'Non posso mettere il cestino!'
Exit
End
MenuCestino.count=3
MenuCestino.0='Ricicla'
MenuCestino.1='---'
MenuCestino.2='Elimina'
Argomento.count=5
DOpus AddAppIcon trashport "Cestino" LaMiaDataDiNascita icon 'ENVARC:Sys/def_trashcan' close info snap local menu MenuCestino
Icona=RESULT
Do Until Uscita=1
Evento=PortSignal(trashport)
If CheckSignal(Evento)~=0 Then
Do
Pacchetto=GetPkt(trashport)
If Pacchetto~=Null() Then
Do
Do Argomento=0 To 4
Argomento.Argomento=GetArg(Pacchetto,Argomento)
End
Call Reply(Pacchetto,0)
Select
When Argomento.0='dropfrom' Then
Do
Lister Query Source
Lista=RESULT
Lister Query Lista Path
Percorso=RESULT
Parse Var Percorso Dispositivo ":" Percorso
NomeFile=Argomento.2
/* Parse Var Dispositivo "X" Dispositivo */
File=Dispositivo":"Percorso||NomeFile
If Exists(File) Then
Do
Address Command 'Copy 'File' 'Dispositivo':Trashcan ALL CLONE'
Address Command 'Delete 'File''
DOpus Request '"'File' messo nel cestino" OK'
IconaFile=File".info"
If Exists(IconaFile) Then
Do
Address Command 'Copy 'IconaFile' 'Dispositivo':Trashcan ALL CLONE'
Address Command 'Delete 'IconaFile''
DOpus Request '"'IconaFile' messa nel cestino" OK'
End
End
Lister Refresh Lista
DOpus Script '"Lasciato sul cestino"'
End
When Argomento.0='menu' Then
Do
Select
When Argomento.2=0 Then
/* Change the devices definitions to perform on all trashcans */
Do
Do Dispositivo=0 To 6
Address Command 'Copy DH'Dispositivo':Trashcan/#? RAM: ALL CLONE'
Address Command 'Delete DH'Dispositivo':Trashcan/#? ALL'
End
DOpus Request '"Ho riciclato tutti i file nei cestini in DiscoRAM" OK'
DOpus Script '"Cestino riciclato"'
End
When Argomento.2=2 Then
/* Change the devices definitions to perform on all trashcans */
Do
Do Dispositivo=0 To 6
Address Command 'Delete DH'Dispositivo':Trashcan/#? ALL'
End
DOpus Request '"Ho vuotato tutti i cestini" OK'
DOpus Script '"Cestino vuotato"'
End
Otherwise NOP
End
End
When Argomento.0='info' Then
Do
DOpus SetAppIcon BUSY ON
DOpus Request '"by Stefano Regattin with the precious help of Dave Clarke"'LF'"esseerre@lycos.it"'LF'"http://utenti.tripod.it/esseerre/Stefano.html" OK'
Do Until RC~=0
End
DOpus SetAppIcon BUSY OFF
End
When Argomento.0='removed' Then Uscita=1
When Argomento.0='close' Then Uscita=1
Otherwise NOP
End
End
End
End
DOpus RemAppIcon Icona
DOpus Script '"Cestino rimosso"'
Call ClosePort(trashport)
Exit
End