home *** CD-ROM | disk | FTP | other *** search
- /* $VER: Example Script for Magic-Exchange V1.0
- Simple Magic-Exchange Demo - ARexxScript
-
- © 1997 by I.Musquinier & Michael Einemann
-
- Syntax: rx MagicCx.rexx CDity action
-
- */
-
- options results
- /* trace results */
- arg Commodity action
- compress(action)
-
- if action="INACTIVE" then action="CX_Deactivate"
- if action="ACTIVE" then action="CX_Activate"
- if action="REMOVE" then action="CX_Remove"
-
- call address() /* looking for the port from where the script was startet */
- port=result /* save portname for output */
-
- if open(file,'ENV:mxchg',r) then do /* read Enviroment Variable to get information */
- path=readLn(file) /* where the hell the list with CDities goes */
- close(file)
- end
-
- address value 'MXCHG' /* change address to MagicExchanges port */
-
- CX_GetList /* send Command to MagigExchange to get a list of running CDities */
-
- address command wait "1 secs"
-
- address
-
- if open(cdity,''path'',r) then do /* open the list */
-
- Do i=1 until eof(cdity)
- Cdty.i=upper(readln(cdity)) /* read the list and put CDities into variables */
- if cdty.i=commodity then call manipulation /* if wanted CDity found then call label */
- else nop
- end
-
-
- say Commodity 'was not found in current list of Running Commodities. :-('
-
- end
- exit
-
-
-
- manipulation:
-
- address value 'MXCHG' /* change address to MagicExchanges port */
-
- CX_Select commodity /* select the Wanted CDity */
- address command wait "2 secs" /* a little pause must be there, do not remove this line! */
- action /* make action to CDity */
-
- address /* change address e.g. to Shell for output */
-
- Say "Operation on" commodity "done."/* output this to e.g. Shell */
- exit
-
- /*
-
- CX_Select NAME/A < Attach a CDity e.g. me_selectcx 'magic-exchange'
-
- CX_GetList < saves a list with running CDities to the Path You specified in Tooltypes
-
- CX_Remove < removes a CDity that was attached by CX_Select
-
- CX_Deactivate < Deactivate a CDity that was attached by CX_Select
-
- CX_Activate < Activate CDity that was attached by CX_Select
-
- CX_Priority PRIO/A < Set a Priority for an commoditie
-
- CX_RemoveAll < Removes all commodities
-
- */
-
- /* This Scipt is part of Magic-Exchange. Do not Eat it! :-) */
-