本页主题: [原]自动点击未注册total commander启动画面上按钮的脚本 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

galilette
级别: 嘉宾


精华: 30
发帖: 2139
威望: 1382 点
金钱: 0 静电币
支持度: 0 点
在线时间:3012(小时)
注册时间:2002-05-01
最后登录:2019-03-12

 [原]自动点击未注册total commander启动画面上按钮的脚本

total commander是一款优秀的文件管理软件. 未注册版除了启动的时候有一个nag screen, 需要用户点击一个随机的按钮外, 没有任何功能上的限制.

下面是一个简单的autoit3的脚本, 放在totalcmd的目录里运行即可. autoit是一个免费的语法类似basic的脚本语言, 请自行google

Quote:

; starttc.au3: an autoit script to get rid of tc's nag screen
; put this in the same dir as tc bin
; by galilette@doggiehome

$tc_cmd=@ScriptDir&"\totalcmd.exe"

; enable advanced title matching mode so we can use classname
AutoItSetOption ("WinTitleMatchMode", 4)

; exec tc first
Run($tc_cmd)

; wait for the nag screen
$nag="classname=TNASTYNAGSCREEN"
WinWaitActive ($nag)

; classnn of the control containing the info about which button to click
; is "TPanel2". the classnn of the actual button to click is TButton?,
; where `?' + text_of_TPanel2 = 4
$button_to_click = "TButton"&(4 - ControlGetText ($nag,"","TPanel2"))

; send the click
ControlClick ($nag,"",$button_to_click)


Edit@02/15/2006: an updated script is quoted below, the reason for modification is included
Quote:

; starttc.au3: an autoit script to get rid of tc's nag screen
; put this in the same dir as tc bin
; by galilette@doggiehome
; Last modified: 2/15/2006

$tc_cmd=@ScriptDir&"\totalcmd.exe"

; enable advanced title matching mode so we can use classname
AutoItSetOption ("WinTitleMatchMode", 4)

; exec tc first
Run($tc_cmd)

; wait for the nag screen, and
; classnn of the control containing the info about which button to click
; is "TPanel2". the classnn of the actual button to click is TButton?,
; where `?' + text_of_TPanel2 = 4
$nag="classname=TNASTYNAGSCREEN"

; !!!!!!!!!
; modification:
; build a loop since from v6.54 on (?) the nag screen and the splash screen confuses autoit
$c=0
Do
WinWaitActive($nag)
$i=ControlGetText ($nag,"","TPanel2")
$c=$c+1
Until NOT ($i="")
; if autoit get confused, $i would be an empty string instead of a valid number
; but do not try using `IsNumber($i)'---seems it's always NOT a number even if it gets a value

$button_to_click="TButton"&(4-$i)

; send the click
ControlClick ($nag,"",$button_to_click)
; uncomment the following to see actually how the do loop works
;msgbox (0,"faint!","it really get looped for "&$c&" times")
[ 此贴被galilette在2006-02-15 05:38重新编辑 ]
Posted: 2005-07-07 01:27 | [楼 主]
帖子浏览记录 版块浏览记录
狗狗静电BBS - wwW.DoGGiEhoMe.CoM » 电脑全方位 Computer Guide

沪ICP备05008186号
Powered by PHPWind Styled by MagiColor