MSG_CENTERED Not Working

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
GSmith
Newbie
Posts: 4
Joined: Wed Mar 16, 2005 9:17 pm

MSG_CENTERED Not Working

Post by GSmith » Wed Mar 16, 2005 9:31 pm

I'm trying to set MSG_CENTERED off (to NOT center) and it doesn't seem to be working. Does anyone by chance know why? I have added the following code at the top of my script, with no affect:

Let>MSG_CENTERED=0

I noticed in the watch window as I stepped through the code that MSG_XPOS and MSG_YPOS are both set by default to CENTER and do not change after I've set MSG_CENTERED to zero. Since MSG_XPOS and MSG_YPOS seem to be a new feature in 7.3.10.4 which is the version I'm currently using, I'm wondering if there is a bug with this new feature... :(

Anyway if anyone has any idea, I would appreciate some direction.

Thanks!

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

Post by support » Wed Mar 16, 2005 10:21 pm

Hi,

MSG_CENTERED simply overrides MSG_XPOS and MSG_YPOS. Since MSG_XPOS and MSG_YPOS default to CENTER you will need to set MSG_XPOS and MSG_YPOS to something else *and* switch OFF MSG_CENTERED. The following code puts the message in the top left of the screen at position 10,10:

Let>MSG_XPOS=10
Let>MSG_YPOS=10
Let>MSG_CENTERED=0
MessageModal>Hi
MJT Net Support
[email protected]

GSmith
Newbie
Posts: 4
Joined: Wed Mar 16, 2005 9:17 pm

Post by GSmith » Wed Mar 16, 2005 10:28 pm

Thanks that makes sense... :?

So if I want to be able to just move the message box to some place else on the screen after the script is running. Because I'm repeatedly writing new messages through out the script... Then will your code let me do that or will it keep putting it back to those coordinates?

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

Post by support » Wed Mar 16, 2005 10:31 pm

So if I want to be able to just move the message box to some place else on the screen after the script is running. Because I'm repeatedly writing new messages through out the script... Then will your code let me do that or will it keep putting it back to those coordinates?
Once these variables are set they will stay set. They won't get reset unless you chang them again.

Switch MSG_CENTERED off once and then before each Message/MessageModal command set MSG_XPOS and MSG_YPOS wherever you want it to be.
MJT Net Support
[email protected]

GSmith
Newbie
Posts: 4
Joined: Wed Mar 16, 2005 9:17 pm

Post by GSmith » Thu Mar 17, 2005 4:55 pm

Not exactly the behavior I was looking for, so is there a way to turn off the MSG_XPOS and MSG_YPOS variables to allow the message box to be place randomly on the desktop and have it remain there? The users of this script have different size monitors and they have their own preferences as to how they arrange objects on their desktops. The previous version allowed them to do this... :?

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

Post by support » Thu Mar 17, 2005 5:21 pm

I don't think the message box has ever had random placement! But if you do want random placement you could do something like this:

Random>800,X
Random>600,Y
Let>MSG_XPOS=X
Let>MSG_YPOS=Y
MessageModal>Hi
MJT Net Support
[email protected]

GSmith
Newbie
Posts: 4
Joined: Wed Mar 16, 2005 9:17 pm

Post by GSmith » Thu Mar 17, 2005 5:43 pm

Sorry, I'm not making myself clear... :?

I'm not saying that the script needs to place the message box randomly, I'm saying that my users will move this message box themselves to some random place on their desktops, out of their way, its different for each user and they expect it to stay where they put it.

This was the behavior of this control in the previous version and they will be annoyed that the message box will now appear to have a mind of its own...

This message box acts as a status box, in my script, and stays open the entire time the script is running, generally all day and so my users move this message box out of their way as needed while working on other tasks.

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