Keep messages from becoming active window?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Kwhiz
Junior Coder
Posts: 35
Joined: Wed Jan 12, 2005 6:19 pm

Keep messages from becoming active window?

Post by Kwhiz » Sat Jul 15, 2006 1:44 am

Is there a way to keep messages from becoming the active window when they pop up using the MSG> command?

For example, let's say I'm browsing the internet with Internet Explorer, and one of my macros goes off and a message pops on the screen and says, "hello", ... is there a way to keep that message from taking the focus away from internet explorer? Is there a way to keep the message from becoming the active window?

Thanks,
Kwhiz

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

Post by JRL » Sat Jul 15, 2006 4:57 am

Are you saying you want the message window to be on top so that it is visible but you want it not to be the focused window? Or are you saying you want the message to pop up in the background somewhere and not be visible on top of the IE window?

If the former, try this in the script that is running and pops the message:

//Set MSG_STAYONTOP to 1
Let>MSG_STAYONTOP=1

//get the current active window
GetActiveWindow>window_title,X,Y

//Pop your message
Message>Hello

//Set focus on the window you were working on when the message popped up
Set>%window_title%

If the latter, do the same thing without the Let>MSG_STAYONTOP=1 line.

Hope this helps,
Dick

Kwhiz
Junior Coder
Posts: 35
Joined: Wed Jan 12, 2005 6:19 pm

Post by Kwhiz » Sat Jul 15, 2006 11:47 pm

Ah yes, that works! Thanks!

Kwhiz

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