找回密码
 加入
搜索
查看: 3259|回复: 3

[IE类操作] 刚学几天实在弄不好,求帮助,100Q币(已解决)

[复制链接]
发表于 2012-6-14 20:58:24 | 显示全部楼层 |阅读模式
本帖最后由 tenlonjin 于 2012-6-15 15:20 编辑

#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_icon=C:\Windows\system32\SHELL32.dll|-138
#PRE_Outfile=kc.exe
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>;四个自带的gui
#include <Constants.au3>;托盘事件
Opt("GUIOnEventMode", 1);固定模式
Opt("TrayOnEventMode", 1);拖盘应用
Opt("TrayMenuMode", 1);系统托盘图标/菜单里面的事件
#Region ### START Koda GUI section ### Form=d:\本机工具\autoit3\scite\koda\forms\kc.kxf
$Form1_1 = GUICreate("卡充平台,联系18659991865", 467, 275, 197, 148, 0x04000000 + 0x00CF0000 )
$Group1 = GUICtrlCreateGroup("", 0, 0, 465, 36);分栏框
$Button1 = GUICtrlCreateButton("重登", 0, 8, 43, 25)
$Button2 = GUICtrlCreateButton("刷新", 50, 8, 43, 25)
$Button3 = GUICtrlCreateButton("锁机", 100, 8, 43, 25)
$Button4 = GUICtrlCreateButton("后退", 150, 8, 43, 25)
$Button5 = GUICtrlCreateButton("前进", 200, 8, 43, 25)
$Button6 = GUICtrlCreateButton("隐藏", 250, 8, 43, 25)
$Button7 = GUICtrlCreateButton("注册", 300, 8, 43, 25)
$Button8 = GUICtrlCreateButton("固定", 350, 8, 43, 25)
 楼主| 发表于 2012-6-14 21:02:02 | 显示全部楼层
注册功能不要
发表于 2012-6-14 23:26:01 | 显示全部楼层
这个,楼主说些什么可能效果回比较好。
还有论坛也有很多列子的哦,
100Q.........对大神来说不起眼的
大神一般看诚意
发表于 2012-6-15 00:02:07 | 显示全部楼层
本帖最后由 zerobin 于 2012-6-15 00:05 编辑

不知道楼主满意不
au3_exe_ico打包
#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_Icon=EXE.ico
#PRE_Compression=4
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <Misc.au3>
#include <WinAPI.au3>
HotKeySet("{f6}", "_xsgui")
Opt("GUIOnEventMode", 1)
Dim $Text, $Text2 = "", $URL = "http://844841.gnway.net:81"
Global $sd = 0, $jskl
$dll = DllOpen("user32.dll")
$GUIMain = GUICreate("free", 800, 560,-1,-1,$WS_SIZEBOX)
GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")
$button1 = GUICtrlCreateButton("刷新", 5, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$button2 = GUICtrlCreateButton("后退", 45, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$button3 = GUICtrlCreateButton("前进", 85, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$button4 = GUICtrlCreateButton("固定", 125, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$button5 = GUICtrlCreateButton("锁定", 165, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$button6 = GUICtrlCreateButton("隐藏", 205, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$button7 = GUICtrlCreateButton("重登", 245, 5, 40, 30)
GUICtrlSetOnEvent(-1,"_GUIMainbtclick")
$StateLab = GUICtrlCreateLabel("Label1", 8, 542, 1000, 17)
GUISetState(@SW_SHOW,$GUIMain)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 1, 40, 800, 500)
$EventObject = ObjEvent($oIE, "IEEvent_", "DWebBrowserEvents")
If @error Then Exit MsgBox(0, "错误!", "不可使用COM接口 'DWebBrowserEvents'. 错误代码: " & Hex(@error, 8))
$oIE.Navigate($URL)
Sleep(1000)
GUISwitch($GUIMain)
$form1 = GUICreate("设置解锁口令",200,100,-1,-1,$WS_EX_TOOLWINDOW)
$fomr1input1 = GUICtrlCreateInput("123456",10,10,100,20)
$fomr1button1 = GUICtrlCreateButton("设置",120,10,40,20)
GUICtrlSetOnEvent(-1,"_form1btclick")
GUISetState(@SW_HIDE,$form1)
$form2 = GUICreate("输入解锁口令解锁",200,100,-1,-1,$WS_EX_TOOLWINDOW)
$fomr2input1 = GUICtrlCreateInput("",10,10,100,20)
$fomr2button1 = GUICtrlCreateButton("解锁",120,10,40,20)
GUICtrlSetOnEvent(-1,"_form2btclick")
GUISetState(@SW_HIDE,$form2)
While 1
        Sleep(100)
WEnd
Func _form1btclick()
        Switch @GUI_CtrlId
                Case $fomr1button1
                        If GUICtrlRead($fomr1input1) <> "" Then 
                                $jskl = GUICtrlRead($fomr1input1)
                                GUICtrlSetData($fomr1input1,"")
                                GUISetState(@SW_HIDE,$form1)
                                GUISetState(@SW_SHOW,$form2)
                                GUICtrlSetData($fomr2input1,"")
                        Else
                                MsgBox(0+16,"错误","口令不允许为空")
                        endif
        EndSwitch
EndFunc
Func _form2btclick()
        Switch @GUI_CtrlId
                Case $fomr2button1
                        If GUICtrlRead($fomr2input1) = $jskl Then
                                GUISetState(@SW_HIDE,$form2)
                                GUISetState(@SW_SHOW,$GUIMain)
                                GUISetState(@SW_RESTORE,$GUIMain)
                                GUISwitch($GUIMain)
                                $sd = 0
                        Else
                                MsgBox(0+16,"错误","口令错误")
                        EndIf
        EndSwitch
EndFunc
Func _GUIMainbtclick()
        Switch @GUI_CtrlId
                Case $button1
                        _IEAction($oIE, "Refresh")
                Case $button2
                        _IEAction($oIE, "back")
                Case $button3
                        _IEAction($oIE, "forward")
                Case $button4
                        MsgBox(0, 0, "此按钮没处理")
                Case $button5
                        _sd()
                Case $button6
                        GUISetState(@SW_HIDE,$GUIMain)
                        MsgBox(0, 0, "F6还原窗口", 1)
                Case $button7
                        _IELinkClickByText($oIE, "退出")
        EndSwitch
EndFunc
Func _sd()
        $sd = 1
        GUISetState(@SW_HIDE,$GUIMain)
        GUISetState(@SW_SHOW,$form1)
EndFunc
Func _exit()
        Exit
EndFunc
Func _xsgui()
        If $sd = 0 Then 
        GUISetState(@SW_SHOW,$GUIMain)
        GUISetState(@SW_RESTORE,$GUIMain)
        GUISwitch($GUIMain)
        EndIf
EndFunc   ;==>_xsgui
Func IEEvent_StatusTextChange($Text)
        If $Text <> '' And StringLeft($Text, 4) = "http" Then $Text2 = $Text
        GUICtrlSetData($StateLab, $Text)
EndFunc   ;==>IEEvent_StatusTextChange

本帖子中包含更多资源

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

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-18 23:48 , Processed in 0.106384 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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