[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4701.0. "Easy AmigaDOS questions" by TOOK::KEEGAN (Peter Keegan) Wed Apr 24 1991 21:31

A couple of basic AmigaDOS questions:

1) Is there someway to convert a tool icon into a project icon?
   I want to use iconx on an existing icon to run a script, but
   it must be a project icon to do this.

2) How do I define a script which is started by iconx which will
   wait for the user to enter input from the keyboard?
   I want to echo a message to the user when the icon is double-
   clicked and wait for him to hit 'return' before proceeding.
   (I can't get the '.key' directive to pause execution)

-Peter
T.RTitleUserPersonal
Name
DateLines
4701.1IconMaster and ASKBOMBE::MOOREAmiga: Where 'multimedia' REALLY beganWed Apr 24 1991 21:579
    There are several fine PD/Shareware/etc. icon utilities around which
    will do the conversion you seek.  My personal favorite is IconMaster,
    which I believe is on some Fish disks and probably available separately
    from most of the usual Amiga libraries on TAPE, DFS, et al.
    
    You can make a script wait for keyboard input by using the ASK command.
    I think this comes with AmigaDOS, there are also several PD versions
    around.  The .KEY directive is related to input *parameters*, more like
    P1, P2, etc. in VMS command procedures.
4701.2ASK and you may not receive...MLRTYM::TERELLAThu Apr 25 1991 12:538
	RE .1  The ASK comand will allow keyboard input to a script, but if I 
	recall, when you run that script using ICONX (as opposed to EXECUTE)
	you never get a chance to make the input.  The script just goes right
	along without stopping. AREXX is about the best/simplest alternative for 
	developing interactive script like programs.

	-mt
4701.3MakeIconTOOK::KEEGANPeter KeeganFri Apr 26 1991 09:5513
Re: IconMaster - I didn't find this one on the Fish disks, but I did find
MakeIcon, which seems to do the trick. BTW, has anyone noticed that IconEd
(1.3) doesn't return memory?

> The ASK comand will allow keyboard input to a script, but if I 
>	recall, when you run that script using ICONX (as opposed to EXECUTE)
>	you never get a chance to make the input

Sounds like a bug to me.

Thanks,
Peter
4701.4BOMBE::MOOREAmiga: Where 'multimedia' REALLY beganFri Apr 26 1991 15:591
    DFS::AMIGA:ICONMASTER.ZOO
4701.5another questionTOOK::KEEGANPeter KeeganSun Apr 28 1991 20:1310
re: -1: Thanks, I've just downline loaded it, will check it out.
Another basic question: How does one copy an entire directory and
its contents whilst maintaining its directory structure?
i.e. I'm looking for the equivalent of the unix 'cp -r <dir>',
which recurses.  There doesn't seem to be a recurse option in 
the Wshell, by Bill Hawes (which I use), nor in AmigaDOS.

-peter

4701.6exHPSCAD::GATULISFrank Gatulis 297-6770Sun Apr 28 1991 20:406
    Peter,
    
    I think the AmigaDos COPY ALL does what you want.
    
    Frank
    
4701.7UBDTOOK::KEEGANPeter KeeganSun Apr 28 1991 20:547
Thanks Frank,
I did try using copy/all before asking the question, but
it seemed to flatten the directory structure. I must have been
using wildcards or something...  oh well...must must be UBD.

-peter

4701.8Fish 219CFSCTC::CARRGuru: a 4-letter word to Amiga ownersMon Apr 29 1991 09:5511
    Re: .5

>i.e. I'm looking for the equivalent of the unix 'cp -r <dir>',
which recurses.  

    If you want a unix style cp/mv/rm/rmdir command, take a look at mv
    on Fish disk 219. It does exactly what you want and the one executable
    does all the above when set up with the proper aliases.

    -Dom

4701.9It's copy all, not copy/allMADRE::MWMMon Apr 29 1991 17:5813
And it doesn't behave the way one would expect. Trouble is, I've been using
2.0 long enough that I've forgotten the extra oddities that 1.3 adds.

Try to keep it simple:

	copy directory1 directory2 all

and make sure directory2 exists before you start. I believe that does the
trick. If things aren't just write (directory2 doesn't exist, or is a file,
or etc), you get the flattening problem. My memory may be faulty, so you
probably have to play with it.

	<mike
4701.10Requestors in EXECUTEGOBAMA::WILSONTLLead Trumpet (Read that...LEED!)Tue Apr 30 1991 11:365
    For requestor type gizmos in EXECUTE commands, try
    TAPE::AMIGA:[UPLOAD]RASK-10.ZOO.  I haven't used it, but from the docs,
    it should do what you want.
    
    Tony
4701.11unloadwb?. TOOK::KEEGANPeter KeeganWed May 01 1991 10:345
Thanks for the answers and pointers. Now for another easy one:
Is there a utility to unload the workbench? Until I get a 1 meg Agnus, I
often need to release chip memory for hungry applications. Once the workbench
is loaded, the only way I've found to free up some memory is to close as many
windows as possible
4701.12STAR::ROBINSONWed May 01 1991 11:024
     >unloadwb?
     I've wondered about this too. I have a few applications that unload
     workbench from within the application. I guess it is possible.
     Dave
4701.13CloseWorkbench()STAR::GUINEAUbut what was the question?Wed May 01 1991 11:508
I believe there is a system (Intuition) call to do this named CloseWorkbench()
and an associated one named OpenWorkbench()

The problem is once you close the workbench, one of the applications running
in it's own screen somewhere better know how to open it again! (you loose
your CLI's on the workbench!)

john
4701.14Hard to kill the Workbench under 1.3TLE::RMEYERSRandy MeyersWed May 01 1991 16:2916
Re: .12, .13

I don't believe that the Workbench takes up that much memory since its
code in in ROM.  I think most of the memory use is for its backdrop
window for disk icons.

CloseWorkbench() does not cause the workbench to stop running.  Instead,
it causes the Workbench to close all of its own windows and the Workbench
screen.  However, the Workbench continues to be an active task, and it
remembers all of the windows it had open so that a call to OpenWorkbench()
will restore the Workbench screen to the state it was at when the call
to CloseWorkbench() was made.

However, the CloseWorkbench() function is a no-op if any application
(for example, a CLI) has any windows open on the Workbench screen.
In that case, the Workbench will not even close its own windows.
4701.15help with RAskTOOK::KEEGANPeter KeeganWed May 08 1991 22:2221
re: .10

I tried using Rask as follows:

1) Create project tool with DEFAULT TOOL = c:iconx
2) Create script file:

   rask "...message..." OK Cancel
   if WARN
   stack 10000
   run <program>
   endif

I get the error: "IF only valid within command files" 
when I click on the OK widget.

What am I doing wrong?

-Peter
 
4701.16?CARROL::MELLITZThu May 09 1991 09:153
    What is Rask?
    
    ...rich
4701.17Requestor type ASK programTOOK::KEEGANPeter KeeganThu May 09 1991 09:425
Rask allows you to post simple yes/no or ok/cancel type requestors from a
script file.  It returns 'WARN' if the affirmative action was selected.
Real handy, if only I could get it to work from iconx.

-peter
4701.18Let IconX "execute" the script fileCRISTA::CAPRICCIOStuck in the H�2�WhoaThu May 09 1991 17:3020
    Re: .15

    I'm not sure why IconX doesn't like the "IF" command but here's an easy
    (but perhaps not too pretty) workaround:

        � Rename your original script file to something unique

        � Create another script file (with the same name as your ICON)
          that *executes* the original script

    For example, say your original script and icon files were called "test"
    and "test.info" respectively. Rename "test" to "test.com" (or whatever;
    it doesn't really matter as long as it's unique) and create a new script
    file "test" that contains the line:

        execute test.com ; or whatever you renamed the *real* script file to...

    Hope this helps,

    Pete
4701.19ABasic startupTOOK::KEEGANPeter KeeganSun May 12 1991 21:489
*re: .-1  Your suggestion ain't pretty nor efficient, but it works!
Thanks, Pete.

While I'm on a roll with questions...
I've got some old programs that run with ABasic.
Is there any way to tell ABasic on startup to run a program?
(I've tried the obvious: ABasic <program.bas>)

-Peter