Jump to content

Input Values into a IE search box? [Solved]


Recommended Posts

I am trying to type a name in patient summary search box. How should I go about doing this. I am clearly not doing it right. (Attached Picture of HTML code.)

This is what I have tried. I assume this is not working because it is not a form? 

WinActivate("MEDITECH - Internet Explorer")
      Sleep (500)
   $oIE = _IEAttach("MEDITECH")
   $oForm = _IEFormGetObjByName($oIE, "systemMenu")
   $oText = _IEFormElementGetObjByName($oForm, "sysmenu-searchbarinput")
_IEFormElementSetValue($oText, "Hey! This works!")

HTML.thumb.PNG.c954e2fd750b7e193f2c73036153cf8e.PNG

Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

WinActivate("MEDITECH - Internet Explorer")
      Sleep (500)
   $oIE = _IEAttach("MEDITECH")
   
   
   $oDiv = _IEGetObjById($oIE, "sysmenu-searchbarinput")
   _IEAction($oDiv, "click")
   _IEFormElementSetValue($oDiv, "Hello")

 

This worked like a charm. 

However, My click is not working. I want to click it because if I don't it looks like this. (it still works, just looks bad)

Any ideas?

 

html2.PNG.ffc02b6bd1006e3ffd84bd22caf011fd.PNG

 

Edit: _IEAction($oDiv, "focus") worked. I am still having a hard time clicking things though. 

 

Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...