Different behavior for same dialog box.

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Luciano
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Different behavior for same dialog box.

Post by Luciano » Wed Feb 16, 2005 2:23 pm

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

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

Post by support » Wed Feb 16, 2005 2:38 pm

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.
MJT Net Support
[email protected]

Luciano
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Post by Luciano » Wed Feb 16, 2005 2:42 pm

I need 2 non-modal boxes.


Luciano

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

Post by support » Wed Feb 16, 2005 2:57 pm

Sorry. You threw me because you have your Show statements within loops which is unnecessary for non-modal dialogs.

I'll check this out.
MJT Net Support
[email protected]

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

Post by support » Wed Feb 16, 2005 4:11 pm

This does appear to be a bug :-(

Will let you know when a fix is available.
MJT Net Support
[email protected]

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

Post by support » Wed Feb 16, 2005 10:08 pm

A fix is now available for this issue - please download from the usual location.
MJT Net Support
[email protected]

Luciano
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Post by Luciano » Thu Feb 17, 2005 4:13 pm

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

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

Post by Captive » Thu Feb 17, 2005 5:12 pm

Heh YAY it's not just me! :D

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
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Post by Luciano » Thu Feb 17, 2005 5:48 pm

My configuration: Intel Pentium III processor with Matrox millennium G450 DualHead video card. OS: Win XP prof. SP1

Luciano

Luciano
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Post by Luciano » Fri Feb 18, 2005 8:20 am

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

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

Post by support » Fri Feb 18, 2005 8:27 am

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]

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

Post by Captive » Mon Feb 21, 2005 8:56 pm

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.

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