Page 1 of 1

Edited

Posted: 23 May 2022, 11:07
by fivefive
Edited

Re: Delays when calling the function the 1st time??

Posted: 23 May 2022, 11:38
by boiler
Run a dummy call to the OCR routine when the script first starts up and then again every so often so that it doesn't spend the time to initialize itself or whatever it's doing when you actually need it. You can have a routine executed regularly by using SetTimer.

Re: Delays when calling the function the 1st time??

Posted: 23 May 2022, 11:43
by fivefive
Edited

Re: Delays when calling the function the 1st time??

Posted: 23 May 2022, 11:57
by boiler
If you need the clipboard not to be touched, then that may be an issue. You may see if you can produce a subset of the OCR routine that you could call that leaves out the part of assigning new content to the clipboard but still keeps the initialization fresh. I don't have time to dig into that myself to know if it's feasible or not.

Re: Delays when calling the function the 1st time??

Posted: 24 May 2022, 09:43
by fivefive
Edited

Re: Delays when calling the function the 1st time??

Posted: 24 May 2022, 09:47
by boiler
I like assigning a null string using the expression assignment operator, like this:

Code: Select all

Clipboard := ""

The versions you asked about also work, but I prefer the above as it doesn't look like an unfinished line of code.

Re: Delays when calling the function the 1st time??

Posted: 24 May 2022, 09:47
by RussF

Code: Select all

Clipboard =
or...

Code: Select all

Clipboard := ""
Russ

(Sorry @boiler, we posted at the same time.)