Giter VIP home page Giter VIP logo

Comments (9)

GaoYuan522 avatar GaoYuan522 commented on July 16, 2024 3

恰好我也需要这个功能,就用ChatGLM4生成了下,AI太强了https://github.com/H1DDENADM1N/CapsWriter-Offline

为什么我的ChatGPT4都写不出来这么华丽的GUI😭

from capswriter-offline.

H1DDENADM1N avatar H1DDENADM1N commented on July 16, 2024 3

为什么我的ChatGPT4都写不出来这么华丽的GUI😭

prompt的艺术😆,要先让它角色扮演成为专业的软件工程师

from capswriter-offline.

H1DDENADM1N avatar H1DDENADM1N commented on July 16, 2024 1

你速度好快😂,我还打算晚上写一个来着。 建议你干脆重新弄个库,把这个gui开源出来,再问问作者能不能把你的仓库的链接放到readme

恰好我也需要这个功能,就用ChatGLM4生成了下,AI太强了https://github.com/H1DDENADM1N/CapsWriter-Offline

from capswriter-offline.

HaujetZhao avatar HaujetZhao commented on July 16, 2024

虚拟桌面

from capswriter-offline.

qmzmdqs avatar qmzmdqs commented on July 16, 2024

可以看看 https://github.com/winsw/winsw ,包装成 Windows 服务。当然软件原本就带了 winsw 的配置就最好了。

from capswriter-offline.

wjz2001 avatar wjz2001 commented on July 16, 2024

虚拟桌面

我在网上教程和chatgpt的帮助写了一个python程序,基本实现了我说的功能,请您将其加入源代码中。

import tkinter as tk
import pystray
from PIL import Image
import subprocess
from queue import Queue

class GUI:
    def __init__(self):
        self.root = tk.Tk()
        self.root.title('演示窗口')
        self.root.geometry("500x200+1100+150")
        self.root.protocol('WM_DELETE_WINDOW', self.hide_window)
        self.create_systray_icon()
        self.interface()
        self.output_queue = Queue()
        self.start_test_script()
        self.hide_window()

    def interface(self):
        self.text_box = tk.Text(self.root, wrap="word")
        self.text_box.pack(expand=True, fill="both")

    def create_systray_icon(self):
        menu = (
            pystray.MenuItem('显示', self.show_window, default=True),
            pystray.Menu.SEPARATOR,
            pystray.MenuItem('退出', self.quit_window))
        image = Image.open("ICO.ico")
        self.icon = pystray.Icon("icon", image, "图标名称", menu)
        threading.Thread(target=self.icon.run, daemon=True).start()

    def hide_window(self):
        self.root.withdraw()

    def show_window(self):
        self.icon.visible = True
        self.root.deiconify()

    def quit_window(self, icon: pystray.Icon):
        icon.stop()
        self.root.quit()
        self.root.destroy()

    def start_test_script(self):
        # 启动test.py并将输出重定向到队列
        process = subprocess.Popen(['python', 'test.py'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
        threading.Thread(target=self.enqueue_output, args=(process.stdout,), daemon=True).start()
        self.root.after(100, self.update_text_box)

    def enqueue_output(self, out):
        for line in out:
            self.output_queue.put(line)

    def update_text_box(self):
        # 从队列中获取输出并显示在文本框中
        while not self.output_queue.empty():
            line = self.output_queue.get()
            self.text_box.insert("end", line)
            self.text_box.see("end")  # 滚动文本框以显示最新输出
        self.root.after(100, self.update_text_box)

if __name__ == '__main__':
    a = GUI()
    a.root.mainloop()

from capswriter-offline.

HaujetZhao avatar HaujetZhao commented on July 16, 2024

我在网上教程和chatgpt的帮助写了一个python程序,基本实现了我说的功能,请您将其加入源代码中。

两年内不考虑集成 GUI,这东西不是说加就加,而是加上以后新的需求就更不断了。

from capswriter-offline.

H1DDENADM1N avatar H1DDENADM1N commented on July 16, 2024

@wjz2001 试试我这个 #53

start_server_and_client_in_tray

from capswriter-offline.

wjz2001 avatar wjz2001 commented on July 16, 2024

@wjz2001 试试我这个 #53

start_server_and_client_in_tray start_server_and_client_in_tray

你速度好快😂,我还打算晚上写一个来着。
建议你干脆重新弄个库,把这个gui开源出来,再问问作者能不能把你的仓库的链接放到readme

from capswriter-offline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.