The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.
From:
"BT" <b2me@fltg.net>Subject:
Re: A VBS and Wrappers QuestionDate:
Fri, Jun 8, 2012 8:11:07 amThis is a multi-part message in MIME format.
------=_NextPart_000_0003_01CD454E.41669560
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Rick,
This is one link to get started on. You can also use or setup shared objects to go with what this page states and the other links associated with it.
http://msdn.microsoft.com/en-us/library/ee671194(v=vs.85).aspx
Bruce
Sent: Friday, June 08, 2012 6:26 AM
Subject: A VBS and Wrappers Question
Hi Guys:
After struggling with UIA in my External script I am wondering if there are unique advantages to creating a UIA script in VBS - that is one that works with both the WE Object Model and UIA where each is most appropriate.
I wrote to the UIA Forum hosted by a developer of the UIA Native DLL to ask about a few things including using VBS as a scripting language.
He said that VBS could not access some things without using "Wrappers" which I dont really understand yet.
It sounds like creating a COM DLL or something but I've not looked into it since I am working with the Managed Code Framework for UIA in my current External Script.
That said, if there are major advantages to using VBS I might go that route downline as I learn more about UIA.
Do any of you have solid experience creating "Wrappers" and especially related to accessing UIA or Managed Modules?
The Microsoft Programmer's name is "Guy" and here is what he wrote back:
... prior stuff unrelated to vbs ...
Regarding VBScript, I don't believe the native-code UIA API can be called from VBScript.
VBScript requires the COM objects to support the IDispatch interface, and the native-code
UIA API doesn't support that. But while I've not does this myself, you should be
able to call a COM wrapper from VB.Net which calls into the native-code UIA API.
I have some C# samples which call into a COM wrapper like this. For example,
http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5
and
http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5
. There a couple of different approaches for generating a wrapper for the native-code
UIA API, and I've described these up at
http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d
and
http://social.msdn.microsoft.com/Forums/en-TT/windowsaccessibilityandautomation/thread/5b043035-b1eb-4c6c-944c-5ce8df28b1ee
.
If you do generate a COM wrapper and reference it in a C# (or I assume a VB.Net)
project, Visual Studio's Object Browser will show the contents of the wrapper, and
Intellisense works in VS to help write the code which references the wrapper's data
types.
... rest gets into the VS Forms Designer...
First, it sounds like the "Wrappers" are COM objects like what WindowEyes should be implementing rather than a script but I am not sure.
Second, as VBS Programmers have you developed Wrappers in VBS to get at functions inside other COM Objects like Guy mentions?
I have not done this since my script is already in Managed Code but would have to do it if I switched to VBS unless GW has already done it within their Object Model somehow.
So that is my question, has anyone created COM Wrappers over DLLs using VBS and does this sound like what Guy is describing in the Forum reply.
I will go look at his examples, actually I peeked at them and that is why I am pretty sure they are COM wrappers but would like to know it can, has, been done in VBS before I even consider working in VBS to create a UIA / WE Object Model script since it might add too much complexity to the project.
So, let me know what you have done with this technical set (COM Wrappers" in VBS.
Later Guys:
Rick USA
------=_NextPart_000_0003_01CD454E.41669560
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19222">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi Rick,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> This is one link to get started
on. You can also use or setup shared objects to go with what this page states
and the other links associated with it.</FONT></DIV>
<DIV><FONT size=2 face=Arial><A
href="http://msdn.microsoft.com/en-us/library/ee671194(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/ee671194(v=vs.85).aspx</A></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>
Bruce</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, June 08, 2012 6:26 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> A VBS and Wrappers
Question</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Hi Guys:</FONT></DIV>
<DIV><FONT size=2 face=Arial>After struggling with UIA in my External script I
am wondering if there are unique advantages to creating a UIA script in VBS -
that is one that works with both the WE Object Model and UIA where each is
most appropriate.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I wrote to the UIA Forum hosted by a developer of
the UIA Native DLL to ask about a few things including using VBS as a
scripting language.</FONT></DIV>
<DIV><FONT size=2 face=Arial>He said that VBS could not access some things
without using "Wrappers" which I dont really understand yet.</FONT></DIV>
<DIV><FONT size=2 face=Arial>It sounds like creating a COM DLL or something
but I've not looked into it since I am working with the Managed Code Framework
for UIA in my current External Script.</FONT></DIV>
<DIV><FONT size=2 face=Arial>That said, if there are major advantages to using
VBS I might go that route downline as I learn more about UIA.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Do any of you have solid experience creating
"Wrappers" and especially related to accessing UIA or Managed
Modules?</FONT></DIV>
<DIV><FONT size=2 face=Arial>The Microsoft Programmer's name is "Guy" and here
is what he wrote back:</FONT></DIV>
<DIV><FONT size=2 face=Arial>... prior stuff unrelated to vbs ....</FONT></DIV>
<DIV><FONT size=2 face=Arial>Regarding VBScript, I don't believe the
native-code UIA API can be called from VBScript.<BR>VBScript requires the COM
objects to support the IDispatch interface, and the native-code<BR>UIA API
doesn't support that. But while I've not does this myself, you should
be<BR>able to call a COM wrapper from VB.Net which calls into the native-code
UIA API.<BR>I have some C# samples which call into a COM wrapper like this.
For example,<BR><A
href="http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5">http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5</A><BR> and<BR><A
href="http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5">http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5</A><BR>.
There a couple of different approaches for generating a wrapper for the
native-code<BR>UIA API, and I've described these up at<BR><A
href="http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d">http://social..msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d</A><BR> and<BR><A
href="http://social.msdn.microsoft.com/Forums/en-TT/windowsaccessibilityandautomation/thread/5b043035-b1eb-4c6c-944c-5ce8df28b1ee">http://social..msdn.microsoft.com/Forums/en-TT/windowsaccessibilityandautomation/thread/5b043035-b1eb-4c6c-944c-5ce8df28b1ee</A><BR>.<BR>If
you do generate a COM wrapper and reference it in a C# (or I assume a
VB.Net)<BR>project, Visual Studio's Object Browser will show the contents of
the wrapper, and<BR>Intellisense works in VS to help write the code which
references the wrapper's data<BR>types.<BR>... rest gets into the VS Forms
Designer...</FONT></DIV>
<DIV><FONT size=2 face=Arial>First, it sounds like the "Wrappers" are COM
objects like what WindowEyes should be implementing rather than a script but I
am not sure.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Second, as VBS Programmers have you developed
Wrappers in VBS to get at functions inside other COM Objects like Guy
mentions?</FONT></DIV>
<DIV><FONT size=2 face=Arial>I have not done this since my script is already
in Managed Code but would have to do it if I switched to VBS unless GW has
already done it within their Object Model somehow.</FONT></DIV>
<DIV><FONT size=2 face=Arial>So that is my question, has anyone created COM
Wrappers over DLLs using VBS and does this sound like what Guy is describing
in the Forum reply.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I will go look at his examples, actually I peeked
at them and that is why I am pretty sure they are COM wrappers but would like
to know it can, has, been done in VBS before I even consider working in VBS to
create a UIA / WE Object Model script since it might add too much complexity
to the project.</FONT></DIV>
<DIV><FONT size=2 face=Arial>So, let me know what you have done with this
technical set (COM Wrappers" in VBS.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Later Guys:</FONT></DIV>
<DIV><FONT size=2 face=Arial>Rick USA</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0003_01CD454E.41669560--
------=_NextPart_000_0003_01CD454E.41669560
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Rick,
This is one link to get started on. You can also use or setup shared objects to go with what this page states and the other links associated with it.
http://msdn.microsoft.com/en-us/library/ee671194(v=vs.85).aspx
Bruce
Sent: Friday, June 08, 2012 6:26 AM
Subject: A VBS and Wrappers Question
Hi Guys:
After struggling with UIA in my External script I am wondering if there are unique advantages to creating a UIA script in VBS - that is one that works with both the WE Object Model and UIA where each is most appropriate.
I wrote to the UIA Forum hosted by a developer of the UIA Native DLL to ask about a few things including using VBS as a scripting language.
He said that VBS could not access some things without using "Wrappers" which I dont really understand yet.
It sounds like creating a COM DLL or something but I've not looked into it since I am working with the Managed Code Framework for UIA in my current External Script.
That said, if there are major advantages to using VBS I might go that route downline as I learn more about UIA.
Do any of you have solid experience creating "Wrappers" and especially related to accessing UIA or Managed Modules?
The Microsoft Programmer's name is "Guy" and here is what he wrote back:
... prior stuff unrelated to vbs ...
Regarding VBScript, I don't believe the native-code UIA API can be called from VBScript.
VBScript requires the COM objects to support the IDispatch interface, and the native-code
UIA API doesn't support that. But while I've not does this myself, you should be
able to call a COM wrapper from VB.Net which calls into the native-code UIA API.
I have some C# samples which call into a COM wrapper like this. For example,
http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5
and
http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5
. There a couple of different approaches for generating a wrapper for the native-code
UIA API, and I've described these up at
http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d
and
http://social.msdn.microsoft.com/Forums/en-TT/windowsaccessibilityandautomation/thread/5b043035-b1eb-4c6c-944c-5ce8df28b1ee
.
If you do generate a COM wrapper and reference it in a C# (or I assume a VB.Net)
project, Visual Studio's Object Browser will show the contents of the wrapper, and
Intellisense works in VS to help write the code which references the wrapper's data
types.
... rest gets into the VS Forms Designer...
First, it sounds like the "Wrappers" are COM objects like what WindowEyes should be implementing rather than a script but I am not sure.
Second, as VBS Programmers have you developed Wrappers in VBS to get at functions inside other COM Objects like Guy mentions?
I have not done this since my script is already in Managed Code but would have to do it if I switched to VBS unless GW has already done it within their Object Model somehow.
So that is my question, has anyone created COM Wrappers over DLLs using VBS and does this sound like what Guy is describing in the Forum reply.
I will go look at his examples, actually I peeked at them and that is why I am pretty sure they are COM wrappers but would like to know it can, has, been done in VBS before I even consider working in VBS to create a UIA / WE Object Model script since it might add too much complexity to the project.
So, let me know what you have done with this technical set (COM Wrappers" in VBS.
Later Guys:
Rick USA
------=_NextPart_000_0003_01CD454E.41669560
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19222">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi Rick,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> This is one link to get started
on. You can also use or setup shared objects to go with what this page states
and the other links associated with it.</FONT></DIV>
<DIV><FONT size=2 face=Arial><A
href="http://msdn.microsoft.com/en-us/library/ee671194(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/ee671194(v=vs.85).aspx</A></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>
Bruce</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, June 08, 2012 6:26 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> A VBS and Wrappers
Question</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Hi Guys:</FONT></DIV>
<DIV><FONT size=2 face=Arial>After struggling with UIA in my External script I
am wondering if there are unique advantages to creating a UIA script in VBS -
that is one that works with both the WE Object Model and UIA where each is
most appropriate.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I wrote to the UIA Forum hosted by a developer of
the UIA Native DLL to ask about a few things including using VBS as a
scripting language.</FONT></DIV>
<DIV><FONT size=2 face=Arial>He said that VBS could not access some things
without using "Wrappers" which I dont really understand yet.</FONT></DIV>
<DIV><FONT size=2 face=Arial>It sounds like creating a COM DLL or something
but I've not looked into it since I am working with the Managed Code Framework
for UIA in my current External Script.</FONT></DIV>
<DIV><FONT size=2 face=Arial>That said, if there are major advantages to using
VBS I might go that route downline as I learn more about UIA.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Do any of you have solid experience creating
"Wrappers" and especially related to accessing UIA or Managed
Modules?</FONT></DIV>
<DIV><FONT size=2 face=Arial>The Microsoft Programmer's name is "Guy" and here
is what he wrote back:</FONT></DIV>
<DIV><FONT size=2 face=Arial>... prior stuff unrelated to vbs ....</FONT></DIV>
<DIV><FONT size=2 face=Arial>Regarding VBScript, I don't believe the
native-code UIA API can be called from VBScript.<BR>VBScript requires the COM
objects to support the IDispatch interface, and the native-code<BR>UIA API
doesn't support that. But while I've not does this myself, you should
be<BR>able to call a COM wrapper from VB.Net which calls into the native-code
UIA API.<BR>I have some C# samples which call into a COM wrapper like this.
For example,<BR><A
href="http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5">http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5</A><BR> and<BR><A
href="http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5">http://code.msdn.microsoft.com/Windows-7-UI-Automation-9ce18fd5</A><BR>.
There a couple of different approaches for generating a wrapper for the
native-code<BR>UIA API, and I've described these up at<BR><A
href="http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d">http://social..msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d</A><BR> and<BR><A
href="http://social.msdn.microsoft.com/Forums/en-TT/windowsaccessibilityandautomation/thread/5b043035-b1eb-4c6c-944c-5ce8df28b1ee">http://social..msdn.microsoft.com/Forums/en-TT/windowsaccessibilityandautomation/thread/5b043035-b1eb-4c6c-944c-5ce8df28b1ee</A><BR>.<BR>If
you do generate a COM wrapper and reference it in a C# (or I assume a
VB.Net)<BR>project, Visual Studio's Object Browser will show the contents of
the wrapper, and<BR>Intellisense works in VS to help write the code which
references the wrapper's data<BR>types.<BR>... rest gets into the VS Forms
Designer...</FONT></DIV>
<DIV><FONT size=2 face=Arial>First, it sounds like the "Wrappers" are COM
objects like what WindowEyes should be implementing rather than a script but I
am not sure.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Second, as VBS Programmers have you developed
Wrappers in VBS to get at functions inside other COM Objects like Guy
mentions?</FONT></DIV>
<DIV><FONT size=2 face=Arial>I have not done this since my script is already
in Managed Code but would have to do it if I switched to VBS unless GW has
already done it within their Object Model somehow.</FONT></DIV>
<DIV><FONT size=2 face=Arial>So that is my question, has anyone created COM
Wrappers over DLLs using VBS and does this sound like what Guy is describing
in the Forum reply.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I will go look at his examples, actually I peeked
at them and that is why I am pretty sure they are COM wrappers but would like
to know it can, has, been done in VBS before I even consider working in VBS to
create a UIA / WE Object Model script since it might add too much complexity
to the project.</FONT></DIV>
<DIV><FONT size=2 face=Arial>So, let me know what you have done with this
technical set (COM Wrappers" in VBS.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Later Guys:</FONT></DIV>
<DIV><FONT size=2 face=Arial>Rick USA</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0003_01CD454E.41669560--




