DOpus (10/222)

From:Stefano Regattin
Date:2 Mar 2001 at 20:06:16
Subject:[D5] Dopus Script seems to not work

Date: Friday, 2nd March 2001

Hi all Opus users!
Please examine the following script:
/* Trashcan for Directory Opus 5.5
by Stefano Regattin
http://members.tripod.it/esseerre/Stefano.html
e-mail: stefano.regattin@tin.it
$VER: Trashcan.dopus5 1.0 (2.3.2001)

Please change birth date: */
MyBirthDate=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 'I cannot put the trashcan!'
Exit
End
TrashcanMenu.count=3
TrashcanMenu.0='Recycle'
TrashcanMenu.1='---'
TrashcanMenu.2='Empty'
Argument.count=5
Dopus AddAppIcon trashport "Trashcan" 'MyBirthDate' icon "ENVARC:Sys/def_trashcan" close info local
menu Trashcan Menu
Icon=RESULT
Do Until Uscita=1
Event=PortSignal(trashport)
If CheckSignal(Event)~=0 Then
Do
Packet=GetPkt(trashport)
If Packet~=Null() Then
Do
Do Argument=0 To 4
Argument.Argument=GetArg(Packet,Argument)
End
Call Reply(Packet,0)
Select
When Argument.0='dropfrom' Then
Do
Lister Query Source
SourceList=RESULT
Lister Query SourceList Path
FilePath=RESULT
Parse Var FilePath Device ":" FilePath
FileName=Argument.2
Parse Var Device "X" Device /* XHF filter */
File=Device":"FilePath||FileName
If Exists(File) Then
Do
Address Command 'Run Copy 'File' 'Device':Trashcan ALL CLONE'
Address Command 'Run Delete 'File''
Dopus Request '"'File' put into the trashcan" OK'
FileIcon=File".info"
If Exists(FileIcon) Then
Do
Address Command 'Run Copy 'FileIcon' 'Device':Trashcan ALL CLONE'
Address Command 'Run Delete 'FileIcon''
Dopus Request '"'FileIcon' put into the trashcan" OK'
End
End
Dopus Script 'Trashcan dropped'
End
When Argument.0='menu' Then
Do
Select
When Argument.2=0 Then
Do
/* change the devices to suit to your needs */
Do Device=0 To 6
Address Command 'Run Copy DH'Device':Trashcan/#? RAM: ALL CLONE'
Address Command 'Run Delete DH'Device':Trashcan/#? ALL'
End
Dopus Request '"I have recycled all the files"'LF'"from all your trashcans"'LF'"to your RAM:
device" OK'
Dopus Script 'Trashcan recycled'
End
When Argument.2=2 Then
Do
/* change the devices to suit to your needs*/
Do Device=0 To 6
Address Command 'Run Delete DH'Device':Trashcan/#? ALL'
End
Dopus Request '"I have emptied all the trashcans" OK'
Dopus Script 'Trashcan emptied'
End
Otherwise NOP
End
End
When Argument.0='info' Then
Do
Dopus Request '"stefano.regattin@tin.it"'LF'"http://members.tripod.it/esseerre/Stefano.html" OK'
End
When Argument.0='removed' Then Uscita=1
When Argument.0='close' Then Uscita=1
Otherwise NOP
End
End
End
End
Call ClosePort(trashport)
Dopus RemAppIcon Icon
Dopus Script 'Trashcan removed'
Exit
End

It is an ARexx script to handle a gloabl trashcan.
The problem is that the Magellan ARexx command
Dopus Script doesn't want to execute each assigned
script you have added.
In my case I have added the event Play Filename
QUIET with a different sound for each script event
that as showed case are the italian translation of:
Trashcan emptied
Trashcan recycled
Trashcan removed
Trashcan dropped
At this point I can hear no sound; if anybody (like
Dave Clarke, if he wants answer me) can show me
what is wrong, I send to him (or her) many thanks!



Ciao (Bye)!

* Stefano Regattin * EsseErre Software Solutions *
Home page -> http://members.tripod.it/esseerre/Stefano.html e-mail:stefano.regattin@tin.it
Amiga 500 ROM 1.2-0.5 Megs fast RAM expansion-Amiga 1200 ROM 3.1-4 Megs fast RAM expansion
170 Megs internal hard disk-HD internal diskettes driver-DirOpusMagII 5.82-OS 3.5
HP DeskJet 610C colour printer-Roper Flying 56k baud modem-C= 1084S stereo colour monitor
PC->Amiga mouse adaptor-C= Amiga CD32-Korg DS8 MIDI keyboard-Kawai GMega MIDI module



Email majordomo@lss.com.au with 'help' in the body for help.
Members posting binaries to the mailing list will be removed!