検索条件
全1件
(1/1ページ)
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("BTScan Tool", 623, 75, 192, 114)
GUISetFont(9, 400, 0, "MS Pゴシック")
$inputFolder = GUICtrlCreateInput("", 8, 8, 489, 20)
$buttonReset = GUICtrlCreateButton("カウンタリセット", 456, 40, 161, 25)
$buttonFolderSet = GUICtrlCreateButton("フォルダ名セット", 504, 8, 113, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Run("c:\\hogehoge\\BTScan\\BTScan.exe")
WinWaitActive("[Class:#32770]")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $buttonFolderSet
$org = ControlGetText("BTScan 3", "", 1000)
$newFolder = GUICtrlRead($inputFolder)
$newPath = StringRegExpReplace($org, "^(.*?)\\([^\\]*)$", "$1\\" & $newFolder)
ControlSetText("BTScan 3", "", 1000, $newPath)
Case $buttonReset
ControlSetText("BTScan 3", "", 1005, "1")
EndSwitch
WEnd
これを実行すると、ボタン2つテキストボックス1つのフォームがBTScanと共に立ち上がる。hogehogeは適当に読み替えて欲しい。例外処理とかは全く考慮無し。