Skip to content

Instantly share code, notes, and snippets.

@maestrith
Created September 21, 2012 16:40
Show Gist options
  • Save maestrith/3762541 to your computer and use it in GitHub Desktop.
Save maestrith/3762541 to your computer and use it in GitHub Desktop.
#include SCI.ahk
#singleinstance force
commands =
(
autotrim blockinput clipwait control controlclick controlfocus controlget controlgetfocus
controlgetpos controlgettext controlmove controlsend controlsendraw controlsettext coordmode
critical detecthiddentext detecthiddenwindows drive driveget drivespacefree edit endrepeat envadd
envdiv envget envmult envset envsub envupdate fileappend filecopy filecopydir filecreatedir
filecreateshortcut filedelete filegetattrib filegetshortcut filegetsize filegettime filegetversion
fileinstall filemove filemovedir fileread filereadline filerecycle filerecycleempty fileremovedir
fileselectfile fileselectfolder filesetattrib filesettime formattime getkeystate groupactivate
groupadd groupclose groupdeactivate gui guicontrol guicontrolget hideautoitwin hotkey if ifequal
ifexist ifgreater ifgreaterorequal ifinstring ifless iflessorequal ifmsgbox ifnotequal ifnotexist
ifnotinstring ifwinactive ifwinexist ifwinnotactive ifwinnotexist imagesearch inidelete iniread
iniwrite input inputbox keyhistory keywait listhotkeys listlines listvars menu mouseclick
mouseclickdrag mousegetpos mousemove msgbox outputdebug pixelgetcolor pixelsearch postmessage
process progress random regdelete regread regwrite reload run runas runwait send sendevent
sendinput sendmessage sendmode sendplay sendraw setbatchlines setcapslockstate setcontroldelay
setdefaultmousespeed setenv setformat setkeydelay setmousedelay setnumlockstate setscrolllockstate
setstorecapslockmode settitlematchmode setwindelay setworkingdir shutdown sort soundbeep soundget
soundgetwavevolume soundplay soundset soundsetwavevolume splashimage splashtextoff splashtexton
splitpath statusbargettext statusbarwait stringcasesense stringgetpos stringleft stringlen
stringlower stringmid stringreplace stringright stringsplit stringtrimleft stringtrimright
stringupper sysget thread tooltip transform traytip urldownloadtofile winactivate
winactivatebottom winclose winget wingetactivestats wingetactivetitle wingetclass wingetpos
wingettext wingettitle winhide winkill winmaximize winmenuselectitem winminimize winminimizeall
winminimizeallundo winmove winrestore winset winsettitle winshow winwait winwaitactive
winwaitclose winwaitnotactive fileencoding
)
Gui +LastFound
hwnd := WinExist(), sci := new scintilla(hwnd)
sc:=new scintilla(hwnd,8,500,500,500)
sci.SetWrapMode(true), sci.StyleSetBold("STYLE_DEFAULT", true), sci.StyleClearAll()
sci.SetLexer(60), sci.SetKeywords(0, commands)
sci.StyleSetBold(0, false) ; make normal text not bold
sci.StyleSetFore(1,0x00AF00) ; make Comments green
sci.StyleSetFore(5,0x0000FF) ; make Commands blue
gui,+resize
Gui, show,w500 h900
sci.settext("","testing")
sci.gettext(sci.gettext()+1,text)
msgbox % text "`n" sci.gettext()+1
return
GuiClose:
ExitApp
return
f1::
reload
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment