Jump to content

SciTEButtons


lod3n
 Share

Recommended Posts

I know this has been done before, but I like mine better. Adds Run Beta, Stop Executing, Tidy and Snippets buttons. Can be used to open an au3 with SciTE, just compile and drop the Au3 on the exe, or modify the Edit property in the Windows Registered File Types for the extension AU3 (which is what I've done)

Very low CPU and memory usage.

#NoTrayIcon 
#include <GUIConstants.au3>
#include <Misc.au3>

Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 4)
Global $WS_EX_NOACTIVATE = 0x8000000

if $CmdLineRaw <> "" Then
    $cmd = $CmdLineRaw
    $cmd = 'C:\Program Files\AutoIt3\SciTE\SciTe.exe"'
    if stringleft($cmd,1) = '"' then $cmd = stringmid($cmd,2)
    if stringright($cmd,1) = '"' then $cmd = stringleft($cmd,stringlen($cmd)-1)
    run('"C:\Program Files\AutoIt3\SciTE\SciTe.exe" "' & $cmd &'"')
    WinWait("classname=SciTEWindow")
Else
    If Not ProcessExists("SciTe.exe") Then
        If FileExists("C:\Program Files\AutoIt3\SciTE\SciTe.exe") Then
            Run("C:\Program Files\AutoIt3\SciTE\SciTe.exe")
            WinWait("classname=SciTEWindow")
        Else
            MsgBox(16, "SciTEButtons error", "SciTEButtons can't find SciTE to run it!")
            Exit
        EndIf
    EndIf
EndIf

Global $hwnd = WinGetHandle("classname=SciTEWindow")
WinActivate($hwnd)

if _Singleton("SciTEButtons\a5s1df60a6er6e54z",1) = 0 Then
    Exit
EndIf

$gui = GUICreate("SciTE Toolbar", 400, 19, 350, 0, $WS_POPUP, $WS_EX_NOACTIVATE + $WS_EX_TOOLWINDOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
DllCall("user32.dll", "int", "SetParent", "hwnd", $gui, "hwnd", $hwnd)
WinMove($gui, "", 350, 5)

GUICtrlCreateIcon("shell32.dll", 246, 0, 0, 16, 16)
GUICtrlSetOnEvent(-1, "BetaRun")
GUICtrlSetCursor(-1, 0)
GUICtrlSetTip(-1, "Run Beta")
Func BetaRun()
    WinMenuSelectItem($hwnd, "", "&Buffers", "&Save All")
    WinMenuSelectItem($hwnd, "", "&Tools", "Beta Run")
EndFunc   ;==>BetaRun

GUICtrlCreateIcon("shell32.dll", 200, 20, 0, 16, 16)
GUICtrlSetOnEvent(-1, "StopEx")
GUICtrlSetCursor(-1, 0)
GUICtrlSetTip(-1, "Stop Executing")
Func StopEx()
    WinMenuSelectItem($hwnd, "", "&Tools", "&Stop Executing")
EndFunc   ;==>StopEx

GUICtrlCreateIcon("shell32.dll", 167, 40, 0, 16, 16)
GUICtrlSetOnEvent(-1, "Tidy")
GUICtrlSetCursor(-1, 0)
GUICtrlSetTip(-1, "Tidy")
Func Tidy()
    WinMenuSelectItem($hwnd, "", "&Tools", "Tidy AutoIt Source")
EndFunc   ;==>Tidy

GUICtrlCreateIcon("shell32.dll", 173, 60, 0, 16, 16)
GUICtrlSetOnEvent(-1, "Snippets")
GUICtrlSetCursor(-1, 0)
GUICtrlSetTip(-1, "Snippets")
Func Snippets()
    WinMenuSelectItem($hwnd, "", "&Tools", "Snippet Holder")
EndFunc   ;==>Snippets


GUISetState(@SW_SHOW)
WinActivate($hwnd)

While 1
    Sleep(1000)  ; Idle around
    If Not WinExists($hwnd) Then Exit
WEnd
Func CLOSEClicked()
    MsgBox(0, "", "CLOSEClicked")
    Exit
EndFunc   ;==>CLOSEClicked

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

You are referring to SciTE Toolbar:

http://www.autoitscript.com/forum/index.php?showtopic=25076

I did take a look at that one, but it was overkill and a little unstable on my machine. I just wanted the 4 buttons, no fuss, no muss. Plus I didn't like the WinActivate after every button press. It's much better to use the WS_EX_NOACTIVATE window style for the child GUI (in my opinion), though that could easily be hacked in. And I didn't like the external ICO files that were required.

Plus, I don't like running stuff I don't understand very well, and I don't understand window messages very well yet. :P

SciTE toolbar is a Leatherman, when all I wanted was a butterknife.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

  • 2 weeks later...

You are referring to SciTE Toolbar:

http://www.autoitscript.com/forum/index.php?showtopic=25076

I did take a look at that one, but it was overkill and a little unstable on my machine. I just wanted the 4 buttons, no fuss, no muss. Plus I didn't like the WinActivate after every button press. It's much better to use the WS_EX_NOACTIVATE window style for the child GUI (in my opinion), though that could easily be hacked in. And I didn't like the external ICO files that were required.

Plus, I don't like running stuff I don't understand very well, and I don't understand window messages very well yet. :P

SciTE toolbar is a Leatherman, when all I wanted was a butterknife.

The ICO files were to be a helpful way to save you time on the icons you may want to use. You can use any icon you like to do the job. Some of the icons that are there were also used in the SciTE tools that the authors of those tools provided to me for the toolbar. I understand you wanted to keep it simple. If you like to improve the toolbar we did, please do! I've thought I needed to revisit that project to see if I could make it better.

Link to comment
Share on other sites

  • 2 weeks later...

not bad... but needs a few additions to out-do this one

Posted Image

8)

BTW i use this EVERY day

8)

lod3n very nice I like how your script work. I hope you don't mine, but I update your script to look more like Volly Scite Toolbar. The only thing that won't work is Macro list and Run External Program is missing.

Note: It only using icons from shell32.dll and Scite wrapper programs.

#NoTrayIcon
#include <Misc.au3>
#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 4)

Global $Count, $gui, $opt, $AddBar
Global $Checkbox[34]
Global $WS_EX_NOACTIVATE = 0x8000000
Global $SciTE_Dir, $AutoIt_Dir
Local $Path = RegRead('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\SciTE.exe', '')
$Checkbox[0] = UBound($Checkbox) - 1

Global $WS_EX_NOACTIVATE = 0x8000000

If Not FileExists(@ScriptDir & "\bin") Then DirCreate(@ScriptDir & '\bin')
$SciTE_Dir = StringLeft($Path, StringInStr($Path, '\', 0, -1) - 1)
$AutoIt_Dir = StringLeft($SciTE_Dir, StringInStr($SciTE_Dir, '\', 0, -1) - 1)
If Not ProcessExists("SciTE.exe") Then
    Run($SciTE_Dir & '\SciTE.exe')
    If Not WinWait("classname=SciTEWindow", 3000) Then Exit
EndIf

Global $hwnd = WinGetHandle("classname=SciTEWindow")
WinActivate($hwnd)

If _Singleton("SciTEButtons\a5s1df60a6er6e54z", 1) = 0 Then
    Exit
EndIf

_BuildButtons()
If Not FileExists(@ScriptDir & '\bin\SciteToolbar.ini') Then _Options()

While 1
    Sleep(50)  ; Idle around
    If Not WinExists($hwnd) Then Exit
WEnd

Func CLOSEClicked()
    If @GUI_WinHandle = $gui Then
        Exit
    Else
        GUIDelete(@GUI_WinHandle)
    EndIf
EndFunc   ;==>CLOSEClicked

Func _GUICtrlCreateBar($iAdd = 1)
    If $iAdd Then $Count += 5
    GUICtrlCreateGraphic($Count, 0, 1, 24, $SS_GRAYFRAME)
    GUICtrlSetBkColor(-1, 0xFF0000)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)

    GUICtrlCreateGraphic($Count + 1, 0, 1, 24)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    $Count += 10
    $AddBar = 0
EndFunc   ;==>_GUICtrlCreateBar

Func _GUICtrlCreateToolButton($sIconFile, $iIconID, $iLeft, $sFunctionName, $sSetTip, $iState)
    If $iState = $GUI_UNCHECKED Then Return
    GUICtrlCreateIcon($sIconFile, $iIconID, $iLeft, 0, 16, 16)
    GUICtrlSetOnEvent(-1, $sFunctionName)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetTip(-1, $sSetTip)
    $Count += 20
    $AddBar = 1
EndFunc   ;==>_GUICtrlCreateToolButton

Func _BuildButtons()
    $Count = 0
    $gui = GUICreate("SciTE Toolbar", 20, 19, 350, 0, $WS_POPUP, $WS_EX_NOACTIVATE + $WS_EX_TOOLWINDOW)
    GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
    DllCall("user32.dll", "int", "SetParent", "hwnd", $gui, "hwnd", $hwnd)
    
    _GUICtrlCreateBar(0)
    _GUICtrlCreateToolButton('Shell32.dll', 246, $Count, 'Go', 'Run', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 1, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\AutoIt3Wrapper\AutoIt3Wrapper.exe', -1, $Count, 'Compile', 'Compile', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 2, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($AutoIt_Dir & '\AutoIt3Help.exe', -1, $Count, 'HelpFile', 'AutoIt Helpfile', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 3, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 281, $Count, 'SyntaxCheck', 'Syntax Check', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 4, $GUI_UNCHECKED))

    If $AddBar Then _GUICtrlCreateBar()
    _GUICtrlCreateToolButton('Shell32.dll', 200, $Count, 'StopEx', 'Stop Executing', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 32, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 173, $Count, 'Snippets', 'Snippets', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 33, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 512, $Count, 'Forum', 'AutoIt Forum', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 17, $GUI_UNCHECKED))
    
    If $AddBar Then _GUICtrlCreateBar()
    _GUICtrlCreateToolButton('Shell32.dll', 246, $Count, 'BetaRun', 'Run With Beta', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 5, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\AutoIt3Wrapper\AutoIt3Wrapper.exe', -1, $Count, 'BetaCompile', 'Compile With Beta', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 6, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($AutoIt_Dir & '\AutoIt3Help.exe', -1, $Count, 'BetaHelpFile', 'AutoIt Beta Helpfile', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 7, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 281, $Count, 'BetaSyntaxCheck', 'Syntax Check With Beta', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 8, $GUI_UNCHECKED))

    If $AddBar Then _GUICtrlCreateBar()
    _GUICtrlCreateToolButton($SciTE_Dir & '\FuncPopUp\FuncPopUp.exe', -1, $Count, 'FunctionPopup', 'Function Popup', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 9, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 35, $Count, 'WindowInfo', 'AutoIt Window Info', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 10, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\ScriptWriter\ScriptWriter.exe', -1, $Count, 'AU3Recorder', 'AU3Recorder', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 11, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\AutoItMacroGenerator\AutoItMacroGenerator02.exe', -1, $Count, 'MacroGenerator', 'Macro Generator', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 12, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\Tidy\Tidy.exe', -1, $Count, 'Tidy', 'Tidy', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 13, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\CodeWizard\CodeWizard.exe', -1, $Count, 'CodeWizard', 'Code Wizard', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 14, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 167, $Count, 'GUIBuilder', 'GUI Builder', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 15, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton($SciTE_Dir & '\Koda\FD.exe', -1, $Count, 'Koda', 'Koda(FromDesigner)', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 16, $GUI_UNCHECKED))

    If $AddBar Then _GUICtrlCreateBar()
    _GUICtrlCreateToolButton('Shell32.dll', 133, $Count, 'InsertBookmarkedLines', 'Insert Bookmarked Line(s)', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 18, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 184, $Count, 'DebugMsgBox', 'Debug to MsgBox', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 19, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 3, $Count, 'DebugConsole', 'Debug to Console', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 20, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 261, $Count, 'DebugRemoveLines', 'Debug Remove Lines', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 21, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 249, $Count, 'FullScreen', 'Full Screen', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 22, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 282, $Count, 'ShowCallTip', 'Show Call Tip', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 23, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 182, $Count, 'CompleteSymbol', 'Complete Symbol', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 24, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 155, $Count, 'SelectedUppercase', 'Selected Text Uppercase', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 25, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 157, $Count, 'SelectedLowercase', 'Selected Text Lowercase', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 26, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 274, $Count, 'Block', 'Block Comment Or Uncomment', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 27, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 303, $Count, 'BoxComment', 'Box Comment', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 28, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 39, $Count, 'InsertAbbrevation', 'Insert Abbrevation', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 29, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 241, $Count, 'ClearOutput', 'Clear Output', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 30, $GUI_UNCHECKED))
    _GUICtrlCreateToolButton('Shell32.dll', 243, $Count, 'MacroList', 'Macor List', IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'Toolbar', 31, $GUI_UNCHECKED))

    If $AddBar Then _GUICtrlCreateBar()
    _GUICtrlCreateToolButton('Shell32.dll', 40, $Count, '_Options', 'Options', $GUI_CHECKED)
    _GUICtrlCreateToolButton('Shell32.dll', 28, $Count, 'CLOSEClicked', 'Exit Toolbar', $GUI_CHECKED)

    WinMove($gui, "", 350, 4, $Count - 5)
    GUISetState(@SW_SHOW)
    WinActivate($hwnd)
EndFunc   ;==>_BuildButtons

Func Go()
    WinMenuSelectItem($hwnd, "", "&Buffers", "&Save All")
    WinMenuSelectItem($hwnd, "", "&Tools", "&Go")
EndFunc   ;==>Go

Func Compile()
    WinMenuSelectItem($hwnd, "", "&Buffers", "&Save All")
    WinMenuSelectItem($hwnd, "", "&Tools", "&Compile")
EndFunc   ;==>Compile

Func HelpFile()
    WinMenuSelectItem($hwnd, "", "&Help", "&Help")
EndFunc   ;==>HelpFile

Func SyntaxCheck()
    WinMenuSelectItem($hwnd, "", "&Tools", "SyntaxCheck Prod")
EndFunc   ;==>SyntaxCheck

Func StopEx()
    WinMenuSelectItem($hwnd, "", "&Tools", "&Stop Executing")
EndFunc   ;==>StopEx

Func Snippets()
    WinMenuSelectItem($hwnd, "", "&Tools", "Snippet Holder")
EndFunc   ;==>Snippets

Func Forum()
    $Url = "http://www.autoitscript.com/forum/index.php?act=idx"
    DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", 'open', "string", $Url, "string", '', "string", @ScriptDir, "long", @SW_SHOWNORMAL)
EndFunc   ;==>Forum

Func BetaRun()
    WinMenuSelectItem($hwnd, "", "&Buffers", "&Save All")
    WinMenuSelectItem($hwnd, "", "&Tools", "Beta Run")
EndFunc   ;==>BetaRun

Func BetaCompile()
    WinMenuSelectItem($hwnd, "", "&Buffers", "&Save All")
    WinMenuSelectItem($hwnd, "", "&Tools", "Beta Compile")
EndFunc   ;==>BetaCompile

Func BetaHelpFile()
    WinMenuSelectItem($hwnd, "", "&Tools", "Beta Help")
EndFunc   ;==>BetaHelpFile

Func BetaSyntaxCheck()
    WinMenuSelectItem($hwnd, "", "&Tools", "SyntaxCheck Beta")
EndFunc   ;==>BetaSyntaxCheck

Func FunctionPopup()
    WinMenuSelectItem($hwnd, "", "&Tools", "FunctionPopUp")
EndFunc   ;==>FunctionPopup

Func WindowInfo()
    WinMenuSelectItem($hwnd, "", "&Tools", "AU3Info")
EndFunc   ;==>WindowInfo

Func AU3Recorder()
    WinMenuSelectItem($hwnd, "", "&Tools", "AU3Recorder")
EndFunc   ;==>AU3Recorder

Func MacroGenerator()
    ;WinMenuSelectItem($hwnd, "", "&Tools", "AutoitMacroGenerator")
    Send('!a')
EndFunc   ;==>MacroGenerator

Func Tidy()
    WinMenuSelectItem($hwnd, "", "&Tools", "Tidy AutoIt Source")
EndFunc   ;==>Tidy

Func CodeWizard()
    WinMenuSelectItem($hwnd, "", "&Tools", "CodeWizard")
EndFunc   ;==>CodeWizard

Func GUIBuilder()
    WinMenuSelectItem($hwnd, "", "&Tools", "GuiBuilder")
EndFunc   ;==>GUIBuilder

Func Koda()
    WinMenuSelectItem($hwnd, "", "&Tools", "Koda(FormDesigner)")
EndFunc   ;==>Koda

Func InsertBookmarkedLines()
    WinMenuSelectItem($hwnd, "", "&Tools", "Insert Bookmarked Line(s)")
EndFunc   ;==>InsertBookmarkedLines

Func DebugMsgBox()
    WinMenuSelectItem($hwnd, "", "&Tools", "Debug To MsgBox")
EndFunc   ;==>DebugMsgBox

Func DebugConsole()
    WinMenuSelectItem($hwnd, "", "&Tools", "Debug To Console")
EndFunc   ;==>DebugConsole

Func DebugRemoveLines()
    WinMenuSelectItem($hwnd, "", "&Tools", "Debug Remove lines")
EndFunc   ;==>DebugRemoveLines

Func FullScreen()
    WinMenuSelectItem($hwnd, "", "&View", "Full Scree&n")
EndFunc   ;==>FullScreen

Func ShowCallTip()
    WinMenuSelectItem($hwnd, "", "&Edit", "S&how Calltip")
EndFunc   ;==>ShowCallTip

Func CompleteSymbol()
    WinMenuSelectItem($hwnd, "", "&Edit", "Complete S&ymbol")
EndFunc   ;==>CompleteSymble

Func SelectedUppercase()
    WinMenuSelectItem($hwnd, "", "&Edit", "Make &Selection Uppercase")
EndFunc   ;==>SelectedUppercase

Func SelectedLowercase()
    WinMenuSelectItem($hwnd, "", "&Edit", "Make Selection &Lowercase")
EndFunc   ;==>SelectedLowercase

Func Block()
    WinMenuSelectItem($hwnd, "", "&Edit", "Block Co&mment or Uncomment")
EndFunc   ;==>Block

Func BoxComment()
    WinMenuSelectItem($hwnd, "", "&Edit", "Bo&x Comment")
EndFunc   ;==>BoxComment

Func InsertAbbrevation()
    WinMenuSelectItem($hwnd, "", "&Edit", "&Insert Abbreviation")
EndFunc   ;==>InsertAbbrevation

Func ClearOutput()
    WinMenuSelectItem($hwnd, "", "&Tools", "Clear &Output")
EndFunc   ;==>ClearOutput

Func MacroList()
;   WinMenuSelectItem($hwnd, "", "&Tools", "")
EndFunc   ;==>MacroList

Func _Options()
    $opt = GUICreate("SciTE Toolbar Options", 350, 420, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
    GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
    $Checkbox[1] = GUICtrlCreateCheckbox("Run", 15, 20, 96, 14)
    $Checkbox[2] = GUICtrlCreateCheckbox("Compile", 15, 40, 93, 14)
    $Checkbox[3] = GUICtrlCreateCheckbox("AutoIt Helpfile V3.1.1", 15, 60, 120, 14)
    $Checkbox[4] = GUICtrlCreateCheckbox("SyntaxCheck", 15, 80, 120, 14)
    $group1 = GUICtrlCreateGroup("Standard", 10, 0, 140, 100)
    GUICtrlSetBkColor($group1, 0x00ff00)
    ;beta release
    $Checkbox[5] = GUICtrlCreateCheckbox("Run with Beta", 15, 125, 120, 14)
    $Checkbox[6] = GUICtrlCreateCheckbox("Compile with Beta", 15, 145, 120, 14)
    $Checkbox[7] = GUICtrlCreateCheckbox("Beta AutoIt Helpfile", 15, 165, 120, 14)
    $Checkbox[8] = GUICtrlCreateCheckbox("Syntax Check Beta", 15, 185, 120, 14)
    $group2 = GUICtrlCreateGroup("Beta", 10, 105, 140, 100)
    GUICtrlSetBkColor($group2, 0x00ffff)
    ;external tools
    $Checkbox[9] = GUICtrlCreateCheckbox("Function Popup", 15, 230, 120, 14)
    $Checkbox[10] = GUICtrlCreateCheckbox("AutoIt Window Info", 15, 250, 120, 14)
    $Checkbox[11] = GUICtrlCreateCheckbox("AU3Recorder", 15, 270, 120, 14)
    $Checkbox[12] = GUICtrlCreateCheckbox("Macro Generator", 15, 290, 120, 14)
    $Checkbox[13] = GUICtrlCreateCheckbox("Tidy AutoIt Source", 15, 310, 120, 14)
    $Checkbox[14] = GUICtrlCreateCheckbox("Code Wizard", 15, 330, 120, 14)
    $Checkbox[15] = GUICtrlCreateCheckbox("GUI Builder", 15, 350, 120, 14)
    $Checkbox[16] = GUICtrlCreateCheckbox("Koda(FormDesigner)", 15, 370, 120, 14)
    $Checkbox[17] = GUICtrlCreateCheckbox("AutoIt Forum", 15, 390, 120, 14)
    $group3 = GUICtrlCreateGroup("External Tools", 10, 210, 140, 200)
    GUICtrlSetBkColor($group3, 0x0000ff)
    ;SciTE shortcut tools
    $Checkbox[18] = GUICtrlCreateCheckbox("Insert Bookmarked Line(s)", 165, 20, 180, 14)
    $Checkbox[19] = GUICtrlCreateCheckbox("Debug to MsgBox", 165, 40, 150, 14)
    $Checkbox[20] = GUICtrlCreateCheckbox("Debug to Console", 165, 60, 120, 14)
    $Checkbox[21] = GUICtrlCreateCheckbox("Debug Remove Lines", 165, 80, 120, 14)
    $Checkbox[22] = GUICtrlCreateCheckbox("Full Screen", 165, 100, 120, 14)
    $Checkbox[23] = GUICtrlCreateCheckbox("Show Call tip", 165, 120, 120, 14)
    $Checkbox[24] = GUICtrlCreateCheckbox("Complete Symble", 165, 140, 120, 14)
    $Checkbox[25] = GUICtrlCreateCheckbox("Selected text Uppercase", 165, 160, 150, 14)
    $Checkbox[26] = GUICtrlCreateCheckbox("Selected text Lowercase", 165, 180, 150, 14)
    $Checkbox[27] = GUICtrlCreateCheckbox("Block comment or uncomment", 165, 200, 165, 14)
    $Checkbox[28] = GUICtrlCreateCheckbox("Box Comment", 165, 220, 120, 14)
    $Checkbox[29] = GUICtrlCreateCheckbox("Insert Abbrevation", 165, 240, 120, 14)
    $Checkbox[30] = GUICtrlCreateCheckbox("Clear output", 165, 260, 120, 14)
    $Checkbox[31] = GUICtrlCreateCheckbox("Macro list", 165, 280, 120, 14)
GUICtrlSetState(-1, $GUI_DISABLE)  ; Remove after figure out how to fix Macro List.
    $Checkbox[32] = GUICtrlCreateCheckbox("Stop Executing", 165, 300, 120, 14)
    $Checkbox[33] = GUICtrlCreateCheckbox("Snippet Holder", 165, 320, 120, 14)
    $group4 = GUICtrlCreateGroup("Built in SciTE Tools", 160, 0, 180, 340)
    GUICtrlSetBkColor($group4, 0xff0000)
    $button1 = GUICtrlCreateButton("Select All", 160, 350, 85, 25)
    GUICtrlSetOnEvent(-1, '_SelectAll')
    $button2 = GUICtrlCreateButton("Remove All", 160, 380, 85, 25)
    GUICtrlSetOnEvent(-1, '_RemoveAll')
    $button3 = GUICtrlCreateButton("Apply and Close", 255, 350, 85, 25)
    GUICtrlSetOnEvent(-1, '_ApplyClose')
    $button4 = GUICtrlCreateButton("Cancel", 255, 380, 85, 25)
    GUICtrlSetOnEvent(-1, "CLOSEClicked")
    
    For $x = 1 To $Checkbox[0]
        GUICtrlSetState($Checkbox[$x], IniRead(@ScriptDir & '\bin\SciteToolbar.ini', 'ToolBar', $x, $GUI_UNCHECKED))
    Next
    
    GUISetState()   
EndFunc   ;==>_Options

Func _ApplyClose()
    For $x = 1 To $Checkbox[0]
        IniWrite(@ScriptDir & '\bin\SciteToolbar.ini', 'ToolBar', $x, GUICtrlRead($Checkbox[$x]))
    Next
    CLOSEClicked()
    GUIDelete($gui)
    _Restart()  
EndFunc

Func _SelectAll()
    For $x = 1 To $Checkbox[0]
If $x = 31 Then ContinueLoop   ; Remove after figure out how to fix Macro List.
        GUICtrlSetState($Checkbox[$x], $GUI_CHECKED)
    Next
EndFunc   ;==>_SelectAll

Func _RemoveAll()
    For $x = 1 To $Checkbox[0]
        GUICtrlSetState($Checkbox[$x], $GUI_UNCHECKED)
    Next
EndFunc   ;==>_RemoveAll

Func _Restart()
    If @Compiled = 1 Then
        Run(FileGetShortName(@ScriptFullPath))
    Else
        Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath))
    EndIf
    Exit
EndFunc   ;==>_Restart()

Edit: Some typo...

Edited by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

Danny does it again! I'm going to replace the one I have with this one. I'll make some small changes to allow for using personal icons, but other than that, this thing is much better than mine...NICE WORK!

Edit: On testing, I spoke too soon. :D

most of the buttons are missing, and many of them do not work for me. :)

I'm sure this can be fixed. I'm just missing something simple. :P

edit2: fixed! I'm going to see if I can change it so you can select what icons you want to use with each function.

Edited by Volly
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...