Jim,

You don't say, so I'm going to assume UniVerse here.

Yes, there are two ways you can do this in BASIC.

EXECUTE creates a new workspace, so you need to either change to using
PERFORM (which doesn't) or pass the prompt answers into that workspace. Here
are the two syntaxes.

Given the following test program:

PROGRAM testWithPrompts
  Crt 'Enter something : ':
  Input Something
  Crt 'And something else : ':
  Input SomethingElse
  Crt 'You entered ':Something: ' ' : SomethingElse
  Crt "That's All Folks"
STOP

1. Using DATA with Perform:

DATA "Hello"
DATA "World"
PERFORM "testWithPrompts"
STOP

2. Redirecting input to the new workspace:

Prompts = 'Hello' : @FM :'World'
Execute 'testWithPrompts', IN. < Prompts
STOP

Result:

RUN test.bp testPrompts
Enter something : And something else : You entered Hello World
That's All Folks


Brian

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of James Patrick
Volkman
Sent: 13 May 2010 6:13 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] WORKING WITH PROMPTS

I'd like to start off by saying I'm not a programmer. I'm trying to automate
the running of a terminal program using the EXECUTE command in BASIC. When
the program initiates a prompt comes up. I want to gain control of the
prompt and send keys to the terminal.

Is there a means in BASIC to gain control of the Prompt the way you would
using WinActivate?

I use a scripting language that allows you to send keys to the terminal
using TERMKEY. Is there a way to do this in BASIC? I don't want to use
Sendkeys because of the risk involved.

This doesn't work.

DATA "Y"
DATA "N"
EXECUTE "PROGRAM"




 Jim Volkman
San Rafael, CA
http://www.linkedin.com/in/jamesvolkman



      
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.819 / Virus Database: 271.1.1/2868 - Release Date: 05/11/10
19:40:00

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to