Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

use an existing internet explorer process

Status
Not open for further replies.

ninjaimp

Technical User
Apr 20, 2007
3
GB
Hi

I am trying to figure out how i can get progress to open an existing instance of internet explorer (if exists).

I have the code to find if the process is running but how can i attache that process to an object to open it and pass a new url parameter. everything i try just keeps opening a new internet exploreree window.

Code to check if window exists

Code:
FUNCTION IsTaskRunning RETURNS LOGICAL (pi_cTask AS CHARACTER, pi_cTitle AS CHARACTER):
DEFINE VARIABLE cline AS CHARACTER  NO-UNDO EXTENT 20.
DEFINE VARIABLE lRunning AS LOGICAL    NO-UNDO.
INPUT THROUGH VALUE ('tasklist /FI "Imagename eq iexplore.exe" /fo csv /v /nh') NO-ECHO.
REPEAT:
    IMPORT DELIMITER "," cline.
    IF cline [1] BEGINS pi_ctask AND cline [9] = pi_ctitle THEN DO:
        ASSIGN lRunning = YES.
        LEAVE.
    END.
END.
INPUT CLOSE.
RETURN lRunning.
END FUNCTION.
MESSAGE IsTaskRunning ("iexplore.exe","My Page - Reply to Topic - Windows Internet Explorer")
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top