Jump to content
OSMMDAIJI

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
Sleep($iSleep)
Send("H")   ;  See the popup of syntax suggestions
Sleep($iSleep)
Send("E")   ;  See the popup of syntax suggestions
Sleep($iSleep)
Send("L")   ;  No  popup since no matching suggestions
Sleep($iSleep)
Send("^z")   ;  undo changes
Sleep($iSleep)

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


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

Sleep($iSleep)
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...