Bruce,

 

Sorry, but there is no "path" associated for registry objects related to
which VBS interpreter you use.  When you're using GetObject() and
CreateObject(), you're executing a program associated with a registry key,
and the path to the program is specified inside the registry.

 

GetRef() does not apply here, but only applies to a function or object which
you've defined inside your VBS program.

 

Chip

 

 

From: LBX [mailto:lab...@fltg.net] 
Sent: Saturday, October 11, 2014 2:51 PM
To: gw-scripting@gwmicro.com
Subject: Re: GetObject syntax / function

 

Hi Jonathan,

 

    Yes, note the double click you mention, jumping out of the path
established by the WE environment. I also noted you could get the object but
opened a new session and that is what would happen according to the rules of
the get object.

 

    I was pointing out that the path for VB has changed inside of we
environment...pointing to the default folder.

 

    There are several results based on how you want things done as has been
pointed out, either a new object or just a duplicate of an existing
object...

 

    Also there is another interesting way to do things using an existing
object and that is using the GetRef version, which is a nice way to do
things, which almost emulates the shared object technique. It is an
interesting way of doing things and is like over-loading objects, but at
least a reference of the object can be done to allow it be assigned to
events and such.

 

    The path adjustment inside Reflection might be needed in a case of being
inside the WE environment and only mentioned that just in case that is the
issue. I do not run Reflection so I can not test that thought, but you could
try, then use the %system% inside the that to see if that does in fact fix
it.

 

    Only ideas and other ways to approach the issue. GetRef can be used for
function and procedure calls but does not try using class methods, I guess
it looses it's mind, pointer I mean....because none really exists until
assignment...object creation.

 

    So, give it a try and maybe it will work. I have not run Jaws since I
used it for Access data base running so I never got into it's scripting
environment which I believe is there own version and not VbScript; one
reason why I never got into it.

 

 

        Bruce

 

 

 

Sent: Saturday, October 11, 2014 11:48 AM

Subject: Re: GetObject syntax / function

 

Bruce, 

My apologies, I don't understand how the command line arguments sync with
using the GetObject with no first argument. Can you provide some pointers on
that?

 

Also, remember that double clicking a vbs  script with GetObject works
correctly in obtaining a copy of the current Reflection session, but adding
this VBS into WE Environment and then running it fails with the Can't create
Active X Object error.

 

Thanks,

 

 

Jonathan

 

 

 

On Oct 10, 2014, at 2:33 PM, LBX <lab...@fltg.net> wrote:





Hi Jonathan

 

    When using this program there are issues for the path, including placing
path in quotes. Below is the link and tech blog on these issues, especially
running VB and such.

        Bruce

 

http://support.attachmate.com/techdocs/2441.html

 

Switch Support in Reflection for HP, UNIX, OpenVMS, or ReGIS
The following switches are supported by R1Win.exe, R2Win.exe, and R4Win.exe.
/FMIGRATE
Causes the Reflection F-Secure Migration Wizard to display before Reflection
starts.
/LAYOUT <layout file>
Opens Reflection using the information contained in the layout file (*.rlo).
/N
Suppresses the display of the Reflection startup screen.
/NOCONNECT
Loads the connection information but doesn't automatically make the
connection. You
would want to use this switch, for example, if you wanted to make changes to
connection
settings in a settings file before connecting.
/NOLOADSETTINGS
Specifies that the default settings file, or any other settings file
specified, is
not loaded. This forces Reflection to load with its factory default values
or site
default values, depending on how it's configured.
/RB <command>
Where <command> is a Visual Basic command. Although the switch is called
/RB, the
Visual Basic compiler is used, not the older Reflection Basic compiler. This
startup
switch is identical to /VBA.
/RBS <script file name> [<script argument>]
Where <script file name> is a Reflection Basic script.
/RCL <command>
Where <command> is a Reflection command language command.
/RCLS <command language file name> [<command file argument>]
Where <command language file name> is a Reflection command language file
(*.rcl).
/S <settings file>
Where <settings file> is the name of a settings file to load.
When you specify multiple settings files, each successive one overwrites the
previous
settings. In the following example, the settings in the Second settings file
will
overwrite any toolbar settings that were in the First settings file.
"C:\Program Files\Attachmate\Reflection\R2win.exe" /S First.r2w /S
Second.r2w
If your settings file name includes spaces, quotes are required. For
example:
"C:\Program Files\Attachmate\Reflection\r2win.exe" /S "C:\My path\My
Settings.r2w"
If you use a UNC path for the file, it must begin with 3 backslashes.
(The /S switch can be omitted for the first settings file if it does not
contain
spaces.)
/U <path>
Where <path> designates what your user folder will be for the current
session. If
no path is provided, the user folder that was designated at Setup will be
used.
/VBA <command>
Where <command> is a Visual Basic command. This startup switch is identical
to /RB.
Use quotation marks around path names and/or commands that include spaces.
Use a
double set of quotation marks for macro data contained within other
quotation marks,
for example:
"C:\Program Files\Attachmate\Reflection\R2win.exe" /VBA ".ConnectionType =
""TELNET""
" /VBA .Connect
/W <telnet URL>
Opens Reflection from a telnet URL, such as in a web browser (see also
Technical
Note
2307
). If you have multiple startup switches, then the /W switch must be the
last switch
in the string.
Sent: Thursday, October 09, 2014 7:28 AM

Subject: Re: GetObject syntax / function

 

Chip, 

 

Thanks for the advice in a later post I showed code that I ran directly with
the vbs  system doing a GetObject  of Reflection2.Session and CreateObject
of WindowEyes.Application. This code worked and WindowEyes spoke the current
X coordinate of the cursor. I then commented out the CreateObject  and ran
the same script in the WindowEyes script host  and the GetObject on the
first line failed to execute. 

 

Bruce suggested I look at environment variables but I thought Object Name
translation was done via registry and I don' know the specific place to
look. The binary is called "r2win.exe' 

 

 

Best wishes,

 

Jonathan

 

 

 

On Oct 9, 2014, at 7:03 AM, Chip Orange <lists3...@comcast.net> wrote:





BTW, class # 16 (when I did a quick search), seems to include a discussion
of getObject().

 

Hth,

 

Chip

 

 

From: Chip Orange [ <mailto:lists3...@comcast.net>
mailto:lists3...@comcast.net] 
Sent: Thursday, October 09, 2014 6:52 AM
To:  <mailto:gw-scripting@gwmicro.com> gw-scripting@gwmicro.com
Subject: RE: GetObject syntax / function

Hi Jonathan,

 

There's a trick to use of GetObject(); it does have two parameters, but the
first parameter should not be a null string, but should be omitted entirely
if what you want is to obtain a pointer to any currently running copy of
this application object (see my Word Advanced Features app, which does this,
rather than start up a second copy of Word).  For instance:

 

Set WordApp = getObject(, "word.application")

 

Then, if it ends up returning nothing, you can then use CreateObject() to
start the application.

 

As Steve says, this is standard VBScript, so you can search the internet for
all information on it.

 

 

Hth,

 

Chip

 

 

 

From: Jonathan C. Cohn [ <mailto:jon.c.c...@gmail.com>
mailto:jon.c.c...@gmail.com] 
Sent: Tuesday, October 07, 2014 7:22 AM
To:  <mailto:gw-scripting@gwmicro.com> gw-scripting@gwmicro.com
Subject: GetObject syntax / function

I am having issues reproducing a GetObject() command I am using in a JAWS
script to work in WindowEyes. In JAWS  GetObject(R"eflection.Session"). Note
that in JAWS this takes just one argument. After invoking this command I can
act directly with the scriptable objects of the current session. In VBS with
WindowEyes the GetObject requires two parameters, where the second parameter
appears to be equivalent to the parameter that JAWS uses.

If I use a null string for the first parameter then Reflection creates a new
hidden window. If I use the path of the Reflections settings file then I get
a new session to the host. If I leave the first parameter completely blank,
I get back an ActiveX error.  What am I missing here?

Thanks in advance for any hints.Best wishes,

 

Jonathan

 

 


  _____  


 <http://www.avast.com/> 

This email is free from viruses and malware because avast! Antivirus
<http://www.avast.com/>  protection is active.

 

 

 

 

  _____  


 <http://www.avast.com/> 

This email is free from viruses and malware because avast! Antivirus
<http://www.avast.com/>  protection is active. 

 

Reply via email to