Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga.misc Subject: Re: Execute script from icon Message-ID: <818@cbmger.UUCP> Date: 31 Jan 91 16:59:10 GMT References: <1222@sjfc.UUCP> Reply-To: peterk@cbmger.UUCP (Peter Kittel GERMANY) Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 36 In article <1222@sjfc.UUCP> bpv9073@sjfc.UUCP (Brett VanSprewenburg) writes: > >What I wish to do is to click on an icon from the WB and have it >execute an assign script which does all the dirty work for me. >I know I could do this from the cli, but having a GUI is supposed to >save time/effort. So you see where I'm coming from. Look up your manual for the IconX command. Make up a script file (using e.g. ed) that contains all the assigns, cd's PLUS the call for the real application. Then copy a "project" type icon (e.g. notepad file). Say, your file is named StartMe, then copy that notepad icon file (the .info file) to a new file named StartMe.info. Make this icon appear on the Workbench, click once on it, and choose Info from the Workbench menu (Icons/ Informations under 2.0). Set the default tool to c:Iconx. If you want, you can add tool types to set the window size for IconX. And as last action you may use IconEd to change the shape of the icon after your taste. If your script file contains commands that need user input (e.g. ask), then you have two possibilities: a) the elegant one, as stated in the manual, but sometimes not so satisfying for me: add a .key line at the beginning of your script (see manual). b) the brute force method will provide a *real* CLI environment, but needs a second script file. Rename your above mentioned script file to StartMe.s . Make a second script file with name StartMe and following contents: NewShell newcon:0/15/580/180/StartMe from StartMe.s endcli (You may use different window dimension/titles/filenames.) But with this method you not only get two script files, but also two windows on the screen, where one of them disappears soon again. -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk