Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Modality of msgBox

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,50171
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Modality of msgBox
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Modality of msgBox - 7/31/2007 6:18:13 AM   
  itismike

 

Posts: 42
Score: 0
Joined: 7/7/2007
Status: offline
I origonally posted this as a followup to another modality question, but figure it might be better as it's own thread.

I'm having trouble getting system modality to work. I have an external program that I want to launch and then send keystrokes into, but must wait a variable amount of time before sending it the keystrokes depending on how long the app takes to launch. I was hoping to use System Modal to force it to wait, but System Modal is acting much more like Application Modal.

In other words, it allows me to click around on other applications and change focus. The msgBox always remains on top, but it doesn't force the focus to the msgBox. I want it to beep and flash the title of the msgBox if someone attempts to click an external application.

Try the attached code. You will likely notice that it runs inconsistently - sometimes it pastes "computer name" in the correct field, and sometimes it doesn't.  Especially if a user clicks in the background before clicking OK on the msgBox.

TIA,
Mike


      
 
 
Post #: 1
 
 RE: Modality of msgBox - 7/31/2007 7:46:33 AM   
  CondoPC


Posts: 118
Score: 0
Joined: 7/23/2007
Status: offline
you may want to read this post
http://www.visualbasicscript.com/fb.aspx?m=50024&key=1048576

There were some good conversations about messagebox modal and there is a value that blocks everything until the msgbox is dismissed.

(in reply to itismike)
 
 
Post #: 2
 
 RE: Modality of msgBox - 7/31/2007 8:17:51 AM   
  itismike

 

Posts: 42
Score: 0
Joined: 7/7/2007
Status: offline
yes - that is what I was referring to in the top of my post.  4096 is not working for me.  Please feel free to look at my example.

Thanks,
Mike

(in reply to CondoPC)
 
 
Post #: 3
 
 RE: Modality of msgBox - 7/31/2007 11:42:29 AM   
  Rischip


Posts: 510
Score: 2
Joined: 3/26/2007
Status: offline
I don't think there is a native way of doing what you want in vbscript.
If you can guarantee that Microsoft Word will be on every computer that this script will run on then try this version.



      

_____________________________

Rischip
Author of - The Grim Linker

(in reply to itismike)
 
 
Post #: 4
 
 RE: Modality of msgBox - 7/31/2007 12:12:21 PM   
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
I tried doing something similar to what you are trying....I ended using AutoIt to assist me and since it lets you compile it into an .exe...there's no need to worry if the workstation running it has it installed.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to itismike)
 
 
Post #: 5
 
 RE: Modality of msgBox - 7/31/2007 3:04:05 PM   
  itismike

 

Posts: 42
Score: 0
Joined: 7/7/2007
Status: offline
OK so I'm not the first person to discover that there is no functional difference between System Modality and Application Modality. Good to know. Thanks for the suggestions Rischip and dm_4ever.

-Mike

(in reply to dm_4ever)
 
 
Post #: 6
 
 RE: Modality of msgBox - 8/2/2007 4:44:16 AM   
  itismike

 

Posts: 42
Score: 0
Joined: 7/7/2007
Status: offline
Rischip - thanks for the suggestion.  After dim'ing the variables, your suggestion seems to work - although I have trouble understanding what it is doing.  Here's the complete function:


      

See my complete program under Post a VBScript
-Mike

(in reply to Rischip)
 
 
Post #: 7
 
 RE: Modality of msgBox - 8/2/2007 4:48:24 AM   
  dm_4ever


Posts: 2723
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
May help a little understand:  http://www.microsoft.com/technet/scriptcenter/topics/office/tasks.mspx

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to itismike)
 
 
Post #: 8
 
 RE: Modality of msgBox - 8/2/2007 4:52:59 AM   
  itismike

 

Posts: 42
Score: 0
Joined: 7/7/2007
Status: offline
very interesting!  Thank you.

(in reply to dm_4ever)
 
 
Post #: 9
 
 RE: Modality of msgBox - 8/2/2007 11:45:57 PM   
  Rischip


Posts: 510
Score: 2
Joined: 3/26/2007
Status: offline
Just using the Microsoft Winword.exe as an activex control, and using it's window management functionality.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to itismike)
 
 
Post #: 10
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Modality of msgBox Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts