Resolved Opening Url.

Hello guys,

I just want to know what is the syntax where you can open a URL in google chrome once you trigger an object.

Any replies are so much appreciated.
 

RealHeavyDude

Well-Known Member
On which operating system?

On Windows something like this should do:

Code:
C:\Users\UserName\AppData\Local\Google\Chrome\Application\chrome.exe "yourUrl"

You might have to adjust the invokation for different OS and/or different Windows versions.

Heavy Regards, RealHeavyDude.
 

Cecil

19+ years progress programming and still learning.
This is an oldie but a goody:
Code:
PROCEDURE ShellExecuteA EXTERNAL "shell32.dll":U:
    /* Handle to parent window */     
    DEFINE INPUT PARAMETER plHWND       AS LONG      NO-UNDO.
    /* Operation to perform: open, print */
    DEFINE INPUT PARAMETER pcOperation  AS CHARACTER NO-UNDO.
    /* Document or executable name */
    DEFINE INPUT PARAMETER pcFile       AS CHARACTER NO-UNDO.
    /* Command line parameters to executable in File */
    DEFINE INPUT PARAMETER pcParameters AS CHARACTER NO-UNDO.
    /* Default directory */
    DEFINE INPUT PARAMETER pcDirectory  AS CHARACTER NO-UNDO.
    /* whether shown when opened:
       0 hidden, 1 normal, minimized 2, maximized 3,
       0 if File is a document */
    DEFINE INPUT PARAMETER plShowCmd    AS LONG      NO-UNDO.
    /* Return Code: less than or equal to 32 */
    DEFINE RETURN PARAMETER plInstance  AS LONG      NO-UNDO.
END.


DEFINE VARIABLE osReturnCode AS INTEGER     NO-UNDO.

/** Open with the Google Chrome**/
RUN ShellExecuteA(0,             /* Window Handle...*/
                "":U,          /* shell PARAMETER */
                "chrome.exe",     /* executable...*/
                "http://www.progresstalk.com",  /* PARAMETER. */
                "",  /* Working Directory*/
                1,             /* 1. normal 2, maximuise, 3. minimise..*/
                OUTPUT osReturnCode).
              
              
/** Open with the default OS browser.**/              
RUN ShellExecuteA(0,             /* Window Handle...*/
                "open":U,          /* shell PARAMETER */
                "http://www.progresstalk.com",     /* executable...*/
                "",  /* PARAMETER. */
                "",  /* Working Directory*/
                1,             /* 1. normal 2, maximuise, 3. minimise..*/
                OUTPUT osReturnCode).

Tested with Windows 10 64 bit / OE 11.51 64 bit.
 
Top