控制另一台计算机上的浏览器
嗯,
输入标题让我觉得我是一个黑客,要求一些非法的东西......
但我认为事实是不同的。我的客户想要同时控制不同计算机上的 3 个 Web 应用程序。
我不能确切地说出这样做的目的是什么,但他希望,当他在浏览器中单击计算机 A 上的按钮 1 时,在浏览器中的计算机 B 上也单击按钮 1,并且也在计算机 C 上单击。
当我将这个过程分为三个步骤时,我意识到它们都不是我以前做过的事情:
第一件事就是从浏览器中获取点击事件 二是通知B、C号计算机点击事件 第三是单击计算机B和C的浏览器中的按钮
三件事我不知道如何完成(我过去做过一些远程处理,也许这可以用于三台计算机之间的通信,但我只记得是远程处理没有成为我的朋友)
因此,如果您能给我任何有关如何捕获浏览器外部的浏览器事件、如何在两台电脑之间进行通信以及如何从浏览器外部引发浏览器中的事件的线索,我们将非常感谢您的帮助。
编辑:
我不控制该应用程序。我的客户将使用它发送多个股票订单。所以我认为你可以将其与投票网站上的投票进行比较
hmmm,
typing the title made me feel like i am a hacker asking for some illegal stuf....
but the truth is different i think. My client wants to control 3 webapplications at different computers at the same time.
I can't say exactly what the porpose of this is, but he wants, when he clicks on computer A at button 1 in the browser, that on computer B in the browser also is clicked on button 1, and also on computer C.
When i devided this process in 3 steps, i realized that none of them are things i've done before:
first thing is to get the click event out of the browser
second is to inform computer number B and C of the click event
third is to click a button in the browser of computer B and C
Three things i don't know how to accomplish (i have done some remoting in the past, maybe that can work for the communication between the three computers, but all i remember is that remoting did NOT become my friend)
So if you can give me any clue on how to catch browser events outside the browser, talk between two pc's and raise events in the browser from outside the browser, your help would be greatly appreciated.
EDIT:
i don't control the application. My client will use it to send multiple stock orders. so i think you can compare it with up-vote on a voting website
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这不是直接回答您的问题,但从业务和开发人员的角度来看,这是一个有效的答案。
除非您的客户愿意为开发时间付出高昂的代价,否则最好找出客户想要这个的原因并提供可能的替代方案。如果没有大量的工作,他们所要求的任务就无法完成。我不确定从哪里开始 - 可能使用 WinForms 应用程序中的 BrowserControl 编写我自己的浏览器,并使用 Remoting 来控制 WinForms 应用程序。
实际上,您最好更好地研究需求并提出可行的替代方案。成为一名优秀的开发人员/分析师/项目经理等的一部分是能够从客户所说的他们想要的东西中正确地推断出客户实际需要的东西。
可能他们只需要您跟踪某些内容的状态,并且您单独的浏览器需要自动刷新。或者 WinForms 可能不是适合这项工作的工具。或者它可能是完全不同的东西。哎呀,它可能就像只有一个浏览器一样简单,人们可以使用 VNC 或类似工具从另一台 PC“观看”该浏览器。
通常有多种方法可以满足业务需求,而无需关注困难的技术要求。 重要的是业务需求。如果你能找到另一种方法来解决这个问题,你就不需要在这类问题上浪费时间了。
作为补充说明,听到您甚至在寻找“如何做到这一点”而不理解原因,这让我感到畏缩。正确满足需求在开发中非常重要。大多数项目失败是因为需求沟通不充分。
I know this is not an answer directly to your question, but it is a valid answer from a business and developer standpoint.
Unless your client is willing to pay through the nose for development time, it would be better to find out WHY the client wants this and offer possible alternatives. What they're asking can't be done without a LOT of work. I'm not sure where I'd even start - probably writing my own browser using the BrowserControl in a WinForms app, and using Remoting to control the WinForms app.
Really, you're better off researching the requirement better and proposing an alternative that is doable. Part of being a good devloper/analyst/project manager, etc is to be able to correctly divine what the customer actually needs from what the customer SAYS they want.
It could be that they just need you to track the status of something and your separate browsers need to auto-refresh. Or it could be that WinForms is not the right tool for the job. Or it could be something completely different. Heck, it could be as simple as only having one browser, and people can "watch" that browser from another PC using VNC or a similar tool.
There are usually multiple ways to meet a business need without focusing on difficult technical requirements. It's the business need that matters. and if you can find another way to meet it, you won't need to spin your wheels on this type of question.
As an added note, it makes me cringe to hear that you're even looking for "how to do this" without understanding why. Getting the requirements right is SO important in development. Most projects fail because the communication of requirements was not adequate.
您想要做的事情看起来像“共享浏览”或“跟随我浏览”。
有一些问题需要问:
如果可以修改 Web 应用程序,您可以拥有所有客户端:
如果只有一个客户端是“主”,而所有其他客户端都是从,那么同步每个人应该很容易。
在多主机设置中,同步会稍微复杂一些,然后也许您将重新开发 Google Wave ;-)
现在,如果您需要能够在任何网站上进行共享浏览,那就要复杂得多。如果您的解决方案需要跨浏览器工作,那就更复杂了。您将需要为每个受支持的浏览器或所有受支持的操作系统的本机应用程序开发扩展。我建议您寻找已经具有共享浏览功能的现有解决方案。您还可以查看 VNC 系列解决方案(完整的桌面控制)。
我希望这对你有帮助,
杰罗姆·瓦格纳
What you want to do looks like 'shared browsing' or 'follow-me browsing'.
There are some questions that need to be asked :
If the web application can be modified, you could have all clients:
If only one of the client is "master" and all the others are slave, it should be easy enough to synchronise everyone.
In a multi-master setup, synchronisation will be a little more complicated, and then maybe you will be re-developing Google Wave ;-)
Now if you need to be able to do shared browing over any website, thats a lot more complicated. Even more complicated if your solution needs to work cross-browser. You will need to develop extensions for each supported browser or native applications for all supported OSes. I advise you to look for existing solutions that already do have the shared browsing feature. You can also take a look at the VNC family of solutions (full desktop control).
I hope this will help you,
Jerome Wagner