Hi Chip,

    I know, that is what i was pointing out. The delay is almost a given since 
posting screen data and such takes time and focus of is secondary. The first 
posting I gave was the detailed information on that call, the GetObject and in 
the middle of the explanation, after parm description, it states those 2 
different possibilities, which both you and Aaron had made. This is why I gave 
the details of the GetObject along with links to it.

    It reminds of the ListView discussion where the events are streaming in in 
sequence and after a while the correct event finally comes along and you just 
have to wait for it...

    The GetObject also allows for calling parts of a program object, you just 
use the ! character then call that part after that character, as long as you 
know what is being used. I suspect that cursor positions and such could be done 
this way...

    But I think Jonathan has given the correct errors for what he was doing and 
still wonder why the specs on Reflection needs the VB path at times inside it's 
settings file but it is there for a reason; just thinking since the WE model 
changes the path to the default folder...it might also need a change to stop 
the error.

        Bruce
Sent: Sunday, October 12, 2014 3:46 PM
  Subject: RE: GetObject syntax / function


  Ok, thanks Bruce.



  I think Johnathin needs to post the working and non-working scripts for us to 
talk any further however.  He said he only made a slight change to a working 
script to have it stop working, so I am thinking it's not anything to do with 
reflection.



  The first parameter in GetObject() is for the user to supply an associated 
file for the application (such as a Word document when invoking an already 
running copy of Word).  That's why it's normally just omitted when you're 
simply trying to get the object of an already running application.



  Jonathin, this is why you get a blank window when you even supply a null 
string as the first parameter, it's trying to handle an associated file, but it 
can't find it.



  Also, if this helps, sometimes you have to allow some time to pass if you are 
starting the application in your script, before you then try to use the 
getObject() to find it's object; you may have to pause say 1 second with the 
sleep command before trying getObject(); this could explain why it's sometimes 
working, and sometimes not.



  Hth,



  Chip





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



  Hi Chip,
      Note the switch for Reflection for VB and that may need setting when 
inside the
  WE Script, that was my note. It was not concerning the GetObject first parm.
      I suggested it as a possible fix, not from the script end but the 
Reflection
  end.
      GetRef would be when running reflection, thus having a pointer to it to 
keep only that session open.
      As you have mentioned, and Aaron as well, the object for reflection does 
not
  exist until running, or created, thus the 2 formats already mentioned apply 
for each
  case.
      When reading Reflection notes it brought up a possibility that it is not 
looking
  at any registry settings and wants to be told if something has changed; not 
knowing
  how Jaws changes the environment verses WE.
      Reflection could have been the cause from the beginning. But having the 
WScript
  could result in the same conclusion/result as I have stated.
      I was just giving Jonathan something to experiment with, to see what 
Reflection
  is doing and it's settings file are those command line switches, which is a 
part
  of reflection, is to allow changing of Reflection default settings, and not 
for any
  getObject command.
      For when reading Jonathan's original posting, the only issue was the 
opening
  of a new session and not keeping the original session; new window opens up. 
Reflection
  seems to have issues there. I guess if I were to install Reflection and deal 
with
  R2Win issues, I could have experimented with it myself, but will just leave 
that
  up to Jonathan.
      The GetRef could be used to create a session of Reflection and just 
transport
  that pointer around as I had suggested. Then see what issues result from that.
          Bruce
  Subject: RE: GetObject syntax / function
  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

  Sent: Tuesday, October 07, 2014 7:22 AM

  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






------------------------------------------------------------------------------


       This email is free from viruses and malware because avast! Antivirus 
protection is active.





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

Reply via email to