lee321987 Posted May 10, 2009 Share Posted May 10, 2009 Hi. Here's what I'm trying to do in SciTe: I type "For" Autocomplete box opens with "For" selected I hit a hotkey, and the matching "Next" is typed on the next line. I found a way to do this with "Func", but it only works if I type "Fun" then hit the {SPACE} key. "Fu" {SPACE} doesn't work, nor does "Func" {SPACE}. Here's what autocomplete types when I type "fun" {SPACE} Func _() EndFunc Id like this for "Do...Until", "While...Wend", ect... Possible? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 10, 2009 Developers Share Posted May 10, 2009 Hi. Here's what I'm trying to do in SciTe: I type "For" Autocomplete box opens with "For" selected I hit a hotkey, and the matching "Next" is typed on the next line. I found a way to do this with "Func", but it only works if I type "Fun" then hit the {SPACE} key. "Fu" {SPACE} doesn't work, nor does "Func" {SPACE}. Here's what autocomplete types when I type "fun" {SPACE} Func _() EndFunc Id like this for "Do...Until", "While...Wend", ect... Possible?Are you talking about the abbreviations option in stead of autocomplete? When typing fun the text changes to red and then the space will auto expand to whatever is defined in the abbrev.properties file. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lee321987 Posted May 10, 2009 Author Share Posted May 10, 2009 I guess I was. I hadn't noticed the red. Thanks a lot. Link to comment Share on other sites More sharing options...
monoceres Posted May 10, 2009 Share Posted May 10, 2009 Very interesting find, typing "fun" and hitting the space key really does gives a prototype for a function. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Valuater Posted May 10, 2009 Share Posted May 10, 2009 here's a stab at it ... works most of the time Opt("WinTitleMatchMode", 4) HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") While 1 Sleep(100) WEnd Func ShowMe() $SciTE = '[CLASS:SciTEWindow]' $script = StringToBinary(ControlGetText($SciTE, '', '[CLASS:Scintilla; INSTANCE:1]'), 2) $script = BinaryToString($script, 1) $Split = StringSplit($script, @CRLF) $script = $Split[$Split[0]] Switch $script ; Add all the inputs you want here Case "Do" $stext = "Until" Case "While" $stext = "Wend" Case "Func" $stext = "EndFunc" Case "For" $stext = "Next" Case Else $stext = "" EndSwitch If $stext <> "" Then ControlSend("classname=SciTEWindow", "", "[CLASS:Scintilla; INSTANCE:1]", @CRLF & $stext & @CRLF & @CRLF) EndFunc ;==>ShowMe Func Terminate() Exit 0 EndFunc ;==>Terminate 8) Link to comment Share on other sites More sharing options...
Developers Jos Posted May 10, 2009 Developers Share Posted May 10, 2009 Very interesting find, typing "fun" and hitting the space key really does gives a prototype for a function.This is the Abbreviations we (Mhz&I) have setup by adding an extra Lexer keyword, a LUA script and the abbrev.properties file.Its documented in the SciTE4AutoIt3 helpfile that comes with the full install.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
monoceres Posted May 10, 2009 Share Posted May 10, 2009 This is the Abbreviations we (Mhz&I) have setup by adding an extra Lexer keyword, a LUA script and the abbrev.properties file.Its documented in the SciTE4AutoIt3 helpfile that comes with the full install.JosWhoa! I can't believe I missed this. It's beautiful. Thanks. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now