Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site cbmvax.cbmvax.cbm.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!psuvm.bitnet!psuvax1!vu-vlsi!cbmvax!carolyn From: carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) Newsgroups: net.micro.amiga Subject: Re: Need Help w/String Gadgets Message-ID: <455@cbmvax.cbmvax.cbm.UUCP> Date: Wed, 25-Jun-86 19:14:56 EDT Article-I.D.: cbmvax.455 Posted: Wed Jun 25 19:14:56 1986 Date-Received: Fri, 27-Jun-86 06:59:38 EDT References: <431@batcomputer.TN.CORNELL.EDU> <50200016@uokvax.UUCP> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner) Organization: Commodore Technology, West Chester, PA Lines: 107 In article <50200016@uokvax.UUCP> lorne@uokvax.UUCP writes: >1) Is there a way in the cli to request keyboard input during the execution >of a batch file? I would like to be able to have the startup-sequence file ask >me if I want to dump the system commands into a ram-disk. If this is not >offered in v1.1 will that be changed in v1.2? Here's something of J. Dow's I downloaded off BIX a while back. ---------------------------------------------------------------------------- ========================== amiga/programs #26, from jdow, 1392 chars, Sun Feb 16 16:30:35 1986 -------------------------- TITLE: yesno.c I found a need in "execute" files to have operator intervention control the direction a batch file may take. The yesno.c program gives me a certain amount of control over this. I made little effort to get elegant as I could see little savings or benefit. ___________________________ /* * * yesno.c * * Version 1.0 (original release) * * Usage: * yesno "match string" <-c> * yesno prompts for operator input and compares it to the string. * if the -c option is present both strings are converted to caps before * the comparison. * * Copyright 14-Feb-86 by Joanne Dow - released for free distribution as * long as this copyright notice is retained in the file. * */ #include "stdio.h" #include "ctype.h" #define NO 6 /* > warn level exit code */ #define YES 0 /* No warning exit code */ #define SIZE 81 /* Size of read buffer */ main(argc, argv) char *argv[]; { int caps; char chxxx[SIZE], *pch; if (argc <= 1) { printf("No arguments\n"); exit(NO); /* exit false */ } caps = ((argc > 1) && (argv[2][0] == '-') && (argv[2][1]) == 'c'); pch = fgets( &chxxx[0], SIZE, stdin); chxxx[strlen(pch)-1] = '\0'; if (caps) { while (*pch = toupper(*pch)) pch++; printf("\n"); pch = argv[1]; while (*pch = toupper(*pch)) pch++; pch = &chxxx[0]; } if (strcmp(argv[1], pch) == 0) exit(YES); else exit(NO); } ---------------------------------------------------------------------------- >2) I seem to be having trouble when swapping disks (I only have one drive), in >getting the system to recognize that the new disk is different. It is a royal >pain having to reboot everytime I change applications. Is there something I am >missing out on? (Ex. I boot on my workbench disk, do some system things, and >decide to play on Dpaint awhile. When I pop out workbench and put in the Dpaint >disk the system flashes a requestor on the screen for the workbench disk.) The system KNOWS the new disk is different. All of the system paths (C:, L:, etc) are assigned to the disk you booted with. If the DPaint disk had the "assign" command on it, it might be possible to write a reasonable script to handle reassigning the system paths. But it probably wouldn't work with DPaint anyway, because they do some fooling around when they boot. The program probably would not work if you simply transferred control to the disk. >3) How do I get my preferences onto the Dpaint disk? I don't think this is >all that crucial, but I don't like the original arrow pointer. So I drew my own >(after all, thats what preferences is for right?) The only problem is that >Dpaint uses the pointer that I hate; and I want my own!! > I would NOT suggest writing to your DPaint disk. I have heard many stories of trashed DPaint disks caused by writing to the disk. I believe they have some crucial code or data on the disk which can be wiped out if you save to the disk. If the disk could be written to, you could copy your WorkBench devs/system-configuration file to it. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=