Quote:
Originally Posted by daxb
Create two ports in each script one seems a bad idea, right?
|
Why that's ingenious — in a stupid kind of way.
Quote:
Originally Posted by daxb
If you do REPLY(Packet, rv) does it help if you use SETCLIP() and GETCLIP() to send your RESULT back? In that case you need to listen on the reply in some way. Don`t know if that works.
|
While I've thought of it, it's not aesthetically pleasing.
Quote:
Originally Posted by daxb
Can/want you post/upload your script?
|
Code:
/* $VER: 1
*/
IF ~Init() THEN SIGNAL Quit
DO FOREVER
CALL WaitPkt('HASH')
paket=GetPkt('HASH')
IF paket>0 THEN DO
medd=GetArg(paket,0)
svar=0
SELECT
WHEN Left(medd,4)=='HASH' THEN DO
PARSE VAR medd 'HASH ' filnamn
svar=MakeChecksum(filnamn)
END
WHEN medd='DIE' THEN DO
SAY 'Quitting'
CALL Reply(paket,0)
EXIT 0
END
OTHERWISE SAY 'Unknown command:' medd
END
END
CALL Reply(paket,svar)
END
EXIT 0
Init:
SELECT
WHEN Show('LIBRARIES','rexxsupport.library') THEN NOP
WHEN ~AddLib('rexxsupport.library',0,-30,0) THEN EXIT 10
OTHERWISE EXIT 20
END
IF Show('PORTS','HASH') THEN EXIT 5
IF ~OpenPort('HASH') THEN EXIT 5
IF ~Close(stdin) THEN EXIT 20
IF ~Close(stdout) THEN EXIT 20
IF ~Open(stdout,'CON:////Hashserv/CLOSE/WAIT/AUTO','WRITE') THEN DO
SAY 'Could not open stdio'
EXIT 20
END
RETURN 1
Quit:
SAY 'Error in line' SIGL
EXIT 10