Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to make long slow hotstrings fast like they should be.


  • Please log in to reply
No replies to this topic
Cruncher1
  • Members
  • 104 posts
  • Last active: Oct 05 2017 05:11 PM
  • Joined: 21 Feb 2012

I am often working in a browser and sometimes browsers can make really long hotstrings go really slow. Since some of the strings I use can be several paragraphs, it was a problem. So, I found a solution that works really well. Copy your string to a variable and use the Clipboard to paste. Compare these two methods below. You can see the difference even in notepad, but try using them on a forum or in gmail (or anything brower based) and you will really see the difference. And by being fast, it is also more reliable since mouse clicks and keyboard presses have less chance to interrupt things.

 

For the example I am using the beginning of the book A Tale of Two Cities. Run the script and compare the speed of "tale1" to "tale2". 

text = It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring  of  hope,  it  was  the  winter  of  despair,  we  had everything before us, we had nothing before us, we were all  going  direct  to  Heaven,  we  were  all  going  direct  the other way—in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being  received,  for  good  or  for  evil,  in  the  superlative degree of comparison only. There were a king with a large jaw and a queen with a plain  face,  on  the  throne  of  England;  there  were  a  king with  a  large  jaw  and  a  queen  with  a  fair  face,  on  the throne  of  France.  In  both  countries  it  was  clearer  than crystal  to  the  lords  of  the  State  preserves  of  loaves  and fishes, that things in general were settled for ever. It  was  the  year  of  Our  Lord  one  thousand  seven hundred   and   seventy-five.

; the fast way
:*:tale1::  
	Clipboard = %text%
	Send ^v
	Exit

; the slow way	
:*:tale2::It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring  of  hope,  it  was  the  winter  of  despair,  we  had everything before us, we had nothing before us, we were all  going  direct  to  Heaven,  we  were  all  going  direct  the other way—in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being  received,  for  good  or  for  evil,  in  the  superlative degree of comparison only. There were a king with a large jaw and a queen with a plain  face,  on  the  throne  of  England;  there  were  a  king with  a  large  jaw  and  a  queen  with  a  fair  face,  on  the throne  of  France.  In  both  countries  it  was  clearer  than crystal  to  the  lords  of  the  State  preserves  of  loaves  and fishes, that things in general were settled for ever. It  was  the  year  of  Our  Lord  one  thousand  seven hundred   and   seventy-five.