Ace08 Posted September 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
water Posted September 27, 2010 Share 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 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...
Ace08 Posted September 27, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
Tvern Posted September 27, 2010 Share 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. Link to comment Share on other sites More sharing options...
Ace08 Posted September 27, 2010 Author Share 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 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