Hi Munawar,
This question is better asked on the scripting list, as you'll find many
more people there who may know the answer.
I am going to guess that you've run into a situation where a "splash"
window, which caused the application-specific script to first be launched,
has since closed.
You can avoid the error by adding this test around the loadset command:
if not ClientInformation.Overlap is nothing then
if clientInformation.overlap.style.overlapped then
ClientInformation.Overlap.LoadSet("vs2010.set")
end if
end if
That should prevent the error, but it doesn't get the .set file loaded for
you in cases where the clientInformation.overlap window isn't there any
longer, or for some reason isn't showing as an overlap window. I supposed
in those situations you could try using the activeWindow.loadSet instead of
clientInformation.overlap.loadset.
hth,
Chip
_____
From: Munawar Bijani [mailto:[email protected]]
Sent: Saturday, November 19, 2011 10:55 AM
To: GW Micro Info
Subject: Another VS2010 Set File Problem
Hello Everyone,
A while ago I had asked for a solution to Visual Studio 2010's constantly
changing class name and title bar changing, which negated set file
associations on every launch. I was given a solution for a script:
ClientInformation.Overlap.LoadSet("vs2010.set")
This works, except occasionally I get an error saying this function can only
be called from an overlap window. I am assuming the script is loading too
early. How do I prevent this?
Munawar A. Bijani
BPCPrograms, LLC
http://www.bpcprograms.com
If you reply to this message it will be delivered to the original sender only.
If your reply would benefit others on the list and your message is related to
GW Micro, then please consider sending your message to [email protected] so
the entire list will receive it.
GW-Info messages are archived at http://www.gwmicro.com/gwinfo. You can manage
your list subscription at http://www.gwmicro.com/listserv.