douyujun0152 2009-10-28 01:59
浏览 62
已采纳

PHP可用于控制GUI应用程序吗?

Suppose I have a GUI-only application that runs on Windows and I'd like to create a web interface for it using PHP. Is it even possible? I know I can use functions like system() or exec() to launch programs, but can I have more control over a running GUI app? Primarily, I would like to be able to send it keystrokes, so I can use it to process a file, save the output, and exit.

Please point me in the right direction.

  • 写回答

8条回答 默认 最新

  • dp19001 2009-10-28 02:41
    关注

    You can definitely do it, but it would take a bit of hackery. One way to do it would be to write a Windows command-line app that would send button clicks and such to the Windows GUI app. You then call this command-line app using PHP and the exec and system calls.

    For example, if you were passing it say, Firefox, you would have a firefox-wrapper app that could be called like this:

    firefox-wrapper open-url http://stackoverflow.com
    firefox-wrapper press-back
    ...
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(7条)

报告相同问题?

悬赏问题

  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件