雨林GG 发表于 2009-10-23 16:57:53

如何在浏览文件后,自动添写程序标题?

请教各位兄弟:

    想在浏览得到EXE文件路径后,如何获得该程序的完整标题?!

谢谢指教!!!


#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=d:\program files\autoit3\gui_designer1.7.0.8汉化版\forms\问题123.kxf
$Form1_1 = GUICreate("Form1", 513, 69, 195, 125)
$Input1 = GUICtrlCreateInput("", 77, 8, 355, 21)
$Label1 = GUICtrlCreateLabel("程序路径:", 13, 12, 64, 17)
$Label2 = GUICtrlCreateLabel("程序标题:", 13, 42, 64, 17)
$Input2 = GUICtrlCreateInput("", 77, 38, 415, 21)
$Button1 = GUICtrlCreateButton("浏览", 440, 7, 52, 22, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        $Path = FileOpenDialog("打开", "", "可执行文件(*.exe)|所有文件(*.*)", 3, "")
                        If FileExists($Path) Then
                                GUICtrlSetData($Input1, $Path)
                        EndIf

        EndSwitch
WEnd

wisly 发表于 2009-10-23 17:22:05

程序的标题是什么意思?是运行以后的窗口标题?

131738 发表于 2009-10-23 17:30:59

_PathSplit

131738 发表于 2009-10-23 17:33:15

StringSplit这个复杂点!

sxd 发表于 2009-10-23 23:08:38

_PathSplit 好了

雨林GG 发表于 2009-10-24 08:23:31

不好意思 ! 可能是我表述不清,大家误会我的意思了!

我是想在点击浏览获得所需程序的路径后,然后启动该程序,得到这个程序的标题,并显示在$Input2 中!!~~~
页: [1]
查看完整版本: 如何在浏览文件后,自动添写程序标题?