Jump to content

Recommended Posts

Posted

Hi,

I am using code below to find a link in IE. I need to open the link in another tab. Is there a way or function to middle mouse button click with _IEAction?

 
Local $sMyString = "DLM-"
Local $oLinks = _IELinkGetCollection($LAMA)
For $oLink In $oLinks
    Local $sLinkText = _IEPropertyGet($oLink, "innerText")
    If StringInStr($sLinkText, $sMyString) Then
  MsgBox(0, "Form Info", "found your link")
        _IEAction($oLink, "click")
        ExitLoop
    EndIf
 Next

 

 

Posted

I tried this and it works however I would prefer a cleaner way than using the "Send" fucntion....

Any ideas?

Local $sMyString = "DLM-"
Local $oLinks = _IELinkGetCollection($LAMA)
For $oLink In $oLinks
    Local $sLinkText = _IEPropertyGet($oLink, "innerText")
    If StringInStr($sLinkText, $sMyString) Then
       MsgBox(0, "Form Info", "found your link")
         Send("{CTRLDOWN}")
        _IEAction($oLink, "click")
        Send("{CTRLUP}")
        ExitLoop
    EndIf
 Next

Cheers

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...