Ace08 2 Posted September 27, 2010 Hi guys im new in this forum and apparently new with autoit, im just wondering because i made a script to copy text in a file and these text can be either to many or just a few then paste them on a notepad the thing is even if the script isn't finished with copying it starts to paste it in the notepad. my question is, is there a way for autoit to pause then resume after it fully copies the text? i've tried sleep but there are times its not enough and a high number for sleep can be a pain if the script is only copying 2 or 3 words... would appreciate your help and thanks in advance Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites
water 2,387 Posted September 27, 2010 Welcome on this forum! To make it help you easier could you please post the code you have so far? Use the autoit-tags to enclose the code (click on the square blue icon with an A above the text box) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
Ace08 2 Posted September 27, 2010 (edited) Thanks water for the quick reply here is the code i've used sofar most of them are sendkeys sendkeys #include <IE.au3> $sURL = "C:\AutoitScripts\global.html" $oIE = _IECreate($sURL) SendKeepActive("C:\AutoitScripts\global.html") Send("+{F10}") Sleep (150) Send ("{A}") Sleep (1500) Send("+{F10}") Sleep (150) Send ("{C}") Sleep (10000) Run("notepad.exe") WinWait("[CLASS:Notepad]") SendKeepActive("[CLASS:Notepad]") Sleep (10000) Sleep (150) Send("!e") Sleep (150) Send("p") if possible i would like to change sleep (10000) since the files can have large amount of texts or otherwise... also although the file is an html file it contains only texts.... Edited September 27, 2010 by Ace08 Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites
Tvern 11 Posted September 27, 2010 How does this work for you? #include <IE.au3> $sURL = "C:\AutoitScripts\global.html" $oIE = _IECreate($sURL) $sText = _IEPropertyGet($oIE,"innertext") ;save all visible text to a variable. Run("notepad.exe") $hWnd = WinWait("[CLASS:Notepad]") ControlSetText($hWnd,"","Edit1",$sText) ;place the text into the edit control of notepad. Share this post Link to post Share on other sites
Ace08 2 Posted September 27, 2010 whoa! thanks a lot Tvern not only the sleep command were removed but this is also short Thanks a lot.... i'm loving autoit Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites