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
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.

 

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

  • 2 weeks later...

Use standard text size please.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Look at "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"

how it communicate with Scite using SendMessage+WM_COPYDATA, see these functions: SendSciTE_Command(), SendSciTE_GetInfo()

 

EDIT: AutoIt3Wrapper is part of Scite4Autoit3 full editor

Edited by Zedna
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...