|
楼主 |
发表于 2009-12-29 17:25:38
|
显示全部楼层
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=ico.ico
#AutoIt3Wrapper_outfile=雨人会员辅助工具.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#NOTRAYICON
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("雨人会员辅助工具", 244, 87, 753,59);创建一个主窗口
$Label1 = GUICtrlCreateLabel("姓 名", 16, 8, 42, 17);添加姓名标识
$Label2 = GUICtrlCreateLabel("身份证", 16, 32, 40, 17);添加身份证标识
$Label3 = GUICtrlCreateLabel("编 号", 16, 64, 42, 17);添加编号标识
$EDit1 = GUICtrlCreateInput("", 64, 8, 121, 21);创建一个文本提示框--姓名
$EDit2 = GUICtrlCreateInput("", 64, 32, 121, 21);创建一个文本提示框--身份证
$EDit3 = GUICtrlCreateInput("", 152, 56, 33, 21);创建一个文本提示框--查找
$Button1 = GUICtrlCreateButton("确定", 192, 8, 43, 25);创建一个确定按钮
$Button2 = GUICtrlCreateButton("查找", 192, 56, 41, 25);创建一个查找按钮
GUISetState(@SW_SHOW);
WinSetOnTop("雨人会员辅助工具","编 号",1);窗口置顶
$iniFile = @ScriptDir&"\UserDbf.ini";设置INI文件
While 1;
$msg = GUIGetMsg();捕获窗口消息
Select;
Case $msg = $GUI_EVENT_CLOSE;
ExitLoop;终止一个 While/Do/For 循环.
If GUICtrlRead($Edit3)="" Then;读取指定控件的状态或相关数据
MsgBox(0,"错误","请输入帐号");创建一个错误提示框
ContinueLoop;继续一个 While/Do/For 循环
EndIf;
Case $msg = $Button2;输入帐号点“确定”
$s_Msg = IniRead($iniFile,"UserMSG",GUICtrlRead($Edit3),"");读取ini中查找框里的内弄
$s_xm = StringLeft($s_Msg,StringInStr($s_Msg,",")-1);返回字符串中从左开始指定数量的字符.
$s_sfzh = StringTrimLeft($s_Msg,StringInStr($s_Msg,","));删除字符串中从左开始指定数量的字符
GUICtrlSetData($Edit2,$s_sfzh);修改指定控件的数据
GUICtrlSetData($Edit1,$s_xm);修改指定控件的数据
Case $msg = $Button1
ControlFocus ("控制台","RsPluginForm", "Edit1");设置输入焦点到指定窗口
ControlSetText("控制台","RsPluginForm", "Edit1", GUICtrlRead($EDit2));传送数据到...
Send("{ENTER}");回车
Sleep(2000);延时2秒
Send("{ENTER}");回车
EndSelect;
WEnd;
完工了 谢谢各位的帮助 |
评分
-
查看全部评分
|