Different behavior for same dialog box.
Moderators: JRL, Dorian (MJT support)
Different behavior for same dialog box.
Run the following script and look to the different behaviour of the dialog boxes. Dialog1 is a non-modal type while dialog3 looks like a modal type. If you reverse declaration sequence in the script (first dialog3 and than dialog1), then dialog1 is modal and dialog3 is non-modal.
I need two non-modal boxes. What I’ am doing wrong? I
Thanks in advance
Luciano
Dialog>Dialog1
Caption=Dialog1
Top=109
Width=186
Left=62
Height=137
Label=msLabel1,48,32
EndDialog>Dialog1
Dialog>Dialog3
Caption=Dialog3
Top=87
Width=214
Left=900
Height=163
Label=msLabel3,48,32
EndDialog>Dialog3
Let>mslabel1=1111111
Let>mslabel3=3333333
Let>k=0
Repeat>k
Add>k,1
Show>Dialog1
Message>loop1 %k%
Wait>1
Until>k,3
Let>l=0
Repeat>l
Add>l,1
Show>Dialog3
Message>loop2 %l%
Wait>1
Until>l,3
I need two non-modal boxes. What I’ am doing wrong? I
Thanks in advance
Luciano
Dialog>Dialog1
Caption=Dialog1
Top=109
Width=186
Left=62
Height=137
Label=msLabel1,48,32
EndDialog>Dialog1
Dialog>Dialog3
Caption=Dialog3
Top=87
Width=214
Left=900
Height=163
Label=msLabel3,48,32
EndDialog>Dialog3
Let>mslabel1=1111111
Let>mslabel3=3333333
Let>k=0
Repeat>k
Add>k,1
Show>Dialog1
Message>loop1 %k%
Wait>1
Until>k,3
Let>l=0
Repeat>l
Add>l,1
Show>Dialog3
Message>loop2 %l%
Wait>1
Until>l,3
To show dialogs modal you need to specify a result variable for the Show command. Change your Show commands as follows:
Show>Dialog1,result1
and ...
Show>Dialog3,result3
The result variable will contain the value of the button that was pressed.
Show>Dialog1,result1
and ...
Show>Dialog3,result3
The result variable will contain the value of the button that was pressed.
MJT Net Support
[email protected]
[email protected]
Sorry. You threw me because you have your Show statements within loops which is unnecessary for non-modal dialogs.
I'll check this out.
I'll check this out.
MJT Net Support
[email protected]
[email protected]
This does appear to be a bug
Will let you know when a fix is available.

Will let you know when a fix is available.
MJT Net Support
[email protected]
[email protected]
A fix is now available for this issue - please download from the usual location.
MJT Net Support
[email protected]
[email protected]
Thanks. Script works fine. But I have a new problem. If you run that script on a dual monitor configuration, the message box appears on monitor 1 (left one and main monitor) and the dialog boxes appears on the second monitor (right one and right-extension of the desktop). The configuration and the position of the monitors are correct. Is this normal?
Luciano
Luciano
Heh YAY it's not just me! 
Luciano, I've submitted a bug report to support with that at http://www.mjtnet.com/bugtracker/.
Dialog's, MessageModal and Ask appear on the second monitor (on the right).
WinXP, Radeon 9600.

Luciano, I've submitted a bug report to support with that at http://www.mjtnet.com/bugtracker/.
Dialog's, MessageModal and Ask appear on the second monitor (on the right).
WinXP, Radeon 9600.
If I create a dialog box with the Dialog Disigner, then all the generated coordinates are correct. Take a generated Dialog block and subtract from the left coordinate the X-resolution of monitor 1. Run that Dialog declaration in a script and you have a correct working script. To put a dialog on the left monitor (monitor 1), the left coordinate must be negative!!
Hope this can help to fix the problem.
Luciano
Hope this can help to fix the problem.
Luciano
We're looking into this. It's rather odd and I suspect there is a bug in the language we use to develop MSched. What I find particularly odd is that you get different results for the message box to say a dialog box. In fact internally they are both the same object class and we just set the X,Y pos in the same way. So it's a head-scratcher.
MJT Net Support
[email protected]
[email protected]
Something else you may be interested in Marcus... sometimes when msched starts up, it will often appear fully opened on the 2nd monitor. I have my settings set to 'start minimized'. If I left click (once) on the systray icon, it will minimize from the 2nd monitor, and expand on to the first monitor.
This doesn't always happen, and it's about as random as when msched starts and has a taskbar entry (but no visible window), which also happens perhaps one every 12 times.
I will try playing with the order / delay of startup programs to see if anything I have affects it.
This doesn't always happen, and it's about as random as when msched starts and has a taskbar entry (but no visible window), which also happens perhaps one every 12 times.
I will try playing with the order / delay of startup programs to see if anything I have affects it.