Jump to content

Fail ( ControlSetText ) With Scite, Help Me if you can :)

Recommended Posts

The Scintilla Editor checks after each letter whether a macro or a syntax proposal should be edited.
Controlsettext is therefore interrupted after the first letter.
Whether this is an error or a feature remains an open question.
But surely it does not make sense to replace the code with 'Controlsettext ()'.
Here is a small example to illustrate the difference between Send (), Controlsend () and Controlsettext ().

$iSleep = 2000    ; change here to change display delay

$hWnd = WinWait("[CLASS:SciTEWindow]")

Send("{down 50}{up 1}")   ;  Position cursor to the penultimate line
Send("H")   ;  See the popup of syntax suggestions
Send("E")   ;  See the popup of syntax suggestions
Send("L")   ;  No  popup since no matching suggestions
Send("^z")   ;  undo changes

ControlSend($hWnd, "", "[ID:350]", "^a")   ; mark all
ControlSend($hWnd, "", "[ID:350]", "HELP") ; send HELP
ControlSend($hWnd, "", "[ID:350]", "^z")   ; undo last input   HELP becomes H
ControlSend($hWnd, "", "[ID:350]", "^z")   ; undo last input   changes H to original code

ControlSetText($hWnd, "", "[ID:350]", "HELP")    ; clear edit control and send HELP
; On first charater scitilla interupts and shows H

ControlSend($hWnd, "", "[ID:350]", "^z")   ; undo change and restore code

;~ Please do not delete this last line.


UDF: _SingleScript()                                        If you like my post, just click the like button :)        here -->

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...