Jump to content

Recommended Posts

Posted

Well, something did happen this time.

If you look at the screen shots I posted earlier you'll notice a white line near the top that says Patient Summary, after I run the script that white line is pushed up and it covers almost half of the gray line. Then when I run it again it goes back to normal.

Did the source code help?

  • Moderators
Posted

Well, something did happen this time.

If you look at the screen shots I posted earlier you'll notice a white line near the top that says Patient Summary, after I run the script that white line is pushed up and it covers almost half of the gray line. Then when I run it again it goes back to normal.

Did the source code help?

I had the wrong frame, I updated the above code again.

Yes it did help.

Posted

Wow, this is a lot more complicated then I thought it would be.

Is this program based off C++ programming or does it have it have a language all it's own? Also, what is the best way to learn?

  • Moderators
Posted

Larry is right, lets start out with something simple.

Lets see which frame if any this highlights:

#include <IE.au3>

Opt("TrayIconDebug", True)
Opt("WinTitleMatchMode", 2)

_IEErrorHandlerRegister()

$sURL = "http://mdinsite.dermandvein.com/tasc/servlet/Main"
$oIE = _IEAttach($sURL, "url")
If Not IsObj($oIE) Then
    $oIE = _IECreate($sURL)
EndIf

$oFrame = _IEFrameGetObjByName($oIE, "detail")
If Not IsObj($oFrame) Then
    MsgBox(0, "", "Unable to get reference to frame.")
    Exit
Else
    $oFrame.style.border = "2 solid #FF0000"
EndIf
Posted

Nothing gets highlighted. I know nothing about any of this, but it seems like the javascript is getting in the way. The page URL never changes, but the information on the page does. Also, the links have no ControllerID's.

  • Moderators
Posted (edited)

Nothing gets highlighted. I know nothing about any of this, but it seems like the javascript is getting in the way. The page URL never changes, but the information on the page does. Also, the links have no ControllerID's.

If this doesn't highlight something then we have got some problems. When it highlights the frame with our links we are trying to click on, note the name.

#include <IE.au3>

Opt("TrayIconDebug", True)
Opt("WinTitleMatchMode", 2)

_IEErrorHandlerRegister()

$sURL = "http://mdinsite.dermandvein.com/tasc/servlet/Main"
$oIE = _IEAttach($sURL, "url")
If Not IsObj($oIE) Then
    $oIE = _IECreate($sURL)
EndIf

$oFrames = _IEFrameGetCollection($oIE)
If Not IsObj($oFrames) Then
    MsgBox(0, "", "Unable to get frame collection.")
    Exit
EndIf
For $oFrame In $oFrames
    $oFrame.style.border = "2 solid #FF0000"
    MsgBox(0, "", "This is the '" & $oFrame.name & "' frame.")
    $oFrame.style.border = 0
Next

Edit: Updated code

Edited by big_daddy
Posted (edited)

Error on Line 15:

Variable used without being declared

Can you explain exactly what we're trying to do with this code?

Edited by Knotty Alder
  • Moderators
Posted

Error on Line 15:

Variable used without being declared

Can you explain exactly what we're trying to do with this code?

Had a variable named wrong, it should work now.

We are trying to pinpoint the frame we are wanting to reference. This code will highlight each frame one at a time then a msgbox will tell you the name of the frame currently highlighted.

Posted

I don't think this is going to work unless I learn the AutoIt programming quick like. Or if I knew more about the Javascript that's controlling the page we're trying to manipulate. Looks like I'm up crap creek without a paddle and I'm stuck doing this montrous task by hand. Thanks for all your help though guys, I really appreciate it.

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
×
×
  • Create New...