ENHANCEMENT REQUEST: Dialog Combo Values display

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply

How important is this feature for future versions of Macro Scheduler?

Important, even if the size/efficiency of Macro Scheduler increases/degrades
1
50%
Somewhat important
1
50%
I'm okay either way
0
No votes
Somewhat unimportant
0
No votes
Unimportant, even if the size/efficiency of Macro Scheduler remains unaffected
0
No votes
 
Total votes: 2

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

ENHANCEMENT REQUEST: Dialog Combo Values display

Post by Bob Hansen » Sun May 04, 2003 6:05 pm

Problem:
When defining a Dialog Window, I can set default values for the objects, but they do not show up in the Dialog Window when Show is executed. The value of the variable is OK, but the display does not show for the operator to see.

Example:
...
...
Let>WindowsExit.Action=Shut Down
Let>WindowExit.Reason=Normal-end of work
...
...
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:,21,112
Label=Enter Other Reason / optional Note,125,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,8,128,121,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,136,128,164,
EndDialog>WindowsExit

//Prompt User to select method of Shutdown
Label>ShowWindow
In this case the default value of the ComboBox named Action is "Shut Off", and the default value of the ComboBox named Reason is "Normal-end of work". But when the Dialog is shown, the ComboBox fields appear as blanks. Now even though the variables have the correct default value, the operator will not know that, , forcing the operator to make entires.

Solution:
Modify the Dialog to display the values of the variables in the fields whenever the Show command is executed.

Thanks again for listening.
Last edited by Bob Hansen on Fri Jun 06, 2003 5:25 am, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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

Post by Bob Hansen » Fri Jun 06, 2003 5:22 am

Added poll for other inputs............

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

Post by Bob Hansen » Fri Aug 08, 2003 9:06 pm

:D No need to vote.
This was implemented in Version 7.2.037

I actually saw this as the first change when I upgraded. I have a macro that is used for rebooting the system. When install of the upgrade was completed, I then had to reboot.

Lo and behold, the drop down boxes that used to be empty were filled with the default values showing already, and I hadn't even rebooted yet. It was obvious to me that at least one of my requests had been implemented.

Great work, thanks again for listening and implementing..... :D ..... :D

wjstults
Newbie
Posts: 3
Joined: Fri Aug 15, 2003 1:20 pm

Combobox enhancement

Post by wjstults » Sun Aug 17, 2003 12:59 pm

I'm using MS 7.2.037 but still am not able to control the default values when I show the combobox. The first item on the list is always displayed even if another variable is defined.

The following shows Log Off not Shut Down for Action. Am I doing something wrong? This would be a great feature if it works!

...
Let>WindowsExit.Action=Shut Down
Let>WindowExit.Reason=Normal-end of work
...
...
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:,21,112
Label=Enter Other Reason / optional Note,125,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,8,128,121,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,136,128,164,
EndDialog>WindowsExit

//Prompt User to select method of Shutdown
Label>Show
Show>WindowsExit,result

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Re: Combobox enhancement

Post by Captive » Sun Aug 17, 2003 6:58 pm

wjstults wrote:The following shows Log Off not Shut Down for Action. Am I doing something wrong? This would be a great feature if it works!
...
Let>WindowsExit.Action=Shut Down
...
Dialog>WindowsExit
...
ComboBox=Action,82,40,145,Log Off%CRLF%Re Boot%CRLF%Shut Down
...
EndDialog>WindowsExit
From the help file: (Under 'Dialog')
"To pre-select items in a ListBox or ComboBox set the object's ItemIndex property. 0 is the first item. E.g. Let>MyDialog.msListBox1.ItemIndex=0"

So I think you would use something like:
Let>WindowsExit.Action.ItemIndex=2

I have not tested this myself.

wjstults
Newbie
Posts: 3
Joined: Fri Aug 15, 2003 1:20 pm

Post by wjstults » Mon Aug 18, 2003 2:11 pm

Captive,

Thnaks for the info. It worked!

wjstults
Newbie
Posts: 3
Joined: Fri Aug 15, 2003 1:20 pm

Post by wjstults » Mon Aug 18, 2003 2:40 pm

Now that we can preselect an item on a listbox or combobox it would be nice to be able to save the ItemIndex value (e.g. write to an .INI file).

The following does not recognize ,%MyDialog.msListBox1.ItemIndex% as a valid variable.


EditIniFile>c:\winnt\My.ini,general,Item 1,%MyDialog.msListBox1.ItemIndex%.


Anyone have any ideas? I may just have to write a routine that links a variab;e containing the ItemIndex to each item on the list.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Aug 19, 2003 12:36 pm

Hi,

This has been added in 7.2.038 - the changed itemindex value is now saved so is available after the dialog has been shown.

Download from http://www.mjtnet.com/dldregd.htm
MJT Net Support
[email protected]

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