找回密码
 加入
搜索
查看: 1834|回复: 5

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

[复制链接]
发表于 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
发表于 2009-10-23 17:22:05 | 显示全部楼层
程序的标题是什么意思?是运行以后的窗口标题?
发表于 2009-10-23 17:30:59 | 显示全部楼层
_PathSplit
发表于 2009-10-23 17:33:15 | 显示全部楼层
StringSplit  这个复杂点!
发表于 2009-10-23 23:08:38 | 显示全部楼层
_PathSplit 好了
 楼主| 发表于 2009-10-24 08:23:31 | 显示全部楼层
不好意思 ! 可能是我表述不清,大家误会我的意思了!

我是想在点击浏览获得所需程序的路径后,然后启动该程序,得到这个程序的标题,并显示在$Input2 中!!~~~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 17:23 , Processed in 0.075056 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表