Last active
April 26, 2021 15:45
-
-
Save JoeGlines/06bf15ff6b8f81b10eeb5c84accbdb60 to your computer and use it in GitHub Desktop.
Great ways to automate SciTE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
;***********AutoHotkey code for interacting with SciTE******************* | |
#SingleInstance, Force | |
RAlt::Reload | |
RControl:: | |
;************SciTE editor via COM objects- Editor Windows Commands************************************************ | |
oSci := ComObjActive("SciTE4AHK.Application") ;get pointer to active SciTE editor window | |
;~ MsgBox % oSci.Selection ;Text that is selected | |
;~ MsgBox % oSci.Document ;get entire SciTE document | |
;~ MsgBox % oSci.CurrentFile ;path to current file | |
;~ MsgBox % oSci.SciTEHandle ;window handle | |
;~ MsgBox % oSci.ActivePlatform ; | |
;~ MsgBox % oSci.UserDir | |
;~ MsgBox % oSci.Version | |
;~ MsgBox % oSci.IsPortable ;I'm guessing blank means not portable. Prob a 1=portable | |
;~ MsgBox % oSci.SciTEDir | |
;~ oSci.ReloadProps() ;Reload property files | |
;~ oSci.OpenFile("C:\temp\test.ahk") | |
;~ oSci.DebugFile("C:\temp\test.ahk") | |
;***********tabs******************* | |
;~ MsgBox % oSci.Tabs.count | |
;~ oSci.SwitchToTab(1) ;Switch to tab (zero based) | |
;~ MsgBox % oSci.Tabs.List ;list of open tabs | |
;~ for Tab_Path in oSci.Tabs.Array ;path to each open Tab | |
;~ MsgBox % "tab " A_Index a_tab Tab_Path | |
;~ oSci.InsertText("my Text") ;insert my Text | |
;~ oSci.InsertText(";my Text",30) ;insert my Text at position 30 | |
;~ oSci.Message(0x111,420) ;Clear output | |
;~ oSci.Output("hello world") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment