Delay in auto-replace

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jean

Delay in auto-replace

18 Jan 2018, 22:23

In one program I'm running on Windows 8 AHK auto-replace is not instantaneous. Once the ending character is typed the cursor goes backward to replace the string with the new one. What's the reason for this, and the workaround?
User avatar
divanebaba
Posts: 804
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Delay in auto-replace

18 Jan 2018, 22:53

Jean wrote:... Once the ending character is typed the cursor goes backward to replace the string with the new one. ...
Sounds like normal behaviour.
You can try using SetBatchLines -1 for speed up executing scripts.
Maybe SetKeyDelay -1 could help too.

But none of the suggested commands will prevent the cursor by going backwards to replace the hotstring.
Jean

Re: Delay in auto-replace

18 Jan 2018, 23:10

divanebaba wrote:Sounds like normal behaviour.
In other programs I use, even in Notepad, auto-replace occurs with no perceptible delay. In this case though it looks like slow-motion. I tried your suggestions in my script but that didn't change anything.
User avatar
divanebaba
Posts: 804
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Delay in auto-replace

19 Jan 2018, 01:50

If you post a fragment of your script, inclusive the autoececute section, if it exists, maybe the problem could be solved.
SetKeyDelay and SetBatchLines has to be inserted in topmost section (autoexecute section).
Jean

Re: Delay in auto-replace

19 Jan 2018, 09:39

Here is the top of my script:

#InstallKeybdHook
#UseHook On
SetTitleMatchMode, 2
; remap keys, make Capslock Copy et Ctrl Capslock Paste
CapsLock::^c
^CapsLock::^v
etc. (many hotstrings follow)

It works fine on all programs except one, where the auto-replace is very slow.
Inserting SetKeyDelay and SetBatchLines at the top does not make a difference.
There got to be something special about that (older) program that slows AHK down. What could it be?
User avatar
divanebaba
Posts: 804
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Delay in auto-replace

19 Jan 2018, 11:38

Jean wrote:... It works fine on all programs except one, where the auto-replace is very slow. ... There got to be something special about that (older) program that slows AHK down. What could it be?
Hm, there is no thing like I thought, a Hotstring like, for Example:

Code: Select all

:*:Superman::Batman
If you are only using Hotkeys, instead of Hotstrings, try to implement the $-Prefix for Hotkeys, to prevent selftriggering. Make this with all your Hotkeys.

Code: Select all

$CapsLock::^c
$^CapsLock::^v
Only one program, that decreases the speed of your script? Can you tell us the name of this program? It could be helpful for support. :crazy:
Jean

Re: Delay in auto-replace

19 Jan 2018, 12:02

[quote="divanebaba"]Hm, there is no thing like I thought, a Hotstring like, for Example:

Code: Select all

:*:Superman::Batman[/quote]
There are hundreds of those after the Hotkeys. I just didn't show them. Hotkeys are not the problem.
The program is a, small, free outliner called UV Outliner : http://uvoutliner.com/. It's not supported any longer but it works well on Windows 8, except that Hotstring auto-replace is super slow.
Thanks for your input.
User avatar
divanebaba
Posts: 804
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Delay in auto-replace

19 Jan 2018, 12:27

Only thing in my opinion is, that UV Outliner has an own auto-correction or function completion working permanent in background.
Maybe in Options or Preferences you can disable if you don't really need or use such functions.
Even possible some another type of recognition or detection of keystrokes.
If you can disable these options, maybe it helps.

Edit: I took a closer look at the UV Outliner, means translated the website in a me understandable language and I think all the special options UV Outliner offers could make debugging difficult :crazy:

Edit2: As I don't have seen any hotstrings in your codesample maybe :arrow: this could be small part of the solution. UV Outliner tells something about two different input types and pressing F2 to get into text input modus.
Maybe you have to add {F2} in prior of all your hotkeys and hotstrings to ensure everytime sendig keystrokes into correct input gui or however called. Try

Code: Select all

$^CapsLock::{F2}^v
; or
$^CapsLock::sendinput {F2}{Ctrl}v
Jean

Re: Delay in auto-replace

19 Jan 2018, 14:05

Thanks for looking into UV Outliner. As you see it's a very simple program with barely any option. Swapping between text editing and row selection is not a problem. I mostly use text editing anyway.

As I said I have many hotstrings accumulated over the years:
...
::chiffonnee::chiffonnée
::chifre::chiffre
::chifres::chiffres
::chimeres::chimères
::chimpanze::chimpanzé
::chimpanzes::chimpanzés
::chlorophyliens::chlorophylliens
::choeur::chœur
::chretien::chrétien
::chretienne::chrétienne
::chretiens::chrétiens
::chretienté::chrétienté
::chretiente::chrétienté
::christ::Christ
::Christinne::Christine
::christine::Christine
::christmas::Christmas
::cia::CIA
::Ciceron::Cicéron
::cimetiere::cimetière
::cm::cimetière du Montparnasse
.... etc.

They work well on all programs. The only way for you to see what happens with UV Outliner would be to install it on Windows 8 and test it but it's probably not something you'd do. I was hoping there was some sort of known generic problem with some codes, perhaps something to do with 32 vs 64 bits, or running programs as administrator or not (?).
User avatar
divanebaba
Posts: 804
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Delay in auto-replace

19 Jan 2018, 15:45

Jean wrote:Thanks for looking into UV Outliner.
...
I was hoping there was some sort of known generic problem with some codes, perhaps something to do with 32 vs 64 bits, or running programs as administrator or not (?).
I'm sure there are many highly suitable persons here to solve your issue in one row code, for example :mrgreen: :mrgreen:

I'm interested. What about the F2 and the special input modes? Translation error in website?
I only find a 12 second film on Youtube, with less then one second look at the Gui. Was that strange advertising?
Jean

Re: Delay in auto-replace

19 Jan 2018, 16:05

Perhaps I'll post another,more general message about what could cause Auto-replace to slow down.

Not sure what you're asking about F2. It's just the F2 key. After it's pressed you can edit any portion of any row (a mouse click will do will do too). If you want to select the whole row across all columns (e.g. to change font), you press Esc. The interesting thing about this outliner is that you can collapse levels.
User avatar
divanebaba
Posts: 804
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Delay in auto-replace

19 Jan 2018, 19:09

Jean wrote:... Perhaps I'll post another,more general message about what could cause Auto-replace to slow down.
Not sure what you're asking about F2. It's just the F2 key. ...
http://www.uvoutliner.com/tour/
http://www.uvoutliner.com/tour/ wrote:There are two modes in outliner:
  • Text editing mode
  • Row selection mode
In text editing mode outliner works just the same as a usual text processor. In this mode you enter or edit text.
In row selection mode work is done with the whole row. For example, if you need to change font settings for entire row, you can switch to row selection mode and change font setting.
To enter text editing mode you can press F2 or click mouse button on the text.
To exit text editing mode and to enter row selection mode you can just press Esc.
I thought there is something like toggle between two modes. Sounds for me like rather be in text mode than in row mode.

I think it is not necessary to open new thread for same issue, maybe even undesirable. You can edit the headline of thread, add UV Outliner and some more info.
Jean

Re: Delay in auto-replace

19 Jan 2018, 20:16

I know the UV Outliner program. I use it. If you install it and use it yourself you'll understand. It's very simple.

I only mentioned the name because you asked. The question is more generally : What causes hotstring auto-replace to slow down? But I doubt anyone else is going to answer on this thread at this point.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CaseyMoon, Google [Bot], imstupidpleshelp, JoeWinograd, mmflume and 166 guests