Last active
July 27, 2024 17:15
-
-
Save mistic100/13540de47d1a588033f9ae81df7fce55 to your computer and use it in GitHub Desktop.
Starts qBitorrent after prompting for the listening port
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GUIConstantsEx.au3> | |
#include <StaticConstants.au3> | |
#include <WindowsConstants.au3> | |
#include <Misc.au3> | |
$exeFile = "C:\Program Files\qBittorrent\qbittorrent.exe" | |
Opt("TrayIconHide", 1) | |
GUICreate("qBitorrent", 200, 75, -1, -1, BitOR($WS_SYSMENU, $WS_POPUP, $WS_CAPTION)) | |
GUISetFont(12, 400, 0, "Segoe UI") | |
$VariableInput = GUICtrlCreateInput("", 5, 5, 190, 30) | |
$ExitButton = GUICtrlCreateButton("OK", 5, 40, 190, 30) | |
GUISetState(@SW_SHOW) | |
Func Done() | |
$port = GUICtrlRead($VariableInput) | |
Run($exeFile & " --torrenting-port=" & $port) | |
Exit | |
EndFunc | |
While 1 | |
$nMsg = GUIGetMsg() | |
Switch $nMsg | |
Case $GUI_EVENT_CLOSE | |
Exit | |
Case $ExitButton | |
Done() | |
Case $VariableInput | |
If _IsPressed('0D') Then Done() | |
EndSwitch | |
WEnd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment