About
Docs
Files
Support
Index

Essentials
AutoDocs
Library functions
Cooperate
Process mastering
Debug
Own debugging kit
FGE
Smart modeid pick
Loader
Shared lib. loader
Macros
Helper macros
Structs
All the structures
Logs
Library changelogs
Tools
Progs baked inside

Tools
amiscreen0.3
ansifilter0.1
auto2guide0.1
ccfilter0.1
chipset0.1
cputype0.1
device640.1
dupfilter0.1
expandlogs0.1
findsm0.2
fmpp0.1
fsmount0.1
genanim0.3
gensymtab0.1
hashlab0.4
ktm0.6
linkpoint0.1
logo2ilbm0.1
lpradio0.1
lzwpack0.1
minism0.2
mkheader0.1
modeidctrl0.1
mss0.6
multisum0.3
newterm0.2
numconv0.1
palhack1.1
patmat0.1
pfr0.2
playamitape0.1
qdbflags0.1
qfill0.1
resmodinit0.2
sadctrl0.2
saveassign0.1
setanim0.2
systime0.1
tokendump0.1
uassign0.1
viewlogo0.1
waitback0.4
wrapmount0.1



A
M
I
S
C
R
E
E
N

amiscreen-0.3
--------------

---

Have  you  ever  heard  of  'screen'? It is a very nice prog that allows to
have virtual shells that can be detached from and attached to any terminal,
so that single shell process can  act as a launch point for true background
processes. Many attempts were made to port  'screen'  to Amiga, but this is
not an easy task,  so i decided to take a different path and write a clone.
Please note that  'amiscreen' is not an exact 'screen' replica it just rips
the idea and that is all.

 -           Beware! This program is considered experimental!            -

---

NOTES:

[*]
Requires  68020(no FPU)+, OS2.04(theoretically)+,  64+ kilo of free memory.

[*]
To detach use  'CTRL + F'  key combination. I know this should be something
else, but as this is very experimental prog it will stay this way for now.

[*]
Programs  who  have  quitted  while  being  in  detached mode will still be
visible  on  the list. You must attach to such instance and press  'Return'
key to kill it. This is very helpful because you can see what happened.

[*]
At present there can be up to  15  progs launched from under single process
whose output  will be remembered.  Current  file  I/O implementation in the
server does not allow more!

[*]
Server  itself  is  a  single tasking thing, so clients who do output large
amounts of text  may slow down other clients. Lockup is not possible though
since server works in cooperative mode.

[*]
If you would like to use  "File Descriptor Relay"  in your scripts then use
the 'amiserver'. More on server can be found in the 'qdev' docs.

[*]
'amiscreen'  uses  its own shell that tries to emulate the behaviour of the
OS shell. This  specifically  means that  whenever you run a script it will
not be executed in normal shell! This  shell  emulation does not operate on
stream but loads whole script into memory!

[*]
Certain resident commands cannot be used with 'amiscreen' and these include
'Execute' and 'Run'. Note  that  these  commands can be used in the scripts
however! To run a script just provide its file name.  Same applies to Arexx
scripts.

[*]
One  great  advantage  over  the 'Execute' is that with 'amiscreen' you can
catch the output of other scripts or programs within primary script without
the need to hack on redirection.

[*]
Many, many 'ncurses' based proggies do work like a charm. I think that most
of the ordinary ones too.

[*]
Important! Tapes  are never  erased  and are  organised on record by record
basis(clips). If  you  want to  start  a  clean  recording you will have to
empty or  delete the file. Remember  though that you will need to suffixize
the filename with '.tape' to activate VCR!

---

BUGS:

[*]
Arexx processes are not able to receive sigs as sent using 'CTRL + C,D,E,F'
key combination!  This is because actual processes are 'RexxMast' processes
and the signals go to 'rx'...

[*]
Programs  who make a copy of  'Input()'  and/or  'Output()'  may  not  work
properly  or  at  all! Some  'ixemul'  progs  are  known to copy the I/O at
startup...

[*]
Programs  that  are  put  in  sub-scripts  and who expect input will become 
non-interactive!

[*]
Only top level  'Run'  will find the right output and will be synchronised!
Every 'Run' that was invoked  by inner script called with 'Execute' will be
forwarded to 'NIL:'! Maybe a feature?

[*]
Input  handling  is  a bit  buggy, some  programs may interpret key presses
wrongly. This is related to ugly raw/cooked mode detection.

[*]
When started from an '.info' stub window may not be killable with the close
gadget. Use 'CTRL + \' to close it.

[*]
Currenly  there  is  no way  to detach when in cooked mode. You must finish
typing and press 'Return' key, so that signal will trigger action.

---

HELP:

   > amiscreen ?

     DT=DETACH/S,NO=NOWAIT/S,SI=SINGLE/S,NL=NOLINE/S,TO=TOFILE/K,
     CL=CMDLINE/F



   DT=DETACH/S   -  Detach as soon as the program gets loaded and launched.

   NO=NOWAIT/S   -  Do not wait for user response  if program has ended and
                    there is no terminal attached.

   SI=SINGLE/S   -  Activate single instance mode, so that a single command
                    line input launches a prog.  and after detaching allows
                    to  reattach. This  is  especially useful when creating
                    Workbench '.info' stubs.

   NL=NOLINE/S   -  Some programs do not  'SetMode()' to RAW on the default
                    streams and  expect  byte by byte  input. Use this when
                    after pressing first character proggy assumes you typed
                    line feed. This  switch  is  client related, so you can
                    attach with or without it at any time.

   TO=TOFILE/K   -  Output everything to this file. This is not redirection
                    in  the  strict sense, normal output is still possible!
                    Think of it as a VCR more like and especially that when
                    file has a suffix of '.tape'. Use 'playamitape' to play
                    what was recorded with exact delays.

   CL=CMDLINE/F  -  Command name and its optional arguments. Important! All
                    above options do not work when passed after this arg. ,
                    they  need to be specified beforehand!

---

CLI USAGE:

   ; Below is a quick script, say 'autoavail'
   lab begin
   avail
   echo "Press 'CTRL + D/C' to stop.*e[5A"
   wait 1
   skip back begin


   ; Lets run it in the background, like one would 'Run'
   amiscreen >NIL: dt no autoavail

   ; Dump all available instances
   amiscreen
      ;   Created(ago)        State          Instance         
      ;  ----------------    -----------    ------------------
      ;   000:00:00:03        Detached       $01_autoavail

   ; Attach this shell/terminal to the above instance
   amiscreen $01_autoavail



   ; Suppose you want to play 'dopewars' through telnet
   amiscreen nl dopewars

   ; But suddenly your connection timeouts... Now if
   ; you would run the game ordinarily then it would be
   ; all lost, but since we use virtual shell you can:
   ktm [amiscreen] f
   amiscreen nl $01_dopewars



   ; If you want to kill the server then send it F sig.
   ktm [ASN0] f

---

WB USAGE:

   1) Create a project icon(just an '.info' stub)

   2) Use Workbench to inspect it(Information...)

   3) Set the tooltypes to what you would type on
   the command line

   4) Set  default  tool  to 'amiscreen' then hit
   'Save'

   5) Now  just double click  that icon and enjoy

---
megacz
    


No more fear cus pure HTML is here!
Copyright (C) 2013-2014 by Burnt Chip Dominators