views:

45

answers:

2

Is it possible for a desktop application to communicate with a javascript API that will affect the user's browser? For example, I would like to call a JS API of a web service even if the browser is not in focus. The user can select various functions from within the desktop application and it will take effect in the browser. thanks

A: 

To get something like that to work you would need to have your web app call for updates on a regular interval and then make the appropriate changes.

Your desktop app can make requests to whatever web interface you wish to access data. It really depends on how you build it out.

Is this an existing app? Are you building something new? More info would be nice to have to get more specific.

Jonathan S.
It's really just a pet project, but it's completely from scratch, so recommendations much appreciated. Essentially, the browser loads a web site. The website can perform various functions such as "Display Time", via javascript. Within the browser, I could send direct calls to a JS API which will display the time. Can I do this from outside the browser, possibly passing in the browser's window handle to the desktop application to provide some sort of reference. I click 'Display Time' in the desktop app and the web site will call the method and display the time.
SSL
+1  A: 

You probably want to consider automating the browser from your application. As you are using .NET, WatiN is a good option to do that:

WatiN

0xA3
Thanks, I think this should be perfect to get me started.
SSL