How to open a URL in the default browser via CC HTML Extension?

Hi,
I'm trying to open a link via the default browser in a HTML Extension for Photoshop CC built with Extension Builder 3.
With the initial example the "/indext.html" it look like this:
<li><button class="default" id="btn_PHXS" onClick="onClickButton('PHXS')" disabled="true">Run ps code</button></li>
and I changed the code from "/ext.js" to:
...function onClickButton(ppid) {    var csInterface = new CSInterface();    csInterface.openURLInDefaultBrowser('http://www.adobe.com');}...
This is what the "/lib/CSInterface-4.0.0.js" looks like:
* Opens a page in the default system browser.
* @param url   The URL of the page to open. Must use HTTP or HTTPS protocol.
* @return One of these error codes:\n
*      <ul>\n
*          <li>NO_ERROR - 0</li>\n
*          <li>ERR_UNKNOWN - 1</li>\n
*          <li>ERR_INVALID_PARAMS - 2</li>\n
*          <li>ERR_INVALID_URL - 201</li>\n
*      </ul>\n
CSInterface.prototype.openURLInDefaultBrowser = function(url)
    return cep.util.openURLInDefaultBrowser(url);
Since "util" doesn't seem to be defined  I get the message:
Uncaught TypeError: Cannot call method 'openURLInDefaultBrowser' of undefined
Is the something missing?
Thx,
frankin

Hi Franklin,
Apologies for the delay but I have been trying to determine why this API is not been working. I have since discovered that, although this API is documented in the JS library, the behaviour has yet to be implemented into Photoshop CC. Offline I will try to determine why this API was included in the library when it was not ready but for the meantime, if you would like to open a browser, here is a workaround:
Instead of using:
//(new CSInterface).openURLInDefaultBrowser("http://www.adobe.com")
// Use the createProcess API to open a browser. The following shows a workflow in Windows to open Internet Explorer.  
var csInterface = new CSInterface();
var rootDir = "/";
var isWindows = window.navigator.platform.toLowerCase().indexOf("win") > -1;
if (isWindows) {
                    rootDir = csInterface.getSystemPath(SystemPath.COMMON_FILES).substring(0, 3);
var processPath = "/usr/bin/open";
  if (isWindows) {
    processPath = rootDir + "Windows/explorer.exe";
var url = "http://www.adobe.com";
window.cep.process.createProcess(processPath, url);
Apologies for this inconvenience but we promise to keep you informed when openURLInDefaultBrowser API is fully supported.
Kind regards,
Lea

Similar Messages

  • How do I set firefox as the default browser in Windows Server 2012 Group Policy Editor?

    Hello, I am unable to set firefox as the default browser despite multiple different attempts to do so using group policy.
    I have:
    - Set a registry command (targeted at 32/64 via a WMI query) to reset the opening command as shown below:
    HKEY_CURRENT_USER\Software\Classes\http\shell\open\command
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint -url "%1"
    - Set a powershell logon script to run (that does run):
    firefox.exe -silent -setDefaultBrowser
    Despite setting the above it seems the client computers browsers are not affected by the settings above. When the script runs or if I run the command above a UAC window pops up and requests that I accept the command (for the setDefaultBrowser) but even if I click yes as an administrator it does nothing.
    Since GPO in 2012 has changed perhaps there is something that I am missing? Do I need to somehow disable Windows Internet Explorer from achieving default browser status?
    Please do not reply if you will suggest that I use Internet Explorer Maintenance (since this function in GPO has been disabled since IE10)
    My DC is Server 2012, my client computers are Win7 32/64.

    The above reply does not take into account that I am trying to use GROUP POLICY EDITOR to make it the default browser.

  • How to deactivate Photoshop CS4 as the default browser for image

    I wanted to deactivate Photoshop CS4 as the default browser for image. Now everytime when i want to open BMP(bitmap) file it always use photoshop CS4 to open the file. It takes a longer time to load the bitmap picture when using photoshop CS4 to open.
    Can anybody help!
    thank you

    Mylenium is implying just that.  There's a checkbox that reads something like [ ] Always Use This Program to Open This File Type.
    I do know that in Photoshop CS5 in Bridge there's a preference dialog that allows you to set file associations as well...  I'm not where I can test CS4 at the moment.  There may be such a dialog also in Bridge CS4.  Open Bridge, choose Edit - Preferences - File Associations if that subcategory exists, then find your file type and change the association.
    Yet a third possibility is that if you have a viewer program like IrfanView that you'd like to associate with the file type, then the viewer program likely offers a menu through which you can indicate you want that program assocated with particular file type(s).  I have instructed IrfanView to make itself the viewer for all Image types, and that works well.
    -Noel

  • How do I UNSET Firefox as the default browser?

    When asked I set Firefox as the default browser. I would like to UNset this setting, but that option does not seem to be in the preferences. Where is that option hiding?

    You do that by setting another browser as the default browser and make sure that Firefox doesn't ask.
    *[http://kb.mozillazine.org/Menu_differences Firefox > Preferences] > Advanced > General
    "System Defaults": "Always check to see if Firefox is the default browser on startup"

  • How to open text URL in the new tab

    Hi guys,
    We know that when we click on a hyperlink it will directly open the linked web site, e.g.
    www.bing.com
    But sometimes we may find some URL in plain text that we couldn't click on it, e.g. www.bing.com
    I'll have to select the URL and copy&paste it to a new tab to open it, this is time wasting.
    The time IE 9 came out, I found a wonderful add-on, Open URL in New Tab (with Preview)
    This will do the trick to open the text URL in the new tab by right click on it.
    http://www.iegallery.com/us/addons/detail.aspx?id=3614
    But I don't like two things of it.
    1st, it will try to preview the web site when I using it which is undesired.
    2nd, it will open the link through another site and then jump back to the link I need to open. But I'd like to open the link directly. Which will open the link more quickly also save my time.
    Questions:
    Is there any other way to open the plain text URL directly? I mean without copy and past it to another page.
    It would be great if I can open the URL by dragging it like the other...

    Is there any other way to open the plain text URL directly? I mean without copy and past it to another page.
    In these forums?  If you are using the NNTP Bridge you could view your message in your News reader's Plain text mode and then see that your two examples worked equivalently.   <eg>
    Otherwise, in general, I agree there are some pretty obvious "accelerators" which could have been provided.  
    I suspect much of the problem will be due to "security".   E.g. Windows used to have a functionality called text scraps, where you could select some text and drag and drop it just about anywhere to create a scrap file.   That's
    not working for me any more either.   If it were we could at least drag it to the Address bar and press Enter...
    http://technet.microsoft.com/en-us/magazine/2008.02.windowsconfidential.aspx
    (Microsoft search for
       text scraps
    <quote>
    virus writers loved this
    </quote>
    QED

  • How to open a file in the default application for it directly from QuickLook?

    Is there a way to issue an Open command straight from QuickLook?
    Problem:
    I have a directory containing symlinks to the PDF files I usually refer to. I cannot copy the files locally and I must use symlinks.
    When I need to open one of the files, I can't rely on Finder icon previews as these do not show for symlinks (I think that's absurd, don't you? Is there any reason why they would not?)
    Not knowing how to pick the file I am interested in, I select them all and OPTION+SPACE QuickLook them. Immediately following OPTION+SPACE I press COMMAND+ENTER and finally see them all tiled across the screen (notice: COMMAND+ENTER is not bound in Finder as far as I can see, why not allow users to press that directly?)
    Here's the problem:
    Once I choose the file I want, with the mouse of the arrow keys, I don't see how I could open just that file in the owning application (say: Adobe Reader).
    That, to me, is dumbfounding. COMMAND+O opens ALL files I selected to begin with but I think QuickLook should allow for opening the file currently being previewed with an UI element or a keystroke, shouldn't it?
    It is so strange that it almost can't be, maybe I am just missing the obvious... in that case I apologise.  Feel free to report this to Apple if you think they can work on this.
    For the record, it's the 29th of Aug 2012 and I am on 10.6.8.

    Small update.
    I created a database with a western european characterset We8MSWIn1252
    If I use utl_file to write out the code on the database server it gets produced correctly in Ascii format with the accented charcacters.
    As soon as I try and write out the code using owa_util.Mime_header and htp.p the code is written in UTF8 format.
    I did try and write out the header specifying a western european characterset but it seems that if it encounters an accented character it automatically switches to utf-8 mode. If there are no accented charcters the file is produced in ascii format.
    Really stumped on this one.

  • How do I make Firefox 4 the default browser? Whenever I open a link from email, it opens in the older version of Firefox.

    I followed the installation instructions for Firefox 4, after I had the earlier version. Whenever I open a link from email or other programs, it opens in the earlier version of Firefox, not Firefox 4.

    You'll need to get the Actions dialog to appear and check the use as default action at the bottom of the list. One of the common ways to get this to appear is to follow a link from an email program or a soical network app like Facebook or Twitter.

  • Call someone help em make my program open a webpage in the default browser?

    Sorry, new to java, new to forums, this is my section of code, i imported the proper package, ty
    try {
    Desktop.getDesktop().browse(http://www.google.com);
    } catch (Exception e) {
    e.printStackTrace(); //shows the error
    System.out.println ("ERROR");
    }

    SOLUTION
              if( java.awt.Desktop.isDesktopSupported() )
                   java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
                   if( desktop.isSupported( java.awt.Desktop.Action.BROWSE ) )
                   try
                   java.net.URI uri = new java.net.URI( "http://youtube.com/watch?v=OiS0ULLdTQo" );
              desktop.browse( uri );
              catch( Exception ex )
                   ex.printStackTrace();
                   System.out.println ("ERROR OPENING URL");
              }

  • How do you invoke the default browser for Unix/OSX

    Does anyone know how to programmatically display the contents of a URL in the default browser for a Unix system? I found a javaworld article on doing this using Runtime.getRuntime().exec(cmd). The article gives the cmd string for invoking the default browser in Windows, and for invoking the Netscape browser in Unix.
    This can easily be extended to invoke any known browser executable in a known path on a Unix system; but I'd like to invoke the default browser without knowing what or where it is. I'm specifically targetting Mac/OSX, but any Unix solution is worth trying.
    Is there a Unix command for launching the default browser to display the contents of a given URL? Or is there an alternative approach, rather than invoking Runtime.exec()?
    -Mark

    After extensive google searching, I came across a partial solution. This code detects the default browser on a Mac, and provides an elegant solution for trying standard browsers in turn for other Unix systems. I tested it on WIndows XP and Mac OSX 3.9, and it detected the default browser each time. A suped up version of this tool is available as a SourceForge project. You can find it here:
    http://sourceforge.net/projects/browserlaunch2/
    Here's the simplified code:
    //  Bare Bones Browser Launch                          //
    //  Version 1.5                                        //
    //  December 10, 2005                                  //
    //  Supports: Mac OS X, GNU/Linux, Unix, Windows XP    //
    //  Example Usage:                                     //
    //     String url = "http://www.centerkey.com/";       //
    //     BareBonesBrowserLaunch.openURL(url);            //
    //  Public Domain Software -- Free to Use as You Like  //
    import java.lang.reflect.Method;
    import javax.swing.JOptionPane;
    public class BareBonesBrowserLaunch {
       private static final String errMsg = "Error attempting to launch web browser";
       public static void openURL(String url) {
          String osName = System.getProperty("os.name");
          try {
             if (osName.startsWith("Mac OS")) {
                Class fileMgr = Class.forName("com.apple.eio.FileManager");
                Method openURL = fileMgr.getDeclaredMethod("openURL",
                   new Class[] {String.class});
                openURL.invoke(null, new Object[] {url});
             else if (osName.startsWith("Windows"))
                Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
             else { //assume Unix or Linux
                String[] browsers = {
                   "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" };
                String browser = null;
                for (int count = 0; count < browsers.length && browser == null; count++)
                   if (Runtime.getRuntime().exec(
                         new String[] {"which", browsers[count]}).waitFor() == 0)
                      browser = browsers[count];
                if (browser == null)
                   throw new Exception("Could not find web browser");
                else
                   Runtime.getRuntime().exec(new String[] {browser, url});
          catch (Exception e) {
             JOptionPane.showMessageDialog(null, errMsg + ":\n" + e.getLocalizedMessage());
       }

  • How to change the default browser for "Search in Google" pop-up menu?

    This issue has come up for the last three OS X releases, at least, and it's still here for Lion.
    I'm in Apple Mail and select some text. I want to search on the term using Google. Right-click brings up the context menu with "Search in Google." This inevitably results in Safari opening for the search.
    Chrome is definitely set as my default browser. Clicking links in email messages brings them up in the proper browser. "Search in Google" does not. Wherever this context menu item is selected (Mail, TextEdit, etc.) it opens Safari instead of the default browser.
    As far as I'm concerned, that makes the context menu item useless, since I do not use Safari.
    Has anyone figured out a workaround?
    Has anyone in the OS X team at Apple paid attention to this issue? It is not new.

    This post helped me.
    https://code.google.com/p/chromium/issues/detail?id=147510
    Basically, the "Search in Google" extension is from Safari and it can be disabled in System Preferences.
    System Preferences -> Keyboard -> Keyboard Shortcuts -> Services -> Searching and unchecking "Search with Google"
    It worked for me and I also disabled a few other right-click options that I never use.

  • How to open a URL without session ID and reuse the current browser session?

    Hi All,
    I have a question about HTMLDB 2.0
    How to open a URL without session ID and reuse the current browser session?
    That was the behaviour in HTMLDB 1.6 ...
    My usecase for this is the following:
    We have written an issue tracking application, which sends e-mail to the interested users, when something happens.
    In these email we've put a link to some page, with some parameters in the URL.
    The idea is for the user to be easy to click on the hyperlink and to see the details of the ticket.
    When the user clicks on such a link he is directed to a login screen (page 101) and he enters his Username and password, and is then forwarded to the details for the ticket.
    Then he receives another email (e.g. for another ticked). He clicks on the link and :
    a) in HTMLDB 1.6 he goes to the details as he didn't close his browser and session is remembered
    b) in HTMLDB 2.0 he is prompted to enter username, password with the username populated
    Please tell me how can I achieve the same behaviour in HTMLDB2.0 as it was in HTMLDB 1.6.
    I understand this change is somehow security related, althogh I don't understand how. If you can explain this either I would be very happy?
    Best regards,
    Mihail Daskalov

    Mihail - I detailed a couple of approaches here: Re: Application Link
    Scott

  • I have both photoshop 6 and Photoshop CC on my Mac. How can I make Photoshop CC the default to open when I double click on an image?

    I have both photoshop 6 and Photoshop CC on my Mac. How can I make Photoshop CC the default to open when I double click on an image?

    Right-click an image file,
    Get info,
    Open with: <choose Photoshop CC>
    Change File Associations in OS X Mavericks - YouTube

  • How can I use terminal to make links open in same window the default behaviour, as it was in Safari 5.0, How can I use terminal to make links open in same window the default behaviour, as it was in Safari 5.0

    In Lion, the default of pressing a link on a web page, is to open the page in a new tab. In itself, I do like this because this is what I did for 19 out of any 20 links, which I command+clicked in previous Safari versions.
    However, there is a snag to this behaviour. Most (all?) secure site do not like links to be opened in a new tab. For example, when I am doing Web banking, The the linked page doesn’t open in new tab. Rather I get a page telling me my login session is expired. Probably a security measure instituted by my bank.
    I since found out, that a command-click opens lings in the same window. Theoretically that solves the problem, if I would think about this all the time. I don't. Old habits die slowly.
    Is there a terminal command to make links open in same window the default behaviour, as it was in Safari 5.0.

    Hi Eric,
    I got it figured out today, basically you have to load the Parallel Flash Loader first into FPGA ram. It is a special .sof file (pfl_epXXXX.sof) based on your FPGA. Code is actually pretty straight forward, using the Sys Exec VI. Use the windows based programmer to generate the .cdf file that identifies your FPGA, attached Flash and .pof file .
    Syntax was odd going into Sys Exec. Note the extra "C" in in front of the "quartus_prm.exe" I have no idea why that was needed, but I was getting an error until I just happened to put it in there (Blind Luck :-))
    I used a 2 element array going into a four loop
    cmd /cquartus_pgm.exe -c USB-BLASTER -m JTAG -o P;pfl_epXXXX.sof
    cmd /cquartus_pgm.exe -c USB-BLASTER -m JTAG S_FPGA.cdf
    Defining the working director C:\altera\12.1sp1\qprogrammer\bin
    And added match string with "Successfully performed operation" on the output in the loop to make sure everything loaded correctly then adding the array to give me a overall P/F
    To anyone doing this same thing Altera's documentation is poor to say the least. It took most of a week to figure this out Not allowed to upload code, so anyone wanting details just post here and I will try to help. This was painful, with lots of lessons learned.
    Thanks for the interest though
    Best regards John

  • If Firefox is set as the default browser, and any application attempts to open a new window, this fails and I get the error "Firefox is already running..."

    Here is what I am running:
    Microsoft Windows 7, Service Pack 1, Fully updated to 4/10/2012
    Fresh Install of Firefox 11. No add-ons enabled as a result of troubleshooting.
    I am a user with administrator rights
    UAS is disabled.
    To begin, this has been going on Since Firefox 10 or so. A few months now.
    I am able to open Firefox. My add-ons worked (ABP, Flashblock, ABP Element Hiding Helper, IETAB2, Downthemall, Greasemonkey, 4chan extension) had no problems. Firefox is set and has been set for the last two years as my default web browser.
    However Since approximately Firefox 10 or so, maybe before that, If I have a Firefox session open, and any other application attempts to open a session in a new window, I get the Firefox is already running, but not responding error."
    I attempted to follow troubleshooting advice already posted (look for parent.lock files left behind [none present], multiple sessionstore.js files [none present], create a new user profile, attempted to clear out the "read-only" permission in windows 7, however as soon as it is cleared, the read only permission returns.)
    As a last resort, I deleted the Firefox folder, the %APPDATA%/Mozilla directory in its entirety, then utilized CCleaner to remove any and all references to Firefox in the windows registry, then did a full re-install, no extensions installed right now.
    I checked preferences and have the option "open new windows in a new tab" checked off. The problem persists regardless if this option is checked on or off. This problem persists in or out of safe mode, even with the brand new install.
    Test Cases:
    All cases:
    Firefox is selected as the default browser for windows 7
    Case 1: Open a firefox session. Utilize any other program that attempts to open a link to their website in a new browser window or new browser session. Experience "Firefox is already running" error
    Case 2: Open a firefox session. Right click on Firefox on the task bar. Select "open in new window". Experience "Firefox is already running" error
    Case 3: Open a firefox session. Select the Firefox Menu > New tab > New Window. A new window will actually open.
    This is the only method of opening a new window in the same browser session or profile that actually works on my system. Attempting to open a browser session from the task bar "open new window dialog" or opening a new window while a current window/session is running will not open firefox in a new window or a new tab in the current session. The "Firefox is already running, but is not responding" error will occur every time.

    Cor-el's suggestion resolved my problem. Apparently the MOZ_NO_REMOTE variable was set to 1 on my system variables. I never made it, and really have no idea how it got there, but deleting this variable and restarting firefox has resolved the issue. Thanks Cor-el!
    Marking case: Solved
    Solution: Verify the MOZ_NO_REMOTE variable is NOT set to 1. This can be achieved by simply deleting this variable.

  • How do I make Firefox the default browser in a non-administrative Windows XP account, where clicking to do so has no effect?

    I have two accounts for myself on my PC running Windows XP. In the administrative account, Firefox is already the default browser that opens when I double-click an HTML file, etc. Firefox knows it's the default browser there.
    In my other account, every time I start Firefox, it tells me it's not the default browser. Clicking there to make it the default, or in the options, does nothing.
    When I go to Set Program Access and Defaults in the administrative account, "Use my current Web browser" is selected. Mozilla Firefox is not listed as an option. In my non-administrative account, the Add or Remove Programs control panel can't be used. It says I don't have permission.

    To check that in the other account you would have to give it temporarily administrator permissions.
    See:
    *https://support.mozilla.org/kb/How+to+make+Firefox+the+default+browser
    *https://support.mozilla.org/kb/Setting+Firefox+as+the+default+browser+does+not+work
    *http://kb.mozillazine.org/Default_browser

Maybe you are looking for

  • Logical database in web dynpro program

    Hi all, I want to add LDB (PNP) into my web dynpro program.by which i can get the data from database to the Application server.After Authrization check. I also want to use Infotypes 0082 in my program. Points will be sured. Thanks.

  • How to get Adobe Acrobat 7 Side by Side Comparison

    Hello all, I have an issue where my job functions requires a Side by Side Compaison with 2 documents. I currently have Adobe Acrobat 9 (upgrade from work) but found its side by side to be downgrade. With this upgrade, the side by side comparison (Ins

  • Why are my back and forward buttons not working?

    I have restarted firefox with add-ons disabled and then in safe mode and they worked then but when closed firefox and then restarted it they don't work again. I don't know if one of my kids have done something but I am not sure what to do to fix it.

  • Disable role assignment at task level

    Hi Experts, We have a requirement where role should be assigned at task level only and not at sub task level.Any configuration for this ? if not, How to achieve this by development? shashank

  • Error Installing Premiere Elements 9 - Exit Code 7

    Hi, I'm trying to install Premiere Elements 9 on a Mac (running 10.6.4), but it always comes up with an error, and the program can't be installed. Last time I tried it got to about 95% but then gave me this error: Exit Code: 7 -----------------------