Annonyreeder Posted May 31, 2013 Share Posted May 31, 2013 $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 More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 (edited) If you run your script from SciTE, what do you get in the output pane? Any error messages? Edited May 31, 2013 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Annonyreeder Posted May 31, 2013 Author Share Posted May 31, 2013 (edited) Nah theres no errors, it just doesnt click/copy or select the field, though if i use IEElementsetData that works fine. Edited May 31, 2013 by Annonyreeder Link to comment Share on other sites More sharing options...
water Posted May 31, 2013 Share Posted May 31, 2013 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bogQ Posted May 31, 2013 Share Posted May 31, 2013 (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 May 31, 2013 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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 More sharing options...
Annonyreeder Posted May 31, 2013 Author Share Posted May 31, 2013 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 More sharing options...
bogQ Posted May 31, 2013 Share Posted May 31, 2013 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 TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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 More sharing options...
DaleHohm Posted May 31, 2013 Share Posted May 31, 2013 _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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now