Jump to content

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


Recommended Posts

$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.

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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.

 
Link to comment
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")
Link to comment
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.

 
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...