Chrome and DDE

1,547 views
Skip to first unread message

Dave Winer

unread,
Jun 9, 2012, 2:35:42 PM6/9/12
to frontier-user
When you choose Preferences or Tool Catalog from the Misc menu, we fire off a DDE message to the current browser. 

Apparently Chrome does not support this. That's why these commands don't work with Chrome on Windows.


They work perfectly well with all other browsers, and with Chrome on the Macintosh.

Dave


Ivan Vučica

unread,
Jun 9, 2012, 2:55:23 PM6/9/12
to fronti...@googlegroups.com
You use DDE to open a web page? 

Isn't it easier to:
  ShellExecute(NULL, "open", "http://scripting.net", NULL, NULL, SW_SHOWNORMAL);

Just as on OS X I'd use [NSWorkspace openURL: ].

I'm just wondering, is there some other major use for DDE when Frontier is interacting with the browser? (Frankly, this is the first time I heard about DDE, but from what the book of knowledge says, it's similar to Apple Events, right?)
--
Ivan Vučica - iv...@vucica.net


Dave Winer

unread,
Jun 9, 2012, 3:25:23 PM6/9/12
to fronti...@googlegroups.com
My memory is bad so I tried running your one-liner on the server.


It doesn't know what ShellExecute is. 

The reason why DDE is easier is that al the other browsers work that way and if Chrome did I would have to do *nothing* to make it work with the OPML Editor. :-)

It's why we bother using standards whenever possible. 

Dave

Ivan Vučica

unread,
Jun 9, 2012, 3:37:06 PM6/9/12
to fronti...@googlegroups.com
Sorry, that's, of course, a line in C using a Win32 API for launching a process. :-)

I agree that Chrome should definitely support it. But based on my experience with them fixing reported bugs, you're probably looking at several months of response time.

Simpler solutions are often better, and IPC of this kind may not be needed here if ShellExecute() will do the trick.

Dave Winer

unread,
Jun 9, 2012, 3:47:21 PM6/9/12
to fronti...@googlegroups.com
Well the simplest solution is to use Firefox. :-)

Dave Winer

unread,
Jun 10, 2012, 7:58:20 PM6/10/12
to frontier-user
Ivan, you gave me an idea that worked. Thanks! :-)

http://worknotes.scripting.com/june2012/61012ByDw/openingUrlsInChromeOnWindows

I think we now have a working connection betw the OPML Editor and
Chrome on Windows. :-)

Dave
> Ivan Vučica - i...@vucica.net

Ivan Vučica

unread,
Jun 10, 2012, 8:18:54 PM6/10/12
to fronti...@googlegroups.com
Haha, nice trick! Glad to be of service :-)

By the way -- it's Vucica, not Vudica. 0:-)

Dave Jones

unread,
Jun 11, 2012, 1:12:07 AM6/11/12
to fronti...@googlegroups.com
You don't need to create that temp file.  Windows protocol handler will execute a url directly in the default browser from ShellExecute. So all you need is this:

  launch.application("http://www.caltech.edu/")

Just did it in a quickscript window and it worked fine on Windows 7 and Windows Server 2003.


DJ

Dave Winer

unread,
Jun 11, 2012, 8:44:59 AM6/11/12
to frontier-user

Dave Jones

unread,
Jun 11, 2012, 4:34:16 PM6/11/12
to fronti...@googlegroups.com
Updated parts, created an empty outline, did Add Link... http://www.harvard.edu .  Right-clicked and did Open in Browser.  Firefox opened fine to the correct url.  Switched to Chrome as default browser and did the same thing.  Opened fine.  (Windows 7)

DJ

Dave Winer

unread,
Jul 12, 2012, 1:23:55 PM7/12/12
to fronti...@googlegroups.com
Dave, following up on this -- 

Is there a way to bring the default web browser to the front using the same mechanism?

For example, in the Tool Catalog command, we do this:

webbrowser.bringtofront ()
webbrowser.openurl (opmlEditor.data.urls.toolCatalogPage)

The second call works, per these suggestions, but it still tries to bring Firefox to the front.

Thanks in advance for any help.

Dave

Dave Jones

unread,
Jul 12, 2012, 2:28:15 PM7/12/12
to fronti...@googlegroups.com
Just running launch.application(opmlEditor.data.urls.toolCatalogPage) brings chrome to the front for me when i set it as my default browser.

DJ

Dave Winer

unread,
Jul 13, 2012, 11:23:16 AM7/13/12
to fronti...@googlegroups.com
Thanks Dave. This was tricky, but I think I found the correct way to approach it.


Turns out we couldn't really do it one way for Chrome and the old DDE-based way for other browsers.

The fact that the new way also does a bringToFront turned out to be problematic. 

Dave
Reply all
Reply to author
Forward
0 new messages