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