找回密码
 加入
搜索
查看: 2429|回复: 6

软件自动安装器的一些问题?(安装千千静听)

[复制链接]
发表于 2009-4-7 17:28:37 | 显示全部楼层 |阅读模式
软件自动安装器的一些问题?(安装千千静听)
软件自动安装器的一些问题?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-5-6 12:58:45 | 显示全部楼层
试试用窗口信息工具的坐标法。
发表于 2009-5-8 09:29:19 | 显示全部楼层
我也遇到了這種問題,不過是先取消全部再選中要的部分,但繼續安裝時取不起作用。
发表于 2009-5-15 11:23:18 | 显示全部楼层
单独的控件就是获取句柄,然后通过句柄在操作其中的子项就可以了。如果是控件嵌套控件的话,真没辙了。我就是遇到这样一个问题,哎,恼火,好像还没人遇到过似的,没人回答。等待中焦急啊。
发表于 2009-5-24 13:30:13 | 显示全部楼层
呵呵~用AU3吧~
发表于 2009-6-1 12:35:30 | 显示全部楼层
本帖最后由 registered 于 2009-6-1 12:37 编辑

这个千千静听很不人性化,控件不能用键操作,送个能操纵这个控件的安装代码,就是办法笨了点,在官方版5.3.1上能正常运行

#Include <GuiTreeView.au3>
#Include <File.au3>
Run("ttpsetup_531.exe")
WinWaitActive("千千静听","")
Send("s")
WinWaitActive("千千静听","")
Send("a")
WinWaitActive("千千静听","")
$hTreeView=ControlGetHandle("千千静听","","[CLASSNN:SysTreeView321]")
_GUICtrlTreeView_Expand($hTreeView,0,False)
$aCPos=ControlGetPos("千千静听","","[CLASSNN:SysTreeView321]")
Opt("MouseCoordMode",2)
_GUICtrlTreeView_ClickItem($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"在线歌词下载组件"),"left",True)
_ClickItem_CheckBox()
_GUICtrlTreeView_ClickItem($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"第三方音频组件"),"left",True)
_ClickItem_CheckBox()
_GUICtrlTreeView_ClickItem($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"千千音乐窗 (Unicode)"),"left",True)
_ClickItem_CheckBox()
_GUICtrlTreeView_ClickItem($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"TTPlayer控件 (Unicode)"),"left",True)
_ClickItem_CheckBox()
Opt("MouseCoordMode",1)
Send("!n")
WinWaitActive("千千静听","目标文件夹")
ControlSetText("千千静听","","[CLASSNN:Edit1]",@ProgramFilesDir & "\TTPlayer")
Send("!n")
WinWaitActive("千千静听","创建快捷方式")
ControlCommand("千千静听","","[CLASSNN:Button1]","Check","")
ControlCommand("千千静听","","[CLASSNN:Button2]","Check","")
ControlCommand("千千静听","","[CLASSNN:Button3]","UnCheck","")
ControlCommand("千千静听","","[CLASSNN:Button4]","Check","")
ControlClick("千千静听","","[CLASSNN:Button10]","left",1)
WinWaitActive("千千静听","完成")
ControlCommand("千千静听","","[CLASSNN:Button1]","UnCheck","")
ControlCommand("千千静听","","[CLASSNN:Button2]","UnCheck","")
ControlCommand("千千静听","","[CLASSNN:Button3]","UnCheck","")
ControlClick("千千静听","","[CLASSNN:Button14]","left",1)
WinWaitClose("千千静听")
FileCopy("TTPlayer.xml",@ProgramFilesDir & "\TTPlayer\")
FileDelete(@DesktopDir & "\千千音乐.url")

_FileWriteToLine(@ProgramFilesDir & "\TTPlayer\TTPlayer.XML",222,"                DownLoadFolder=""" & @ProgramFilesDir & "\TTPlayer\Lyrics\""",1)
_FileWriteToLine(@ProgramFilesDir & "\TTPlayer\TTPlayer.XML",268,"                CacheFolder=""" & @ProgramFilesDir & "\TTPlayer\Cache\""",1)
_FileWriteToLine(@ProgramFilesDir & "\TTPlayer\TTPlayer.XML",301,"                Folder=""" & @ProgramFilesDir & "\TTPlayer\Plugins\""",1)
_FileWriteToLine(@ProgramFilesDir & "\TTPlayer\TTPlayer.XML",313,"                EQCProfile=""" & @ProgramFilesDir & "\TTPlayer\Profile\1.tteq_cfg""",1)
_FileWriteToLine(@ProgramFilesDir & "\TTPlayer\TTPlayer.XML",314,"                LRCProfile=""" & @ProgramFilesDir & "\TTPlayer\Profile\1.ttlr_cfg""",1)
_FileWriteToLine(@ProgramFilesDir & "\TTPlayer\TTPlayer.XML",315,"                PLCProfile=""" & @ProgramFilesDir & "\TTPlayer\Profile\1.ttpl_cfg""",1)

Run(@ProgramFilesDir & "\ttplayer\ttplayer.exe")
WinWaitActive("千千静听","")
Send("{APPSKEY}{DOWN 2}{ENTER}")
WinWaitActive("千千静听 - 选项","")
$hTreeView=ControlGetHandle("千千静听 - 选项","","[CLASSNN:SysTreeView321]")
$aCPos=ControlGetPos("千千静听 - 选项","","[CLASSNN:SysTreeView321]")
Opt("MouseCoordMode",2)
   IF _GUICtrlTreeView_GetImageIndex($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"所有音频格式"))<>1 Then

      _GUICtrlTreeView_ClickItem($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"所有音频格式"),"left",True)
          _ClickItem_CheckBox()
   EndIf
Send("{DOWN 13}{RIGHT}")
_GUICtrlTreeView_ClickItem($hTreeView,_GUICtrlTreeView_FindItem($hTreeView,"MP4"),"left",True)
_ClickItem_CheckBox()
Opt("MouseCoordMode",1)
ControlClick("千千静听 - 选项","","[CLASSNN:Button16]","left",1)
ControlClick("千千静听 - 选项","","[CLASSNN:Button11]","left",1)
WinWaitClose("千千静听 - 选项","")
Send("{APPSKEY}x")
ProcessWaitClose ("TTPlayer.exe")

Func _ClickItem_CheckBox()
$aPos=MouseGetPos()
$aP1=-1
For $i= $aPos[0]-$aCPos[0] To 0 Step -2
    If $aP1=-1 Then
           If _GUICtrlTreeView_HitTest($hTreeView,$i,$aPos[1]-$aCPos[1])==2 Then
          $aP1=$i
           EndIf
        Else  
           If _GUICtrlTreeView_HitTest($hTreeView,$i,$aPos[1]-$aCPos[1])<>2 Then
              $aP1=($aP1+$i)/2
              ExitLoop
           EndIf
        EndIf   
Next
MouseClick("left",$aP1+$aCPos[0],$aPos[1])
EndFunc

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-6-4 16:25:35 | 显示全部楼层
楼主,把你的软件发给我好吗》?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-25 21:35 , Processed in 0.098189 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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