darylb Posted April 6, 2009 Share Posted April 6, 2009 I have a program that that copies a range from excel and pastes it in a program our company has. How can I have AutoIt wait for windows to finishing its paste operation before continuing? Sometimes this paste takes 1 second and sometime it'll take 5-6 seconds. If i'm performing this operation hundreds or thousands of times, its much longer to take the safe route and pause for 7-8 seconds during every iteration. I'm using send("{ctrldown}v{ctrlup}") To paste Link to comment Share on other sites More sharing options...
PhilRip Posted April 6, 2009 Share Posted April 6, 2009 what about a !v (ctrl-v) hotkey? Link to comment Share on other sites More sharing options...
darylb Posted April 6, 2009 Author Share Posted April 6, 2009 I dont have trouble using the paste function. I just need a way for my macro to wait for the paste to finish. Some type of wait function? Link to comment Share on other sites More sharing options...
martin Posted April 6, 2009 Share Posted April 6, 2009 I have a program that that copies a range from excel and pastes it in a program our company has. How can I have AutoIt wait for windows to finishing its paste operation before continuing? Sometimes this paste takes 1 second and sometime it'll take 5-6 seconds. If i'm performing this operation hundreds or thousands of times, its much longer to take the safe route and pause for 7-8 seconds during every iteration. I'm using send("{ctrldown}v{ctrlup}") To paste Maybe you could send something like a tab or a shortcut after you have sent ^v to set the focus in the application to some other control than the one you are pasting into. I assume (means I don't know) that the focus won't change until the pasting is complete. You can then get the focused control using a loop with ControlGetFocus and when it is the one you set the focus to the pasting has finished. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2009 Share Posted April 6, 2009 try and use ControlCommand()'s Get the comtrol info from Autoit Window Info Tool Start > Program Files > Autoit > Autoit Window Info Tool I would try ControlSetText() it's almost Instantaneous See help! 8) Link to comment Share on other sites More sharing options...
darylb Posted April 6, 2009 Author Share Posted April 6, 2009 try and use ControlCommand()'sGet the comtrol info from Autoit Window Info ToolStart > Program Files > Autoit > Autoit Window Info ToolI would try ControlSetText() it's almost InstantaneousSee help!8)The only problem I worry about with this is that i'm not pasting a string of text but a copied range from excel Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 6, 2009 Share Posted April 6, 2009 The only problem I worry about with this is that i'm not pasting a string of text but a copied range from excelWhen you are doing it manually, how do you know the paste is done? What about the operation tells you it's done when you are actually at the keyboard doing it? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2009 Share Posted April 6, 2009 The only problem I worry about with this is that i'm not pasting a string of text but a copied range from excelControlSetText(.... ClipPut() )8) Link to comment Share on other sites More sharing options...
Teltech Posted April 6, 2009 Share Posted April 6, 2009 sleep(100) ??? Although I'm not sure this is what you really want, why does it take so long? resources boggin down, switching between the two programs take time? Try to look up these functions in the help. Winwait Winactivate etc... 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