你说的没错~百度~~只是论坛里~~这方面知识和教程都少~或者说没有!!!
TC应该可以出多点这方面的知识~~~
应该出一些像官网简单脚本视频(办公类)~~或者一些小源码~这样就可以大家学习了作者: cylhb 时间: 2013-10-17 20:44
确实,不过学这种东西,搜索能力很重要,要善于搜索。作者: ief675037 时间: 2013-10-24 17:45
不行呀!TC 4.200beta 一点击开始按钮就停止工作了??作者: mxxgmxxg 时间: 2013-10-30 17:10
这段代码一运行就会报错,不信你试试!还是按键精灵好,不会报错作者: mxxgmxxg 时间: 2013-10-30 17:12
Sub ShutdownExcel
VBSBegin
Set obj = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set List = obj.ExecQuery ("Select * from Win32_Process Where Name = 'EXCEL.EXE'")
For Each objProcess in List
objProcess.Terminate()
Next
VBSEnd
End Sub
Sub OnScriptExit()
ShutdownExcel
End Sub
ShutdownExcel
sIniFile="C:\Users\Administrator\Desktop\Book1.ini"
UserVar iDelay=DropList{"0.5秒":"500"|"1秒":"1000"|"1.5秒":"1500"|"2秒":"2000"|"3秒":"3000"|"5秒":"5000"}=1000 "设置延时"
Set xlApp = CreateObject("Excel.Application")
xlApp.visible = true
Set xlBook = xlApp.Workbooks.Open("C:\Users\Administrator\Desktop\Book1.xls")
Set xlSheet = xlBook.sheets("Sheet1")
nEndLine = xlsheet.UsedRange.SpecialCells(11).Row
nStartLine = InputBox("请输入起始行号:","" , 2)
nEndLine = InputBox("请输入结束行号:", "", xlSheet.UsedRange.SpecialCells(11).Row)
xlApp.Visible = False
Delay 1000
For i = nStartLine To nEndLine
未发现运行环境,请安装微软拼音2.0以上版本!= xlsheet.Range("A" & i).Value
未发现运行环境,请安装微软拼音2.0以上版本!= xlsheet.Range("B" & i).Value
flag = xlsheet.Range("C" & i).Value
If flag <> "ok" Then
Call Plugin.Msg.ShowScrTXT(0, 0, 1024, 768, "第" & i & "行正在处理。", "0000FF")
DoSomeWorks
Call Plugin.Msg.ShowScrTXT(0, 0, 1024, 768, "第" & i & "行已处理。", "0000FF")
xlsheet.Range("C" & i).Value = "ok"
xlsheet.Range("D" & i).Value = now
xlBook.Save
End If
Next
xlApp.Quit
ExitScript
Sub DoSomeWorks
If GetPoint("ssd",sIniFile) Then
LockMouse
//输入位置 [ssd] 的操作
LeftClick 1
Delay 200
SayString 未发现运行环境,请安装微软拼音2.0以上版本!
UnlockMouse
Delay iDelay
End If
If GetPoint("fdfg",sIniFile) Then
LockMouse
//输入位置 [fdfg] 的操作
LeftClick 1
Delay 200
SayString 未发现运行环境,请安装微软拼音2.0以上版本!
UnlockMouse
Delay iDelay
End If
End Sub
Function GetPoint(sPointName,sIniFile)
GetPoint =false
sRegion=Plugin.File.ReadINI(sPointName, "点位置", sIniFile)
If sRegion="" then
MsgBox "设置""" & sPointName & """点位置", vbInformation Or vbSystemModal, "提示"
Delay 500
sTemp = Plugin.QM_GetPoint.GetPoint()
sRegion = sTemp
Plugin.File.WriteINI sPointName, "点位置", sTemp, sIniFile
sArrayRegion = Split(sTemp, "|")
Plugin.File.WriteINI sPointName, "RegionX", sArrayRegion(0), sIniFile
Plugin.File.WriteINI sPointName, "RegionY", sArrayRegion(1), sIniFile
End if
If sRegion<>"" then
x=Cint(Plugin.File.ReadINI(sPointName, "RegionX", sIniFile))
y=Cint(Plugin.File.ReadINI(sPointName, "RegionY", sIniFile))
MoveTo x,y
Delay 100
GetPoint=true
Else
MsgBox "没有设置要找的""" &sPointName & """点位置"
End if
End Function
Function WaitMyPic(sPicName,sIniFile,nDelay)
WaitMyPic=true
wait=0
Do While Not FindMyPic(sPicName, sIniFile )
Wait = Wait + 1
If Wait > 20 Then
WaitMyPic=False
Exit Do
End If
Delay nDelay
Loop
End Function
Function FindMyPic(sPicName, sIniFile)
FindMyPic = False
sPic = Plugin.File.ReadINI(sPicName, "图片", sIniFile)
If sPic = "" Then
MsgBox "设置""" & sPicName & """图片", vbInformation Or vbSystemModal, "提示"
Delay 500
sPic = Plugin.QM_SetFindPic.GetFindPic()
If sPic <> "" Then
Plugin.File.WriteINI sPicName, "图片", sPic, sIniFile
'//图片尺寸
Delay 500
sTemp = Plugin.QM_SetFindPic.GetPicSize(sPic)
sArraySize = Split(sTemp, "|")
Plugin.File.WriteINI sPicName, "PicWidth", sArraySize(0), sIniFile
Plugin.File.WriteINI sPicName, "PicHeight", sArraySize(1), sIniFile
Plugin.File.WriteINI sPicName, "RegionX1", "0", sIniFile
Plugin.File.WriteINI sPicName, "RegionY1", "0", sIniFile
Plugin.File.WriteINI sPicName, "RegionX2","0", sIniFile
Plugin.File.WriteINI sPicName, "RegionY2", "0", sIniFile
End If
End If
If sPic <> "" Then
x1 = CInt(Plugin.File.ReadINI(sPicName, "RegionX1", sIniFile))
y1 = CInt(Plugin.File.ReadINI(sPicName, "RegionY1", sIniFile))
x2 = CInt(Plugin.File.ReadINI(sPicName, "RegionX2", sIniFile))
y2 = CInt(Plugin.File.ReadINI(sPicName, "RegionY2", sIniFile))
If x1 = x2 and y1 = y1 Then
MsgBox "设置""" & sPicName & """图片查找区域", vbInformation Or vbSystemModal, "提示"
'//查找图片的区域
Delay 500
sTemp = Plugin.QM_SetFindPic.GetFindRegion()
If sTemp <> "" Then
sArrayRegion = Split(sTemp, "|")
Plugin.File.WriteINI sPicName, "RegionX1", sArrayRegion(0), sIniFile
Plugin.File.WriteINI sPicName, "RegionY1", sArrayRegion(1), sIniFile
Plugin.File.WriteINI sPicName, "RegionX2", sArrayRegion(2), sIniFile
Plugin.File.WriteINI sPicName, "RegionY2", sArrayRegion(3), sIniFile
x1 = CInt(sArrayRegion(0))
y1 = CInt(sArrayRegion(1))
x2 = CInt(sArrayRegion(2))
y2 = CInt(sArrayRegion(3))
End If
End If
If x1 <> x2 OR y1 <> y2 Then
Width = CInt(Plugin.File.ReadINI(sPicName, "PicWidth", sIniFile))
Height = CInt(Plugin.File.ReadINI(sPicName, "Picheight", sIniFile))
FindPic x1, y1, x2, y2, sPic, 0.9, intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX + Width / 2, intY + Height / 2
Delay 500
FindMyPic = True
End If
Else
MsgBox "没有设置图片的查找区域", vbInformation Or vbSystemModal, "提示"
End If
Else
MsgBox "没有设置要找的""" & sPicName & """图片", vbInformation Or vbSystemModal, "提示"
End If
End Function 作者: xkc06zc 时间: 2013-11-7 10:52
楼上是按键精灵吧?我强烈要求版主开一个办公交流版块。我们搞办公的用TC确实太缺少资源了。作者: haowork 时间: 2013-11-12 16:20
真的是不行,一运行就出错,TC功能好多出错啊作者: haowork 时间: 2013-11-12 16:36
我发现即使是简单的功能,TC都有可能出错,按键很少,这方面来讲,TC要加油啊作者: moist26 时间: 2014-4-25 00:12 本帖最后由 moist26 于 2014-4-25 00:22 编辑