/* ARexx script example for AmiComSys */ /* Outputs every variable */ ADDRESS AMICOMSYS; OPTIONS RESULTS; GET stem info. CLIENTLIST; /* "stem info." inserts the results to the structure 'info.'. */ /* "var s" would have inserted all the results to one string in s. */ /* "CLIENTLIST": We want to read the client list information. */ SAY "" SAY "Connected (0 = no, 1 = yes):" info.connected; /* Only output the client info when we are connected to server */ IF info.connected=1 THEN DO SAY "Number of lines in list:" info.numclients; SAY "Number of connected clients:" info.numconnected; SAY "Selected client:" info.selected; SAY "Local user:"; Say info.realname ' ('||info.login||') online' info.onlinetime; Say 'Email:' info.email; Say 'Homepage:' info.homepage; Say 'FTPSite:' info.ftpsite; Say 'Comment:' info.comment; /* Outputs the whole list of client info */ DO i=0 FOR info.numclients SAY "----" i+1 "-----"; SAY "Host:" info.hostnames.i; SAY "Username:" info.usernames.i; SAY "Realname:" info.realnames.i; SAY "Comment:" info.comments.i; SAY "HomePage:" info.homepages.i; SAY "FTPSite:" info.ftpsites.i; Say 'Online:' info.onlinetimes.i; END; SEND MSG info.login '"Nice eh.. ;)"' END; /* Example of REQUEST and REQUESTA */ title='"This is a title"' text='"Hi there. Thanks for using AmiComSys"' buttons='"_Ok|_Yepp|_Hepp"' host='"/localhost/AmiComSys"' REQUEST title buttons text /* Same thing but with a non-blocking requester */ REQUESTA title buttons text /* Same thing but with a non-blocking requester, with abbility to send a message */ /* Send message to host localhost, and program AmiComSys */ REQUESTA title buttons text HOSTNAME host EXIT;