Sign in to follow this  
Followers 0
Annonyreeder

Can you use _IEAction("","Copy") with a Input field?

8 posts in this topic

$o_frame = _IEFrameGetCollection($oIE, 3)
$o_form = _IEFormGetObjByName($o_frame, "main_form")
$oInput = _IEGetObjByName($o_form, "KEY.zResolveCategory")

_IEAction($oInput, "selectall")
_IEAction($oInput, "copy")

 

Can anyone tell me why this isnt woring? i need it to copy the field so i can paste it into another, Thanks

Ant.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If you run your script from SciTE, what do you get in the output pane? Any error messages?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Nah theres no errors, it just doesnt click/copy or select the field, though if i use IEElementsetData that works fine.

Edited by Annonyreeder

Share this post


Link to post
Share on other sites
Can anyone tell me why this isnt working?

"not working" means: The Clipboard is empty when your script ends? Does the content of the input field get selected?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

dumb question but did you focus on element before trying to sellect text?

 

ouh and small edit: i think sellect all is to sellect whall document if no focus so focus on specific object before that

 

 

and another edit:

test

#include <IE.au3>
Local $oIE_form = _IE_Example("form")
_IELoadWait($oIE_form)
$oInput = _IEGetObjByName($oIE_form, "textExample")
_IEAction($oInput,'focus')
_IEAction($oInput, "selectall")
;or
;~ $oInput.document.parentwindow.execScript("javascript:document.execCommand('selectAll',false,null)", "javascript")
_IEAction($oInput, "copy")
  Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Ahh no i wasnt focus first, i didn't realise i had to lol, thanks it works now :)

_IELoadWait($oIE)
$o_frame = _IEFrameGetCollection($oIE, 3)
$o_form = _IEFormGetObjByName($o_frame, "main_form")
$oInput = _IEGetObjByName($o_form, "KEY.zResolveCategory")
_IEAction ($oInput, "focus")
_IEAction ($oInput, "selectall")
_IEAction ($oInput, "copy")

Share this post


Link to post
Share on other sites

well i to did not know but when i look at java code, selecting something specific is done with OnClick event, so its just a normal thinking that when you click you get focus and text get sellected ;)

glad to be of help :P


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

_IEAction,

"selectall" Selects the entire document.

 

What makes you think it would select the contents of a form field?

It looks like you should be using _IEFormElementGetValue

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0