找回密码
 加入
搜索
查看: 7647|回复: 14

[求购] 50元人民币 IE影响在GUI上面输入内容寻解决方法

 火.. [复制链接]
发表于 2011-8-10 13:53:19 | 显示全部楼层 |阅读模式
悬赏1金钱未解决
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ie.au3>
$Form1        = GUICreate("Form1", 633, 454, 192, 114)
$oIE        = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 8, 8, 621, 400)
_IENavigate($oIE,"http://tool.admin5.com/dw/")
_IELoadWait($oIE)
$BTN = GUICtrlCreateButton("测试在第二个GUI输入文字", 176, 415, 219, 25)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $BTN
                        GUI2()
        EndSwitch
WEnd

;============================
Func GUI2()
        Local $Form_2 = GUICreate("我是第二个GUI", 316, 240, Default, Default,0,0,$Form1)
        Local $Label1 = GUICtrlCreateLabel("输入内容:", 16, 16, 64, 17)
        Local $BtnName = GUICtrlCreateInput("内容", 80, 16, 200, 21)
        Local $Edit1 = GUICtrlCreateEdit("", 80, 50, 200, 89)
        Local $Button1 = GUICtrlCreateButton("关闭", 184, 150, 75, 25)
        Local $Label1 = GUICtrlCreateLabel("左右方向键,退格键,删除键都不灵了,是什么原因呢?", 8, 180, 300, 17)
        GUISetState(@SW_SHOW)
        
        While 1
                Local $nMsg = GUIGetMsg()
                Switch $nMsg
                        Case $GUI_EVENT_CLOSE
                                ExitLoop
                        Case $Button1
                                ExitLoop
                EndSwitch
        WEnd
        GUIDelete($Form_2)
EndFunc
点击“测试”按扭,在“第二个GUI”界面的输入框输入内容时,左右方向键,退格键,删除键都不灵了,是什么原因呢?
高手可以解决,请联系QQ:1969196 (隐身) 电话:13549791330 陈

发表于 2011-8-10 14:10:57 | 显示全部楼层
帮顶。。俺试了下。可正常使用。。俺是03系统。。不知道帮助到你了没。。
 楼主| 发表于 2011-8-10 14:38:52 | 显示全部楼层
帮顶。。俺试了下。可正常使用。。俺是03系统。。不知道帮助到你了没。。
xyhqqaa 发表于 2011-8-10 14:10



    退格键,删除键都正常吗?
发表于 2011-8-10 16:17:47 | 显示全部楼层
完全可正常使用
发表于 2011-8-10 16:21:43 | 显示全部楼层
所以你还是自己去测试下 把。也许是你的系统问题。。祝你好运。
发表于 2011-8-10 16:24:58 | 显示全部楼层
解决了,回来联系我
发表于 2011-8-10 16:29:05 | 显示全部楼层
做什么用的学下
发表于 2011-8-10 17:32:18 | 显示全部楼层
本帖最后由 骗子 于 2011-8-10 17:35 编辑

在XP下测试了一下,的确有楼主所说的问题。个人感觉好像就是因为“http://tool.admin5.com/dw/”把一些键给抢了
想了两个变通的办法:
1、双进程,两个窗口独立的进程,测试没有问题
2、就是先把IE跳转到其他地方,等子窗口接收完内容以后再将IE切换到“http://tool.admin5.com/dw/

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ie.au3>


$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 8, 8, 621, 400)
_IENavigate($oIE, "http://tool.admin5.com/dw/")
_IELoadWait($oIE)
$BTN = GUICtrlCreateButton("测试在第二个GUI输入文字", 176, 415, 219, 25)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $BTN
                        GUISetState(@SW_HIDE) ;隐藏$Form1 
                        GUI2()
        EndSwitch
WEnd

;============================
Func GUI2()
                _IENavigate($oIE, "about:blank") ;跳转到空白页
        Local $Form_2 = GUICreate("我是第二个GUI", 316, 240, Default, Default,0,0,$Form1)
        Local $Label1 = GUICtrlCreateLabel("输入内容:", 16, 16, 64, 17,$ES_NOHIDESEL)
        Local $BtnName = GUICtrlCreateInput("内容", 80, 16, 200, 21)
        Local $Edit1 = GUICtrlCreateEdit("", 80, 50, 200, 89)
        Local $Button1 = GUICtrlCreateButton("关闭", 184, 150, 75, 25)
        Local $Label1 = GUICtrlCreateLabel("左右方向键,退格键,删除键都不灵了,是什么原因呢?", 8, 180, 300, 17)
        GUISetState(@SW_SHOW)
                
        While 1
                Local $nMsg = GUIGetMsg()
                Switch $nMsg
                        Case $GUI_EVENT_CLOSE
                                ExitLoop
                        Case $Button1
                                _IENavigate($oIE, "http://tool.admin5.com/dw/") ;切换回_IENavigate($oIE, "http://tool.admin5.com/dw/")
                                WinSetState ("Form1","",@SW_SHOW) ;显示$Form1 
                                ExitLoop
                EndSwitch
        WEnd
        GUIDelete($Form_2)
EndFunc   ;==>GUI2
发表于 2011-8-10 17:37:16 | 显示全部楼层

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ie.au3>


$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 8, 8, 621, 400)
_IENavigate($oIE, "http://tool.admin5.com/dw/")
_IELoadWait($oIE)
$BTN = GUICtrlCreateButton("测试在第二个GUI输入文字", 176, 415, 219, 25)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $BTN
                        GUISetState(@SW_HIDE) ;隐藏$Form1
                        GUI2()
        EndSwitch
WEnd

;============================
Func GUI2()
        _IENavigate($oIE, "about:blank") ;跳转到空白页
        Local $Form_2 = GUICreate("我是第二个GUI", 316, 240, Default, Default, 0, 0, $Form1)
        Local $Label1 = GUICtrlCreateLabel("输入内容:", 16, 16, 64, 17, $ES_NOHIDESEL)
        Local $BtnName = GUICtrlCreateInput("内容", 80, 16, 200, 21)
        Local $Edit1 = GUICtrlCreateEdit("", 80, 50, 200, 89)
        Local $Button1 = GUICtrlCreateButton("关闭", 184, 150, 75, 25)
        Local $Label1 = GUICtrlCreateLabel("左右方向键,退格键,删除键都不灵了,是什么原因呢?", 8, 180, 300, 17)
        GUISetState(@SW_SHOW)
        
        While 1
                Local $nMsg = GUIGetMsg()
                Switch $nMsg
                        Case $GUI_EVENT_CLOSE
                                ExitLoop
                        Case $Button1
                                _IENavigate($oIE, "http://tool.admin5.com/dw/") ;切换回_IENavigate($oIE, "http://tool.admin5.com/dw/")
                                WinSetState("Form1", "", @SW_SHOW) ;显示$Form1
                                ExitLoop
                EndSwitch
        WEnd
        GUIDelete($Form_2)
EndFunc   ;==>GUI2


评分

参与人数 1金钱 +30 收起 理由
fuldho + 30 很棒的见解

查看全部评分

 楼主| 发表于 2011-8-10 23:59:08 | 显示全部楼层
跳转IE的页面,会影响到编辑器中的内容,在实际应用中不可行。
发表于 2011-8-11 09:00:32 | 显示全部楼层
回复 10# chenzhi1210
跳转之前把内容读取出来,等最后需要的时候再放回去不就可以了
发表于 2011-8-11 10:02:54 | 显示全部楼层
这么多人热心帮助,围观了
 楼主| 发表于 2011-8-11 16:58:10 | 显示全部楼层
楼上的风行者帮我解决了!感谢大家的帮助!
 楼主| 发表于 2011-8-12 09:44:46 | 显示全部楼层
已经解决!谢谢大家!
发表于 2011-8-15 10:39:41 | 显示全部楼层
看来没有钱解决不了的问题,呵呵呵
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-2 17:31 , Processed in 0.076032 second(s), 18 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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