Combo Box Not Listed manual entry

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Combo Box Not Listed manual entry

Post by Bob Hansen » Thu Mar 27, 2003 6:22 am

Using 7.2.028

After some testing, I was going to request that the user be allowed to enter a value if needed something not listed. Forget about it. It would be nice.........but forget about it.

:!: I was able to use the Edit object in conjucntion with a "See Other Reason" value in the Combo Box. If "See Other Reason" is chosen, I check for a value in "Other" Edit box.

Part of code shown here for sample:
============================
Let>ComboHelp=Log Off allows Log on as a new user.%CRLF%Shut Down turns off power.%CRLF%Re Boot restarts computer
GetDate>Date
GetTime>Time

Dialog>WindowsExit
Caption=Shut Down Windows
Top=144
Width=315
Left=312
Height=230
Label=What do you want the computer to do?,56,16
Label=%ComboHelp%,34,72
Label=Reason:,29,112
Label=Enter Other Reason or optional Note,181,112
Button=OK,28,160,75,25,1
Button=Cancel,120,160,75,25,2
Button=Help,212,160,75,25,3
ComboBox=Action,82,40,145,Log Off%CRLF%Re Boot%CRLF%Shut Down
ComboBox=Reason,15,128,106,Normal-end of work%CRLF%Low Resources%CRLF%Problem noted here:%CRLF%Required by System%CRLF%Software Change%CRLF%System is hung%CRLF%Testing%CRLF%See Other Reason:
Edit=Other,152,128,148,
EndDialog>WindowsExit
......
......
......

//OK Button
Label>1
//Check for mandatory entries
If>%WindowsExit.Action%=,Errors
If>%WindowsExit.Reason%=,Errors
If>%WindowsExit.Reason%See Other Reason:,Continue
If>%WindowsExit.Other%=,Errors,Continue

Label>Errors
MessageModal>Missing Action or Reason
Goto>ShowWindow

Label>Continue
Goto>%WindowsExit.Action%
.......
......
......
Label>Log Off
Let>Choice=2
//Insert actions to run on Log Off
WriteLn>c:\batch\logging.log,result,%Date%-%Time%:%USER_NAME% Logging Out from "%COMPUTER_NAME%.-//-%WindowsExit.Reason% %WindowsExit.Other%.
Run Program>C:\batch\LogOff.bat
Goto>End
.....
.....
.....
Label>End
//Message is for testing only.......
MessageModal> %USER_NAME%, you have decided to %WindowsExit.Action%.%CRLF%Windows will close %COMPUTER_NAME% using Option %Choice%.
ShutDownWindows>%Choice%
========================= :arrow:

Hope this is helpful to someone :D
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts