×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!
  • Students Click Here

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

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Keying into proprietary IE based application

Keying into proprietary IE based application

Keying into proprietary IE based application

(OP)
I am trying to use Attachmate to run scripted entry into a proprietary system that presents using IE.  It seems to me that there should be a way to emulate the keyboard type entry to this web style page, and tab through inputboxes, and buttons, to enter the elements required for the assigned task.  I can do it with my keyboard, why not with a script?

I can open the window using...
    Set oIE = CreateObject("InternetExplorer.Application")
    oIE.navigate(sURL)
    oIE.visible = True

but am stuck at this point.  The first input is a typed in Username and Password with a "Login" button.  The page is written in Javascript, but I was hoping for a generic "keyboard replacement" solution that would allow me to navigate throughout this application, something on the order of o_Session.Screen.Sendkeys("A<Ctrl+M>")

Is this even possible?

RE: Keying into proprietary IE based application

Sub Main

Dim objShell as object, objIE as object
Set objShell = CreateObject("WScript.Shell")
Set objIE = CreateObject("InternetExplorer.Application")
objIE.navigate ("google.com")

while objIE.busy
    msgbox "waiting for app to load"
wend

objShell.AppActivate "Google - Microsoft Internet Explorer"    
objIE.visible = true

objShell.SendKeys "Why I shouldn't use sendkeys"
objShell.SendKeys "{ENTER}"
set objIE=Nothing
Set objShell=Nothing

End Sub

Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black

RE: Keying into proprietary IE based application

(OP)
Thanks, I'll give that a try.

RE: Keying into proprietary IE based application

(OP)
I have been playing with this solution, and have made a great deal of progress.  The documentation indicates only the AppActivate, and SendKeys methods.  Is there any way to look at, and act upon text that comes up on the screen?  Some sort of Area method, or similar capability; possibly a property or method through the Internet Explorer object that would be accessible?

RE: Keying into proprietary IE based application

(OP)
Followup on yesterday's question.  Is there a way to look at the text in a "Web Page Dialog" box?

RE: Keying into proprietary IE based application

Check out
http://msdn.microsoft.com/en-us/library/ms531073(VS.85).aspx


Sub Main()

Dim objShell as object, objIE as object
Set objShell = CreateObject("WScript.Shell")
Set objIE = CreateObject("InternetExplorer.Application")

Dim d As Object 'HTMLDocument


objIE.Visible = True
objIE.navigate ("google.com")

Do While objIE.BUSY
    msgbox "opening IE"
Loop

Set d = objIE.document
For cnt =0 to d.all.length - 1
    if d.all.item(cnt).tagname = "TITLE" then msgbox d.all.item(cnt).text
Next


objIE.Quit
Set OBJie = Nothing

End Sub

Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black

RE: Keying into proprietary IE based application

(OP)
Thanks, I'll give that a shot.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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! Already a Member? Login

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