Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script needed to link to input box

Status
Not open for further replies.

coke4us

IS-IT--Management
Jan 9, 2002
2
0
0
US
I need to write a couple scripts that will link to a input box asking for a persons ssn# - then continue on to either delete or create user in database..

I've captured the screens I currently go through, and even have created an input box- I can't figure out through help files how to link the script to the box and retreive the values added.

example of stringed text (ADDING TO DATABASE):
AZ
AGID
U
C
(SSN#);;;;
(NAME);;;;;
Y;
@;
@;

{REPEAT}
 
Hello.

The following code example is taken from the Aspect help files. The key to link the dialog input is to declare and use variables that will receive the entered text. Look for the variable "TextStr" in the code example and I hope you will get the picture.

Example:

proc main
string TextStr ; Text from dialog box.
integer Event ; Dialog box event.
; Define and display dialog with edit box.
dialogbox 0 0 0 100 70 11 "Edit Box Example"
editbox 1 5 5 90 40 TextStr MULTILINE
pushbutton 2 25 50 50 14 "E&xit"
enddialog
while 1
dlgevent 0 Event ; Read dialog event.
switch Event ; Evaluate dialog event.
case 0 ; No event occurred.
endcase
case 1 ; Edit box was changed.
endcase
default ; Exit event selected.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy dialog box.
if not nullstr TextStr ; See that TextStr isn't empty.
usermsg "You typed:`r`r%s" TextStr
else
usermsg "No text entered."
endif
endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top