Jump to content

Recommended Posts

Posted

Use the _IE functions. Its in the help file.

I searched it in help file yesterday,but I didnt find out the function I want to use

Can you tell me concrete function,thanks

One is never too old to learn

Posted

CODE
#include <GUIConstants.au3>

#include <IE.au3>

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()

#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\桌面\AForm2.kxf

$Form2 = GUICreate("Test", 764, 635, 195, 120)

GUISetIcon("D:\102.ico")

$Label1 = GUICtrlCreateLabel("网址:", 9, 56, 31, 20)

GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")

$URL = GUICtrlCreateInput("", 42, 56, 633, 21)

GUICtrlCreateGroup("", 0, 0, 754, 1)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Button1 = GUICtrlCreateButton("转到", 697, 56, 43, 25)

$Obj1_ctrl = GUICtrlCreateObj($oIE, 2, 96, 760, 516)

$Button2 = GUICtrlCreateButton("首页", 52, 16, 75, 25)

$Button3 = GUICtrlCreateButton("后退", 175, 16, 75, 25)

$Button4 = GUICtrlCreateButton("前进", 306, 16, 75, 25)

$Button5 = GUICtrlCreateButton("停止", 424, 16, 75, 25)

$Group1 = GUICtrlCreateGroup("", 0, 48, 760, 41)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$MenuItem1 = GUICtrlCreateMenu("设置(&Y)")

$MenuItem3 = GUICtrlCreateMenuItem("设定参数", $MenuItem1)

$MenuItem2 = GUICtrlCreateMenu("注册(&Z)")

$MenuItem4 = GUICtrlCreateMenuItem("注册", $MenuItem2)

$MenuItem5 = GUICtrlCreateMenuItem("关于", $MenuItem2)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

_IENavigate ($oIE, "http://www.slashmysearch.com/earn/id/34329",0)

$oInput = _IEGetObjByName ($Obj1_ctrl, "text")

$oclip = _IEGetObjByName ($Obj1_ctrl, "submit")

While 1

$nMsg = GUIGetMsg ( )

$readURL = GUICtrlRead ($URL)

;$oInput = _IEGetObjByName ($oIE, "query")

;$oclip = _IEGetObjByName ($oIE, "search")

;_IEAction ($oclip, "copy")

;_IEAction ($oInput, "paste")

Switch $nMsg

;case $Button1

;_IENavigate ($oIE, $readURL,0)

;Case $Button2

;_IENavigate ($oIE, "http://www.slashmysearch.com/earn/id/34329")

;GUICtrlSetData ($URL,"http://www.slashmysearch.com/earn/id/34329")

;Case $Button3

;_IEAction ($oIE, "back")

;Case $Button4

;_IEAction ($oIE, "forward")

;Case $Button5

;_IEAction ($oIE, "stop")

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

if use controlsend ,It must be a windows.otherwise ,how to know controlID

on top of codes:

I want to use _IEAction ($o_object,"paste"),Do you fell this way can be practicable?thanks

One is never too old to learn

Posted

You'll want _IEFormGetObjByName (or _IEFormGetCollection) and _IEFormElementGetObjByName and _IEFormElementSetValue

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

You'll want _IEFormGetObjByName (or _IEFormGetCollection) and _IEFormElementGetObjByName and _IEFormElementSetValue

Dale

I ll try it ,thanks

One is never too old to learn

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...