Macro Scheduler Message title change

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Waldo
Junior Coder
Posts: 20
Joined: Fri Oct 29, 2004 4:22 am

Macro Scheduler Message title change

Post by Waldo » Mon Aug 31, 2009 7:32 pm

Need some advice on this one....

I like the ease of using the Messsage command, but need to change the title of the window to my own title instead of Macro Scheduler. Is there a way to do this? I need to have the functionality of the STAYONTOP feature of the built in message command.

When I try to create a custom Dialog box to do this, I can't get the dialog window to stay on top (visible) during external program runs.

So either solution would help me: 1)Either change the title of the MESSAGE window, or 2)find a way to make a DIALOG box to always stay on top (visible). I tried SETFOCUS on the dialog, but doesn't work.

thanks..

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Aug 31, 2009 8:50 pm

Try this program contributed by Rain. Its a very nice addition to any one's Macro Scheduler utilities.

You can change the name of any Window using Marcus' contribution HERE.

Finally, in conjunction with the SetWindowPos library function information found HERE, the secret to making a compiled dialog window stay on top is to place a MoveWindow> in the dialog's idle loop. The dialog must be non-modal and the script repeatedly retrieves the windows current location then moves the window to its current location.

I'd use Rain's utility... its easy.

Waldo
Junior Coder
Posts: 20
Joined: Fri Oct 29, 2004 4:22 am

Message Title Change...

Post by Waldo » Thu Sep 03, 2009 4:53 am

Thanks, JRL, for your suggestions.

I had overlooked the APP_TITLE variable that changes the message box titles on compiled programs from "MACRO SCHEDULER" to whatever I need. Very simple solution.

One thing that I noticed about using DIALOGs instead of Message routines, is that dialogs greatly reduce the speed of a background program. I was trying to have a foreground dialog box that would control the running program... but the dialog steals too much processor time. So I'm reverting to using the MESSAGE function to display the progress of the program, and reserving the use of DIALOGS for paused user interaction.

Many thanks, though, for your comments.

Waldo

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Sep 03, 2009 5:16 am

One thing that I noticed about using DIALOGs instead of Message routines, is that dialogs greatly reduce the speed of a background program.
Interesting. I posted a script a couple of years ago to test this exact speed issue. you can find the discussion HERE. I came to a different conclusion at that time. I found dialogs to be less resource hoggish and I've used dialogs ever since. I'll have to try the test again tomorrow and see if version changes have altered the result.

EnderFFX
Pro Scripter
Posts: 92
Joined: Mon Mar 08, 2004 6:17 am

Re: Message Title Change...

Post by EnderFFX » Tue Sep 08, 2009 5:27 pm

Waldo wrote:Thanks, JRL, for your suggestions.

I had overlooked the APP_TITLE variable that changes the message box titles on compiled programs from "MACRO SCHEDULER" to whatever I need. Very simple solution.

One thing that I noticed about using DIALOGs instead of Message routines, is that dialogs greatly reduce the speed of a background program. I was trying to have a foreground dialog box that would control the running program... but the dialog steals too much processor time. So I'm reverting to using the MESSAGE function to display the progress of the program, and reserving the use of DIALOGS for paused user interaction.

Many thanks, though, for your comments.

Waldo
Thank you or posting this! This was a question I was abot to ask in regards to the APP_TITLE

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Sep 08, 2009 7:48 pm

Hi Marcus,

In my opinion, it would be helpful if the Help File topics for Message> and MessageModal> were updated to add the following:
proposed Help File addition wrote:For compiled macros, you can change the title displayed by the message box from "Macro Scheduler Message" to "My Title Message" by setting the APP_TITLE system variable.

Let>APP_TITLE=My Title
I searched the Help File for APP_TITLE and there are only a couple entries and none of them mention this. You may think people should just know or assume this... but this posting shows its not obvious.

Again, just my opinion... take care.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Sep 08, 2009 9:13 pm

It might also be important to point out that even though lower case app_title or mixed case App_Title display red in the editor as if they are valid system variables, they do not work. You must use all upper case characters or setting APP_TITLE will fail. I've never used APP_TITLE and I tend to type variable names in CamelCase so it took me a while to figure out what this variable could do because it was doing nothing.

APP_TITLE
APP_TITLE
APP_TITLE
APP_TITLE

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Sep 08, 2009 9:43 pm

JRL wrote:It might also be important to point out that even though lower case app_title or mixed case App_Title display red in the editor as if they are valid system variables, they do not work. You must use all upper case characters or setting APP_TITLE will fail.
:shock:
Not that I don't trust you JRL, but I had to see it... so in one of my macros, instead of this:
Let>APP_TITLE=My Title

I used this:
Let>App_Title=My Title

and just like you said, it failed. Normally for assigning a value to a variable, case does not matter so this was a bit of a surprise.

Marcus, are all system variables like this? If so then that maybe this should be stated somewhere in the Help File.

If this behavior is unique to only this system variable, can the behavior be changed so that case does not matter (like the others)?

Thanks for pointing this out JRL!
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

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