怎么随机选配置文件.ini的名字和卡号?
#NoTrayIcon#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_outfile=开卡助手1.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
$g_szVersion = "QQ:6546458809"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)
Opt("TrayAutoPause",0)
HotKeySet("!{a}", "man")
HotKeySet("!{x}", "wom")
HotKeySet("^!{F8}", "showmessage");Shift-Alt-d
;Global $i
$var = IniReadSection("second.ini", "config") ;从配置文件读取姓名身份证
While 1
Sleep(500)
WEnd
If @error Then
MsgBox(4096, "", "错误, 读取INI文件失败请检查,程序退出!")
Exit
EndIf
Func wom()
If WinExists("Pubwin 控制台","")=0 Then
MsgBox(16,"警告","请开Pubwin控制台后控确定!")
EndIf
For $i = 1 To $var ;循环从config字段读取
$aArray1 = StringSplit ($var[$i], "=") ;取姓名=身份证号部分,以=号为分隔符返回数组
$find=ControlListView("Pubwin 控制台","",'SysListView323',"FindItem", $aArray1);在控制台窗口找此号码,防重复
If Mod((StringLeft(StringRight($aArray1,2),1)),2)=0 And $find=-1 Then ;刷女卡且不重复
;MsgBox(0,"不重女卡"&$aArray1,$aArray1)
ControlSend("Pubwin 控制台","","Edit1",$aArray1)
WinActivate("Pubwin 控制台","")
Send("{enter}")
WinWait("","第二代身份证",5)
ControlSend("","第二代身份证","Edit3",$aArray1)
ControlSend("","第二代身份证","Edit4",$aArray1)
ControlClick("","第二代身份证","Button1",'left',2)
ExitLoop ;退出FOR
EndIf
Next
EndFunc ;==>>wom
Func man()
If WinExists("Pubwin 控制台","")=0 Then
MsgBox(16,"警告","请开Pubwin控制台后控确定!")
EndIf
For $i = 1 To $var ;循环从config字段读取
$aArray1 = StringSplit ($var[$i], "=") ;取姓名=身份证号部分,以=号为分隔符返回数组
$find=ControlListView("Pubwin 控制台","",'SysListView323',"FindItem", $aArray1);在控制台窗口找此号码,防重复
If Mod((StringLeft(StringRight($aArray1,2),1)),2)=1 And $find=-1 Then ;刷女卡且不重复
;MsgBox(0,"不重男卡"&$aArray1,$aArray1)
ControlSend("Pubwin 控制台","","Edit1",$aArray1)
WinActivate("Pubwin 控制台","")
Send("{enter}")
WinWait("","第二代身份证",5)
ControlSend("","第二代身份证","Edit3",$aArray1)
ControlSend("","第二代身份证","Edit4",$aArray1)
ControlClick("","第二代身份证","Button1",'left',2)
ExitLoop ;退出FOR
EndIf
Next
EndFunc ;==>>man
Func showmessage()
$e=MsgBox(1,"开卡助手","您要退出吗?")
If $e=1 Then
Exit
EndIf
EndFunc ;==showmessage这个代码现在是按顺序选择男卡或女卡
我想知道的是怎么让它随机选择second.ini里随机一张男卡或者女卡
希望达人们指点一下 For $i = 1 To $var ;循环从config字段读取
Next
改为:
While 1
$i = Random(1, $var, 1)
Wend 请问楼上的这个方法会重复选卡吗? 而且不行 改动了就出错了 要想不重复选卡 首选得把读出来的卡号跟数据库对比一下,我做的免刷卡就是这个原理,出来的卡不会有重复
页:
[1]