Guy_ Posted October 10, 2012 Share Posted October 10, 2012 (edited) I'm pasting a URL into WordPad and after some commands I want just the URL to be automatically reselected. Because of text under it and varying length urls that may split, I've only been able to do it perfectly with a loop that does Shift+{RIGHT} for each character in WordPad. However, depending upon url length, remarkably it is taking from 2 to maybe 5 seconds. Could I speed this up somehow? I was expecting this to be instant... This is my loop: Local $i = 0 While $i < $lengthURL Send("+{RIGHT}") $i = $i + 1 WEnd Are other loop techniques faster maybe? Is there an "accelerate" command? (I've tried other tricks by adding a @CR before the url first, putting it on its own line and using Shift+End and Shift+Down, but I still can't get that to work perfectly every single time, so a faster loop would seem to be ideal) Thanks! Edited October 10, 2012 by Guy_ Link to comment Share on other sites More sharing options...
water Posted October 10, 2012 Share Posted October 10, 2012 You could use AutoItSetOption("SendKeyDelay", 0)at the beginning of your script to reduce the wait time between the Send commands. 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...
Guy_ Posted October 10, 2012 Author Share Posted October 10, 2012 Thx! I had my hopes up, but if it's faster, it doesn't seem so by very much... Link to comment Share on other sites More sharing options...
Guy_ Posted October 10, 2012 Author Share Posted October 10, 2012 Seems about the same speed as when I keep down these keys manually. So it seems it may be a built-in auto-repeat behavior / restriction in Windows or WordPad? Link to comment Share on other sites More sharing options...
water Posted October 10, 2012 Share Posted October 10, 2012 Sending Shift+End to select the whole URL doesn't work for you? 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...
Guy_ Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) Depends on how long the URL is. I might try using different strategies depending on the url length, but it still won't always be perfect. I'm onto a new idea now... I'll paste in text & @CR first, decrease point size right after it to minimum and paste the url in after that. At least it will always fit a line and I may be able to manipulate it more reliably with Shift+Home and just select the url perfectly every time. Sadly, it will still depend on whether it splits as well, unless I leave it at the bottom on its own line always. I think I'll do that and give the paste macro a 2nd click function to backspace the url to the previous line if so wished. Sounds good. Edited October 10, 2012 by Guy_ Link to comment Share on other sites More sharing options...
water Posted October 10, 2012 Share Posted October 10, 2012 Why do you need the URL to be selected? Is it for the user to work with? 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...
Guy_ Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) I'm making a multi-clipboard like tool and I'm automatically includiing the URL to go after all copied snippets. But sometimes you don't care for the url, so if it's already selected, you can delete it easily. I believe my last (updated) idea will make me happy, because it gives extra choice as well Edited October 10, 2012 by Guy_ 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