Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...love the site and am constantly recommending it to (selected !) clients here in ireland..."

Geography

Where in the world do Tek-Tips members come from?
HairyProgrammer (IS/IT--Management)
5 Feb 12 17:31
Having trouble with what should be easy,  the goal is to launch a browser and navigate to a specific URL,  re using the named browser window if present.  Problem is that when i go to do the appactivate, (using the wait methods commonly described) they dont work.  e.g. while objIE.busy doevents  nor  does the objIE.readystate.  After poking around, I discovered that I am not getting access to all of the properites in the internet explorer object.  Some are there, some are not.  I havnt done and exhaustive look, but here is what I have found

objie.busy is always 0
Readystate is always null
LocationURL is null
LocationName is null
Name =  Windows Internet Explorer
hwnd  has the windows handle
FullName shows the program location

The only theory I have come up with is that there is some group policy on this corporate machine blocking the properties, but i have found nothing to confirm it, only hints of the possibility this could be done;  i have checked the event log and it shows successful creation of the object, no errors in security nor application;  

any insight is greatly appreciated

here is a snipet of the code

dim objIE as object
dim BrowserString


Set objIE = CreateObject("InternetExplorer.Application")

BrowserString = "www.yahoo.com"

' this doesnt work,,   objie.busy is always 0, so I cmmented out

' Error resume next
'   While objIE.busy
'    doevents
'   wend   
   
objIE.Visible = True

' ---------------  

objIE.Navigate (BrowserString),,("LICB") ' reuse window named LICB if it exists, otherwise open new w name LICB
     
' tried it here too
 ' On Error resume next
 '  While objIE.busy
 '    doevents
 '  wend   
 '

 '  the recomended approaches do not work ,  it is never ready  (always 0) and loops
 ' While objIE.readystate < 4    also  <> objie.document.readystate <> "complete" and all variations thereof do not work
 '   doevents
 ' wend
' also tried putting the wait in a callable subroutine,, behavior is same
     

' this works just fine, if the user hasnt navigated away from the window,  
' i tried putting in a pause  on error and appactivate again, but the error doesnt get trapped a second time
'   and I get an illegal function call (err=5) ;  resetting err doesnt help

   On Error goto SkipAppAct
     AppActivate "Yahoo! - microsoft internet explorer provided by xyz"
   
   Goto Endit
   
SkipAppAct:

Msgbox "site did not respond in time; please navigate manually"

Endit:
 

 
SkipVought (Programmer)
5 Feb 12 18:32



hi,

Are you using an Attachmate screen emulator?  I don't see any reference to an Attachmate application.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close