tray-launcher
Windowsのタスクトレイからスクリプトを実行できるランチャーです。
GNOME Shell ExtensionのArgosのような使い方ができて便利です。
https://github.com/Jayich-Lab/tray-launcher
2025-02-25
起動時にPythonのウィンドウが開きっぱなしになってしまうことがあった。
まだ報告されていないようだ。複数の環境で発生したが、再現性はないかもしれない。
https://github.com/Jayich-Lab/tray-launcher/issues
以下のソフトが動作したので取り急ぎ切り替えた。
https://github.com/zozonteq/task-tray-launcher
自分でPowerShellで作るのもよいかもしれない。
2025-02-25
作ってみました。
https://ktkr3d.github.io/2025/02/25/Script-Launcher/
環境
- Windows 11
- python 3.13.1
- pip 24.3.1
- tray-launcher v1.0.9
構築
- インストール可能なPythonのバージョンを確認
winget search --id=Python.Python
- Pythonをインストール
管理者モード winget install -e -i --id=Python.Python.3.13 --source=winget --scope=machine
- tray-launcherをインストール
管理者モード pip install tray-launcher
実行
- tray-launcherの実行
launcher run
shell:startup
にショートカットを作成して自動起動にする。 - BATスクリプトを格納
格納先は%USERPROFILE%\.tray_launcher\scripts
。 - ダウンロードフォルダのPNG画像をサーバにSCPでアップロードするスクリプト 日本語を含む場合はSJISで格納する。
%USERPROFILE%\.tray_launcher\scripts\Upload.bat wt.exe -w UPLOAD -p "コマンド プロンプト" cmd.exe /c "scp.exe %USERPROFILE%\Downloads\*.png ubuntu@192.168.11.2:/mnt/d/home/Upload && del %USERPROFILE%\Downloads\*.png & set /P x= & exit 0"
- Wingetでソフトウェアをアップグレードするスクリプト
%USERPROFILE%\.tray_launcher\scripts\Winget Upgrade.bat wt.exe -w UPLOAD -p "コマンド プロンプト" cmd.exe /c "winget upgrade --all & set /P x= & exit 0"
利用
- タスクトレイのアイコンを右クリックして
Start a Script
、Upload
を選択する - 処理が終わったらEnterキー押下で閉じる
Comment