PsaltyDS Posted April 25, 2007 Share Posted April 25, 2007 Any chance of adding an {autoitbox} BBCode flag to the forum editor, similar to {codebox}? Anyone else that would like to see it? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Valuater Posted April 25, 2007 Share Posted April 25, 2007 just codebox an autoit box expandcollapse popupSciTE toolbar version 1.7 ;Concept by Volly ;Written by JdeB, Gafrost, and Volly ;contributers include: Valuater, thatsgreat2345, JSThePatriot: for helping with either ; bug discovery, or fix suggestions. THANK YOU! ;---------------------------------------------------------------------------------------- #cs Notes: Changes from 1.6: 1. Icon folder name changed to bin 2. INI file is now located in bin folder 3. Options menu added to allow for adding or removing buttons 4. Divider bars now more closely match SciTE's built in toolbar 5. Dividers will now divide by group instead of 4 icons 6. No need to make the ini file anymore. If one doesn't exist, the script will make one, then open the options menu to allw for you to pick the buttons you want to use. 6. Icons added. If you wish to add icons of your choosing, goto http://www.iconarchive.com to download icons for free #ce ; SERACH ME??? ; http://www.autoitscript.com/forum/index.php?act=Search&CODE=01&forums=9&namesearch=Valuater&search_in=titles&result_type=topics #NoTrayIcon #include<guiconstants.au3> #include<misc.au3> #include<string.au3> Opt("MouseCoordMode", 2) Opt("WinSearchChildren", 1) Opt("WinTitleMatchMode", 4) $item32 = "Pinchers.ICO|Options" ;moved from list below. $item33 = "Door2.ico|Exit Toolbar" ;moved from list below ;INI file check. If INI doesn't exist, one is made. $chkF = FileExists(@ScriptDir & "\bin\SciteToolbar.ini") If $chkF = 0 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "top", "54") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "bar", "") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "108", $item32) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "9999", $item33) FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "1") EndIf ;Check if SciTE is running and start it if needed. If Not ProcessExists("SciTE.exe") Then Global $SciTE_Dir = RegRead('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\SciTE.exe', '') Run($SciTE_Dir) If Not WinWait("classname=SciTEWindow", 3000) Then Exit EndIf Global $Forums If Not ProcessExists("Firefox.exe") Then $Forums = "1" ; "" or 1 to run firefox/forums If _Singleton("SciTEAdditionalIcons", 1) = 0 Then Exit Global $WM_COPYDATA = 74 Global $SciTECmd, $E_file, $R_file Global $last_SciTE_Pos_x = -99999 Global $last_SciTE_Pos_y = -99999 Global $Scite_Hwnd = WinGetHandle("classname=SciTEWindow") Global $Scite_pos = WinGetPos($Scite_Hwnd) Global $w_size = WinGetClientSize($Scite_Hwnd) ; Get SciTE DirectorHandle Global $Scite_Dir_hwnd = WinGetHandle("DirectorExtension") ; Get My GUI Handle numeric Global $My_Hwnd = GUICreate("SciTE interface", 100, 18, Default, Default, $WS_POPUP, $WS_EX_TOOLWINDOW, $Scite_Hwnd) Global $My_Gui_Width = 0 Global $go[1][2] $Toolbar_Info = IniReadSection(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar") $BarTop_Add = Int(IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "Bar", "Top", 54)) _Adjust_Toolbar_Info($Toolbar_Info) _CreateToolbar($go, $Toolbar_Info, $My_Gui_Width) ;GUISetState() $My_Dec_Hwnd = Dec(StringTrimLeft($My_Hwnd, 2)) ;Register COPYDATA message. GUIRegisterMsg($WM_COPYDATA, "MY_WM_COPYDATA") ;GUISetState() While 1 If Not WinExists($Scite_Hwnd) Then Exit $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit If $msg > 1 Then For $x = 0 To UBound($go) - 1 If $msg = $go[$x][0] Then If $go[$x][1] = 9999 Then Exit If $go[$x][1] = 99 Then If FileExists($R_file) Then Run(FileGetShortName($R_file)) EndIf If $go[$x][1] = 961 Then Send("{F11}") If $go[$x][1] = 107 Then $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) EndIf If $go[$x][1] = 108 Then _options() EndIf SendSciTE_Command($My_Hwnd, $Scite_Dir_hwnd, StringFormat("menucommand:%04d", $go[$x][1])) _tiprefresh() ExitLoop EndIf Next EndIf ; set position of window correct If WinActive($Scite_Hwnd) Or WinActive($My_Hwnd) Then $Scite_pos = WinGetPos($Scite_Hwnd) If $Scite_pos[0] <> $last_SciTE_Pos_x Or $Scite_pos[1] <> $last_SciTE_Pos_y Then $last_SciTE_Pos_x = $Scite_pos[0] $last_SciTE_Pos_y = $Scite_pos[1] $w_size = WinGetClientSize($Scite_Hwnd) WinMove($My_Hwnd, '', $Scite_pos[0] + 360, $Scite_pos[1] + ($Scite_pos[3] - $w_size[1]), $My_Gui_Width, 18) GUISetState(@SW_SHOW) EndIf EndIf ; Re activate SciTE when Buttn window is activated If WinActive($My_Hwnd) Then WinActivate($Scite_Hwnd) EndIf ;if IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "") = 1 then _options() If $Forums = 1 Then $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) $Forums = "" EndIf WEnd Exit Func _Adjust_Toolbar_Info(ByRef $Toolbar_Info) ReDim $Toolbar_Info[UBound($Toolbar_Info) - 1][3] Local $tmp_string For $x = 1 To UBound($Toolbar_Info) - 1 If $Toolbar_Info[$x][0] <> "bar" Then $tmp_string = StringSplit($Toolbar_Info[$x][1], "|") $Toolbar_Info[$x][1] = $tmp_string[1] $Toolbar_Info[$x][2] = $tmp_string[2] EndIf Next EndFunc ;==>_Adjust_Toolbar_Info ; Func _CreateToolbar(ByRef $go, ByRef $Toolbar_Info, ByRef $My_Gui_Width) Local $x, $y, $bar ReDim $go[UBound($Toolbar_Info) ][2] $y = 1 For $x = 1 To UBound($Toolbar_Info) - 1 If $Toolbar_Info[$x][0] = "bar" Then $vbar1 = GUICtrlCreateGraphic($y, 1, 1, 24, $SS_GRAYFRAME) GUICtrlSetBkColor($vbar1, 0xFF0000) GUICtrlSetResizing($vbar1, $GUI_DOCKALL) $vbar2 = GUICtrlCreateGraphic(($y + 1), 1, 1, 24) GUICtrlSetBkColor($vbar2, 0xffffff) GUICtrlSetResizing($vbar2, $GUI_DOCKALL) $y += 5 Else $go[$x][0] = GUICtrlCreateIcon(@ScriptDir & "\bin\" & $Toolbar_Info[$x][1], -1, $y + 4, 1, 16, 16, Default, $SS_LEFT) $go[$x][1] = Number($Toolbar_Info[$x][0]) If $go[$x][1] = 99 Then $SplitB = StringSplit($Toolbar_Info[$x][2], ",") $E_file = $SplitB[1] $R_file = $SplitB[2] $Toolbar_Info[$x][2] = $E_file GUICtrlSetTip($go[$x][0], $Toolbar_Info[$x][2]) Else GUICtrlSetTip($go[$x][0], $Toolbar_Info[$x][2]) EndIf $y += 24 EndIf Next $My_Gui_Width = $y EndFunc ;==>_CreateToolbar ; Refreshes tip on icon after icon is clicked. Func _tiprefresh() For $x = 1 To UBound($Toolbar_Info) - 1 GUICtrlSetTip($go[$x][0], $Toolbar_Info[$x][2]) Next EndFunc ;==>_tiprefresh ; Send command to SciTE Func SendSciTE_Command($My_Hwnd, $Scite_Dir_hwnd, $sCmd) Sleep(100) ConsoleWrite('-->' & $sCmd & @LF) Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']') DllStructSetData($CmdStruct, 1, $sCmd) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr') DllStructSetData($COPYDATA, 1, 1) DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1) DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct)) DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $Scite_Dir_hwnd, _ 'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _ 'Ptr', DllStructGetPtr($COPYDATA)) EndFunc ;==>SendSciTE_Command ; Received Data from SciTE Func MY_WM_COPYDATA($hWnd, $msg, $wParam, $lParam) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr', $lParam) $SciTECmdLen = DllStructGetData($COPYDATA, 2) Local $CmdStruct = DllStructCreate('Char[255]', DllStructGetData($COPYDATA, 3)) $SciTECmd = StringLeft(DllStructGetData($CmdStruct, 1), $SciTECmdLen) ConsoleWrite('<--' & $SciTECmd & @LF) ;GUICtrlSetData($list,GUICtrlRead($list) & '<--' & $SciTECmd & @CRLF ) EndFunc ;==>MY_WM_COPYDATA Func _options() If WinExists("SciTE interface") Then GUIDelete($My_Hwnd) $opt1 = GUICreate("SciTE Toolbar Options", 400, 420, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) ;GUI CONTROLS SECTION--------------------------------------------------------- ;standard release $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, 150, 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) $group4 = GUICtrlCreateGroup("Built in SciTE Tools", 160, 0, 180, 300) GUICtrlSetBkColor($group4, 0xff0000) ; special - Run Section $group5 = GUICtrlCreateGroup("", 160, 307, 180, 40) GUICtrlSetBkColor($group4, 0xff0000) $Checkbox_34 = GUICtrlCreateCheckbox("Run External Program", 165, 307, 120, 14) $label_1A = GUICtrlCreateLabel("None", 165, 325, 120, 14) $button1A = GUICtrlCreateButton("Find", 285, 322, 45, 20) $button1 = GUICtrlCreateButton("Select All", 160, 355, 85, 25) $button2 = GUICtrlCreateButton("Remove All", 160, 385, 85, 25) $button3 = GUICtrlCreateButton("Apply and Close", 255, 355, 85, 25) $button4 = GUICtrlCreateButton("Cancel", 255, 385, 85, 25) #region -GUI STARTUP SETTINGS SECTION ;standard $item1 = "Rocket.ico|Run" $item2 = "Tools1.ico|Compile" $item3 = "Qmark.ico|AutoIt Helpfile V3.1.1" $item4 = "Envel.ico|SyntaxCheck" $item5 = "go.ico|Run with Beta" $item6 = "toolbox.ico|Compile with Beta" $item7 = "Book07.ico|Beta AutoIt Helpfile" $item8 = "SafetyHelmet.ico|Syntax Check Beta" $item9 = "FuncPopUp.ico|Function Popup" $item10 = "Binoculars1c.ico|AutoIt Window Info" $item11 = "SonyTRV99.ico|AU3Recorder" $item12 = "Etchasketch.ico|Macro Generator" $item13 = "tidy.ico|Tidy AutoIt Source" $item14 = "Wizard.ico|Code Wizard" $item15 = "CodelessDrill.ico|GUI Builder" $item16 = "Crayons.ico|Koda(FormDesigner)" $item17 = "au3.ico|AutoIt Forum" $item18 = "NotePad.ico|Insert Bookmarked Line(s)" $item19 = "IDBadge.ico|Debug to MsgBox" $item20 = "Zvaiofu045.ico|Debug to Console" $item21 = "Papertowels.ico|Debug Remove Lines" $item22 = "full.ico|Full Screen" $item23 = "text.ico|Show Call tip" $item24 = "incid.ICO|Complete Symble" $item25 = "upper.ico|Selected text Uppercase" $item26 = "lower.ico|Selected text Lowercase" $item27 = "padlock.ICO|Block comment or uncomment" $item28 = "OpenBox.ico|Box Comment" $item29 = "insert_abb.ICO|Insert Abbrevation" $item30 = "cleaner.ICO|Clear output" $item31 = "macro1.ico|Macro list" $item34 = "" #endregion #region - ini check to see what needs to be checked before GUI is enabled $check1 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "303", "") If $check1 = $item1 Then GUICtrlSetState($Checkbox_1, $GUI_CHECKED) $check2 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "301", "") If $check2 = $item2 Then GUICtrlSetState($Checkbox_2, $GUI_CHECKED) $check3 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "901", "") If $check3 = $item3 Then GUICtrlSetState($Checkbox_3, $GUI_CHECKED) $check4 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1103", "") If $check4 = $item4 Then GUICtrlSetState($Checkbox_4, $GUI_CHECKED) $check5 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1100", "") If $check5 = $item5 Then GUICtrlSetState($Checkbox_5, $GUI_CHECKED) $check6 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1101", "") If $check6 = $item6 Then GUICtrlSetState($Checkbox_6, $GUI_CHECKED) $check7 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1102", "") If $check7 = $item7 Then GUICtrlSetState($Checkbox_7, $GUI_CHECKED) $check8 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1104", "") If $check8 = $item8 Then GUICtrlSetState($Checkbox_8, $GUI_CHECKED) $check9 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1105", "") If $check9 = $item9 Then GUICtrlSetState($Checkbox_9, $GUI_CHECKED) $check10 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1106", "") If $check10 = $item10 Then GUICtrlSetState($Checkbox_10, $GUI_CHECKED) $check11 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1107", "") If $check11 = $item11 Then GUICtrlSetState($Checkbox_11, $GUI_CHECKED) $check12 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1108", "") If $check12 = $item12 Then GUICtrlSetState($Checkbox_12, $GUI_CHECKED) $check13 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1109", "") If $check13 = $item13 Then GUICtrlSetState($Checkbox_13, $GUI_CHECKED) $check14 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1110", "") If $check14 = $item14 Then GUICtrlSetState($Checkbox_14, $GUI_CHECKED) $check15 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1111", "") If $check15 = $item15 Then GUICtrlSetState($Checkbox_15, $GUI_CHECKED) $check16 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1112", "") If $check16 = $item16 Then GUICtrlSetState($Checkbox_16, $GUI_CHECKED) $check17 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "107", "") If $check17 = $item17 Then GUICtrlSetState($Checkbox_17, $GUI_CHECKED) $check18 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1123", "") If $check18 = $item18 Then GUICtrlSetState($Checkbox_18, $GUI_CHECKED) $check19 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1124", "") If $check19 = $item19 Then GUICtrlSetState($Checkbox_19, $GUI_CHECKED) $check20 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1125", "") If $check20 = $item20 Then GUICtrlSetState($Checkbox_20, $GUI_CHECKED) $check21 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1126", "") If $check21 = $item21 Then GUICtrlSetState($Checkbox_21, $GUI_CHECKED) $check22 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "961", "") If $check22 = $item22 Then GUICtrlSetState($Checkbox_22, $GUI_CHECKED) $check23 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "232", "") If $check23 = $item23 Then GUICtrlSetState($Checkbox_23, $GUI_CHECKED) $check24 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "233", "") If $check24 = $item24 Then GUICtrlSetState($Checkbox_24, $GUI_CHECKED) $check25 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "240", "") If $check25 = $item25 Then GUICtrlSetState($Checkbox_25, $GUI_CHECKED) $check26 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "241", "") If $check26 = $item26 Then GUICtrlSetState($Checkbox_26, $GUI_CHECKED) $check27 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "243", "") If $check27 = $item27 Then GUICtrlSetState($Checkbox_27, $GUI_CHECKED) $check28 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "246", "") If $check28 = $item28 Then GUICtrlSetState($Checkbox_28, $GUI_CHECKED) $check29 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "247", "") If $check29 = $item29 Then GUICtrlSetState($Checkbox_29, $GUI_CHECKED) $check30 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "420", "") If $check30 = $item30 Then GUICtrlSetState($Checkbox_30, $GUI_CHECKED) $check31 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "314", "") If $check31 = $item31 Then GUICtrlSetState($Checkbox_31, $GUI_CHECKED) $check34 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "99", "") If $check34 <> "" Then $split1 = StringSplit($check34, "|") $split = StringSplit($split1[2], ",") $E_file = $split[1] $R_file = $split[2] GUICtrlSetData($label_1A, $E_file) GUICtrlSetState($Checkbox_34, $GUI_CHECKED) EndIf #endregion GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button1A $R_file = FileOpenDialog("Find Program", @ScriptDir, "Executeable (*.exe)", 1 + 2) If Not @error Then $SplitA = StringSplit($R_file, "\") $E_file = $SplitA[UBound($SplitA) - 1] GUICtrlSetData($label_1A, $E_file) Else GUICtrlSetData($label_1A, "None") EndIf Case $msg = $button1 GUICtrlSetState($Checkbox_1, $GUI_CHECKED) GUICtrlSetState($Checkbox_2, $GUI_CHECKED) GUICtrlSetState($Checkbox_3, $GUI_CHECKED) GUICtrlSetState($Checkbox_4, $GUI_CHECKED) GUICtrlSetState($Checkbox_5, $GUI_CHECKED) GUICtrlSetState($Checkbox_6, $GUI_CHECKED) GUICtrlSetState($Checkbox_7, $GUI_CHECKED) GUICtrlSetState($Checkbox_8, $GUI_CHECKED) GUICtrlSetState($Checkbox_9, $GUI_CHECKED) GUICtrlSetState($Checkbox_10, $GUI_CHECKED) GUICtrlSetState($Checkbox_11, $GUI_CHECKED) GUICtrlSetState($Checkbox_12, $GUI_CHECKED) GUICtrlSetState($Checkbox_13, $GUI_CHECKED) GUICtrlSetState($Checkbox_14, $GUI_CHECKED) GUICtrlSetState($Checkbox_15, $GUI_CHECKED) GUICtrlSetState($Checkbox_16, $GUI_CHECKED) GUICtrlSetState($Checkbox_17, $GUI_CHECKED) GUICtrlSetState($Checkbox_18, $GUI_CHECKED) GUICtrlSetState($Checkbox_19, $GUI_CHECKED) GUICtrlSetState($Checkbox_20, $GUI_CHECKED) GUICtrlSetState($Checkbox_21, $GUI_CHECKED) GUICtrlSetState($Checkbox_22, $GUI_CHECKED) GUICtrlSetState($Checkbox_23, $GUI_CHECKED) GUICtrlSetState($Checkbox_24, $GUI_CHECKED) GUICtrlSetState($Checkbox_25, $GUI_CHECKED) GUICtrlSetState($Checkbox_26, $GUI_CHECKED) GUICtrlSetState($Checkbox_27, $GUI_CHECKED) GUICtrlSetState($Checkbox_28, $GUI_CHECKED) GUICtrlSetState($Checkbox_29, $GUI_CHECKED) GUICtrlSetState($Checkbox_30, $GUI_CHECKED) GUICtrlSetState($Checkbox_31, $GUI_CHECKED) GUICtrlSetState($Checkbox_34, $GUI_CHECKED) Case $msg = $button2 GUICtrlSetState($Checkbox_1, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_2, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_3, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_4, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_5, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_6, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_7, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_8, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_9, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_10, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_11, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_12, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_13, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_14, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_15, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_16, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_17, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_18, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_19, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_20, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_21, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_22, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_23, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_24, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_25, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_26, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_27, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_28, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_29, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_30, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_31, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_34, $GUI_UNCHECKED) Case $msg = $button3 IniDelete(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "bar", "") $ch1 = GUICtrlRead($Checkbox_1) $ch2 = GUICtrlRead($Checkbox_2) $ch3 = GUICtrlRead($Checkbox_3) $ch4 = GUICtrlRead($Checkbox_4) If $ch1 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "303", $item1) If $ch2 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "301", $item2) If $ch3 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "901", $item3) If $ch4 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1103", $item4) If $ch1 = 1 Or $ch2 = 1 Or $ch3 = 1 Or $ch4 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch5 = GUICtrlRead($Checkbox_5) $ch6 = GUICtrlRead($Checkbox_6) $ch7 = GUICtrlRead($Checkbox_7) $ch8 = GUICtrlRead($Checkbox_8) If $ch5 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1100", $item5) If $ch6 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1101", $item6) If $ch7 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1102", $item7) If $ch8 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1104", $item8) If $ch5 = 1 Or $ch6 = 1 Or $ch7 = 1 Or $ch8 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch9 = GUICtrlRead($Checkbox_9) $ch10 = GUICtrlRead($Checkbox_10) $ch11 = GUICtrlRead($Checkbox_11) $ch12 = GUICtrlRead($Checkbox_12) $ch13 = GUICtrlRead($Checkbox_13) $ch14 = GUICtrlRead($Checkbox_14) $ch15 = GUICtrlRead($Checkbox_15) $ch16 = GUICtrlRead($Checkbox_16) $ch17 = GUICtrlRead($Checkbox_17) If $ch9 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1105", $item9) If $ch10 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1106", $item10) If $ch11 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1107", $item11) If $ch12 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1108", $item12) If $ch13 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1109", $item13) If $ch14 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1110", $item14) If $ch15 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1111", $item15) If $ch16 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1112", $item16) If $ch17 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "107", $item17) If $ch9 = 1 Or $ch10 = 1 Or $ch11 = 1 Or $ch12 = 1 Or $ch13 = 1 Or $ch14 = 1 Or $ch15 = 1 Or $ch16 = 1 Or $ch17 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch18 = GUICtrlRead($Checkbox_18) $ch19 = GUICtrlRead($Checkbox_19) $ch20 = GUICtrlRead($Checkbox_20) $ch21 = GUICtrlRead($Checkbox_21) $ch22 = GUICtrlRead($Checkbox_22) $ch23 = GUICtrlRead($Checkbox_23) $ch24 = GUICtrlRead($Checkbox_24) $ch25 = GUICtrlRead($Checkbox_25) $ch26 = GUICtrlRead($Checkbox_26) $ch27 = GUICtrlRead($Checkbox_27) $ch28 = GUICtrlRead($Checkbox_28) $ch29 = GUICtrlRead($Checkbox_29) $ch30 = GUICtrlRead($Checkbox_30) $ch31 = GUICtrlRead($Checkbox_31) If $ch18 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1123", $item18) If $ch19 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1124", $item19) If $ch20 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1125", $item20) If $ch21 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1126", $item21) If $ch22 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "961", $item22) If $ch23 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "232", $item23) If $ch24 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "233", $item24) If $ch25 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "240", $item25) If $ch26 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "241", $item26) If $ch27 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "243", $item27) If $ch28 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "246", $item28) If $ch29 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "247", $item29) If $ch30 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "420", $item30) If $ch31 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "314", $item31) If $ch18 = 1 Or $ch19 = 1 Or $ch20 = 1 Or $ch21 = 1 Or $ch22 = 1 Or $ch23 = 1 Or $ch24 = 1 Or $ch25 = 1 Or $ch26 = 1 Or $ch27 = 1 Or $ch28 = 1 Or $ch29 = 1 Or $ch30 = 1 Or $ch31 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch34 = GUICtrlRead($Checkbox_34) If $ch34 = 1 Then If FileExists($R_file) Then $item34 = "Run.ico|" & $E_file & "," & $R_file IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "99", $item34) FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") EndIf EndIf IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "108", $item32) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "9999", $item33) FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") GUIDelete($opt1) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "0") _restart() Case $msg = $button4 GUIDelete($opt1) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "0") MsgBox(0, "Important!", "You will need to click on the options icon to configure what buttons you want on the toolbar") _restart() ;;; EndSelect WEnd Exit EndFunc ;==>_options Func _restart() If @Compiled = 1 Then Run(FileGetShortName(@ScriptFullPath)) Else Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath)) EndIf Exit EndFunc ;==>_restart #cs Here are the other values that could be useful for you: Go = 301 Compile = 302 Complete list from the SciTE source file scite.h // Menu IDs. // These are located 100 apart. No one will want more than 100 in each menu #define IDM_MRUFILE 1000 #define IDM_TOOLS 1100 #define IDM_BUFFER 1200 #define IDM_IMPORT 1300 #define IDM_LANGUAGE 1400 // File #define IDM_NEW 101 #define IDM_OPEN 102 #define IDM_OPENSELECTED 103 #define IDM_REVERT 104 #define IDM_CLOSE 105 #define IDM_SAVE 106 #define IDM_SAVEAS 110 #define IDM_SAVEASHTML 111 #define IDM_SAVEASRTF 112 #define IDM_SAVEASPDF 113 #define IDM_FILER 114 #define IDM_SAVEASTEX 115 #define IDM_SAVEACOPY 116 #define IDM_SAVEASXML 117 #define IDM_MRU_SEP 120 #define IDM_PRINTSETUP 130 #define IDM_PRINT 131 #define IDM_LOADSESSION 132 #define IDM_SAVESESSION 133 #define IDM_QUIT 140 #define IDM_ENCODING_DEFAULT 150 #define IDM_ENCODING_UCS2BE 151 #define IDM_ENCODING_UCS2LE 152 #define IDM_ENCODING_UTF8 153 #define IDM_ENCODING_UCOOKIE 154 #define MRU_START 16 #define IMPORT_START 19 #define TOOLS_START 3 // Edit #define IDM_UNDO 201 #define IDM_REDO 202 #define IDM_CUT 203 #define IDM_COPY 204 #define IDM_PASTE 205 #define IDM_CLEAR 206 #define IDM_SELECTALL 207 #define IDM_PASTEANDDOWN 208 #define IDM_FIND 210 #define IDM_FINDNEXT 211 #define IDM_FINDNEXTBACK 212 #define IDM_FINDNEXTSEL 213 #define IDM_FINDNEXTBACKSEL 214 #define IDM_FINDINFILES 215 #define IDM_REPLACE 216 #define IDM_GOTO 220 #define IDM_BOOKMARK_NEXT 221 #define IDM_BOOKMARK_TOGGLE 222 #define IDM_BOOKMARK_PREV 223 #define IDM_BOOKMARK_CLEARALL 224 #define IDM_BOOKMARK_NEXT_SELECT 225 #define IDM_BOOKMARK_PREV_SELECT 226 #define IDM_MATCHBRACE 230 #define IDM_SELECTTOBRACE 231 #define IDM_SHOWCALLTIP 232 #define IDM_COMPLETE 233 #define IDM_COMPLETEWORD 234 #define IDM_EXPAND 235 #define IDM_TOGGLE_FOLDALL 236 #define IDM_TOGGLE_FOLDRECURSIVE 237 #define IDM_EXPAND_ENSURECHILDRENVISIBLE 238 #define IDM_UPRCASE 240 #define IDM_LWRCASE 241 #define IDM_ABBREV 242 #define IDM_BLOCK_COMMENT 243 #define IDM_STREAM_COMMENT 244 #define IDM_COPYASRTF 245 #define IDM_BOX_COMMENT 246 #define IDM_INS_ABBREV 247 #define IDM_JOIN 248 #define IDM_SPLIT 249 #define IDM_DUPLICATE 250 #define IDM_INCSEARCH 252 #define IDM_ENTERSELECTION 256 #define IDC_INCFINDTEXT 253 #define IDC_INCFINDBTNOK 254 #define IDD_FIND2 255 #define IDC_EDIT1 1000 #define IDC_STATIC -1 #define IDM_PREVMATCHPPC 260 #define IDM_SELECTTOPREVMATCHPPC 261 #define IDM_NEXTMATCHPPC 262 #define IDM_SELECTTONEXTMATCHPPC 263 // Tools #define IDM_COMPILE 301 #define IDM_BUILD 302 #define IDM_GO 303 #define IDM_STOPEXECUTE 304 #define IDM_FINISHEDEXECUTE 305 #define IDM_NEXTMSG 306 #define IDM_PREVMSG 307 #define IDM_MACRO_SEP 310 #define IDM_MACRORECORD 311 #define IDM_MACROSTOPRECORD 312 #define IDM_MACROPLAY 313 #define IDM_MACROLIST 314 #define IDM_ACTIVATE 320 #define IDM_SRCWIN 350 #define IDM_RUNWIN 351 #define IDM_TOOLWIN 352 #define IDM_STATUSWIN 353 #define IDM_TABWIN 354 // Options #define IDM_SPLITVERTICAL 401 #define IDM_VIEWSPACE 402 #define IDM_VIEWEOL 403 #define IDM_VIEWGUIDES 404 #define IDM_SELMARGIN 405 #define IDM_FOLDMARGIN 406 #define IDM_LINENUMBERMARGIN 407 #define IDM_VIEWTOOLBAR 408 #define IDM_TOGGLEOUTPUT 409 #define IDM_VIEWTABBAR 410 #define IDM_VIEWSTATUSBAR 411 #define IDM_TOGGLEPARAMETERS 412 #define IDM_OPENFILESHERE 413 #define IDM_WRAP 414 #define IDM_WRAPOUTPUT 415 #define IDM_READONLY 416 #define IDM_CLEAROUTPUT 420 #define IDM_SWITCHPANE 421 #define IDM_EOL_CRLF 430 #define IDM_EOL_CR 431 #define IDM_EOL_LF 432 #define IDM_EOL_CONVERT 433 #define IDM_TABSIZE 440 #define IDM_MONOFONT 450 #define IDM_OPENLOCALPROPERTIES 460 #define IDM_OPENUSERPROPERTIES 461 #define IDM_OPENGLOBALPROPERTIES 462 #define IDM_OPENABBREVPROPERTIES 463 #define IDM_OPENLUAEXTERNALFILE 464 //#define IDM_SELECTIONMARGIN 490 //#define IDM_BUFFEREDDRAW 491 //#define IDM_USEPALETTE 492 // Buffers #define IDM_PREVFILE 501 #define IDM_NEXTFILE 502 #define IDM_CLOSEALL 503 #define IDM_SAVEALL 504 #define IDM_BUFFERSEP 505 #define IDM_PREVFILESTACK 506 #define IDM_NEXTFILESTACK 507 // Help #define IDM_HELP 901 #define IDM_ABOUT 902 #define IDM_HELP_SCITE 903 // Windows specific windowing options #define IDM_ONTOP 960 #define IDM_FULLSCREEN 961 // Dialog control IDs #define IDGOLINE 220 #define IDABOUTSCINTILLA 221 #define IDFINDWHAT 222 #define IDFILES 223 #define IDDIRECTORY 224 #define IDCURRLINE 225 #define IDLASTLINE 226 #define IDEXTEND 227 #define IDTABSIZE 228 #define IDINDENTSIZE 229 #define IDUSETABS 230 #define IDREPLACEWITH 231 #define IDWHOLEWORD 232 #define IDMATCHCASE 233 #define IDDIRECTIONUP 234 #define IDDIRECTIONDOWN 235 #define IDREPLACE 236 #define IDREPLACEALL 237 #define IDREPLACEINSEL 238 #define IDREGEXP 239 #define IDWRAP 240 #define IDUNSLASH 241 #define IDCMD 242 // id for the browse button in the grep dialog #define IDBROWSE 243 #define IDABBREV 244 #define IDREPLACEINBUF 244 #define IDMARKALL 245 #define IDGOLINECHAR 246 #define IDCURRLINECHAR 247 #define IDREPLDONE 248 #define IDDOTDOT 249 #define IDFINDINSTYLE 250 #define IDFINDSTYLE 251 #define IDPARAMSTART 300 // Dialog IDs #define IDD_FIND 400 #define IDD_REPLACE 401 #define IDD_BUFFERS 402 #define IDD_FIND_ADV 403 #define IDD_REPLACE_ADV 404 #define IDR_CLOSEFILE 100 #ce 8) Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 25, 2007 Author Share Posted April 25, 2007 just codebox an autoit boxNo, that has to be the wrong answer because I didn't think of it, it's too easy, and I wnat to pay homage to litlmike's previous poll (which I found truly funny). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Valuater Posted April 25, 2007 Share Posted April 25, 2007 No, that has to be the wrong answer because I didn't think of it, it's too easy, and I wnat to pay homage to litlmike's previous poll (which I found truly funny). LOL8) Link to comment Share on other sites More sharing options...
litlmike Posted April 25, 2007 Share Posted April 25, 2007 LOL!!!! That is awesome... maybe you can make the Poll: 1) Yes - PsaltyDS is a genius 2) No - litlmike is an idiot 3) Yes - Psalty is a genius AND litlmike is an idiot 4) I don't care either way - I just want to let the world know that litlmike is an idiot _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Gabburd Posted April 25, 2007 Share Posted April 25, 2007 Currently there seems to be a disadvantage in doing this, if anyone copying your code uses IE7.See: http://www.autoitscript.com/forum/index.ph...c=44854&hl= Link to comment Share on other sites More sharing options...
Bert Posted April 26, 2007 Share Posted April 26, 2007 just codebox an autoit box expandcollapse popup _linenums:0'>SciTE toolbar version 1.7 ;Concept by Volly ;Written by JdeB, Gafrost, and Volly ;contributers include: Valuater, thatsgreat2345, JSThePatriot: for helping with either ; bug discovery, or fix suggestions. THANK YOU! ;---------------------------------------------------------------------------------------- #cs Notes: Changes from 1.6: 1. Icon folder name changed to bin 2. INI file is now located in bin folder 3. Options menu added to allow for adding or removing buttons 4. Divider bars now more closely match SciTE's built in toolbar 5. Dividers will now divide by group instead of 4 icons 6. No need to make the ini file anymore. If one doesn't exist, the script will make one, then open the options menu to allw for you to pick the buttons you want to use. 6. Icons added. If you wish to add icons of your choosing, goto http://www.iconarchive.com to download icons for free #ce ; SERACH ME??? ; http://www.autoitscript.com/forum/index.php?act=Search&CODE=01&forums=9&namesearch=Valuater&search_in=titles&result_type=topics #NoTrayIcon #include<guiconstants.au3> #include<misc.au3> #include<string.au3> Opt("MouseCoordMode", 2) Opt("WinSearchChildren", 1) Opt("WinTitleMatchMode", 4) $item32 = "Pinchers.ICO|Options" ;moved from list below. $item33 = "Door2.ico|Exit Toolbar" ;moved from list below ;INI file check. If INI doesn't exist, one is made. $chkF = FileExists(@ScriptDir & "\bin\SciteToolbar.ini") If $chkF = 0 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "top", "54") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "bar", "") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "108", $item32) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "9999", $item33) FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "1") EndIf ;Check if SciTE is running and start it if needed. If Not ProcessExists("SciTE.exe") Then Global $SciTE_Dir = RegRead('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\SciTE.exe', '') Run($SciTE_Dir) If Not WinWait("classname=SciTEWindow", 3000) Then Exit EndIf Global $Forums If Not ProcessExists("Firefox.exe") Then $Forums = "1" ; "" or 1 to run firefox/forums If _Singleton("SciTEAdditionalIcons", 1) = 0 Then Exit Global $WM_COPYDATA = 74 Global $SciTECmd, $E_file, $R_file Global $last_SciTE_Pos_x = -99999 Global $last_SciTE_Pos_y = -99999 Global $Scite_Hwnd = WinGetHandle("classname=SciTEWindow") Global $Scite_pos = WinGetPos($Scite_Hwnd) Global $w_size = WinGetClientSize($Scite_Hwnd) ; Get SciTE DirectorHandle Global $Scite_Dir_hwnd = WinGetHandle("DirectorExtension") ; Get My GUI Handle numeric Global $My_Hwnd = GUICreate("SciTE interface", 100, 18, Default, Default, $WS_POPUP, $WS_EX_TOOLWINDOW, $Scite_Hwnd) Global $My_Gui_Width = 0 Global $go[1][2] $Toolbar_Info = IniReadSection(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar") $BarTop_Add = Int(IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "Bar", "Top", 54)) _Adjust_Toolbar_Info($Toolbar_Info) _CreateToolbar($go, $Toolbar_Info, $My_Gui_Width) ;GUISetState() $My_Dec_Hwnd = Dec(StringTrimLeft($My_Hwnd, 2)) ;Register COPYDATA message. GUIRegisterMsg($WM_COPYDATA, "MY_WM_COPYDATA") ;GUISetState() While 1 If Not WinExists($Scite_Hwnd) Then Exit $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit If $msg > 1 Then For $x = 0 To UBound($go) - 1 If $msg = $go[$x][0] Then If $go[$x][1] = 9999 Then Exit If $go[$x][1] = 99 Then If FileExists($R_file) Then Run(FileGetShortName($R_file)) EndIf If $go[$x][1] = 961 Then Send("{F11}") If $go[$x][1] = 107 Then $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) EndIf If $go[$x][1] = 108 Then _options() EndIf SendSciTE_Command($My_Hwnd, $Scite_Dir_hwnd, StringFormat("menucommand:%04d", $go[$x][1])) _tiprefresh() ExitLoop EndIf Next EndIf ; set position of window correct If WinActive($Scite_Hwnd) Or WinActive($My_Hwnd) Then $Scite_pos = WinGetPos($Scite_Hwnd) If $Scite_pos[0] <> $last_SciTE_Pos_x Or $Scite_pos[1] <> $last_SciTE_Pos_y Then $last_SciTE_Pos_x = $Scite_pos[0] $last_SciTE_Pos_y = $Scite_pos[1] $w_size = WinGetClientSize($Scite_Hwnd) WinMove($My_Hwnd, '', $Scite_pos[0] + 360, $Scite_pos[1] + ($Scite_pos[3] - $w_size[1]), $My_Gui_Width, 18) GUISetState(@SW_SHOW) EndIf EndIf ; Re activate SciTE when Buttn window is activated If WinActive($My_Hwnd) Then WinActivate($Scite_Hwnd) EndIf ;if IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "") = 1 then _options() If $Forums = 1 Then $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) $Forums = "" EndIf WEnd Exit Func _Adjust_Toolbar_Info(ByRef $Toolbar_Info) ReDim $Toolbar_Info[UBound($Toolbar_Info) - 1][3] Local $tmp_string For $x = 1 To UBound($Toolbar_Info) - 1 If $Toolbar_Info[$x][0] <> "bar" Then $tmp_string = StringSplit($Toolbar_Info[$x][1], "|") $Toolbar_Info[$x][1] = $tmp_string[1] $Toolbar_Info[$x][2] = $tmp_string[2] EndIf Next EndFunc ;==>_Adjust_Toolbar_Info ; Func _CreateToolbar(ByRef $go, ByRef $Toolbar_Info, ByRef $My_Gui_Width) Local $x, $y, $bar ReDim $go[UBound($Toolbar_Info) ][2] $y = 1 For $x = 1 To UBound($Toolbar_Info) - 1 If $Toolbar_Info[$x][0] = "bar" Then $vbar1 = GUICtrlCreateGraphic($y, 1, 1, 24, $SS_GRAYFRAME) GUICtrlSetBkColor($vbar1, 0xFF0000) GUICtrlSetResizing($vbar1, $GUI_DOCKALL) $vbar2 = GUICtrlCreateGraphic(($y + 1), 1, 1, 24) GUICtrlSetBkColor($vbar2, 0xffffff) GUICtrlSetResizing($vbar2, $GUI_DOCKALL) $y += 5 Else $go[$x][0] = GUICtrlCreateIcon(@ScriptDir & "\bin\" & $Toolbar_Info[$x][1], -1, $y + 4, 1, 16, 16, Default, $SS_LEFT) $go[$x][1] = Number($Toolbar_Info[$x][0]) If $go[$x][1] = 99 Then $SplitB = StringSplit($Toolbar_Info[$x][2], ",") $E_file = $SplitB[1] $R_file = $SplitB[2] $Toolbar_Info[$x][2] = $E_file GUICtrlSetTip($go[$x][0], $Toolbar_Info[$x][2]) Else GUICtrlSetTip($go[$x][0], $Toolbar_Info[$x][2]) EndIf $y += 24 EndIf Next $My_Gui_Width = $y EndFunc ;==>_CreateToolbar ; Refreshes tip on icon after icon is clicked. Func _tiprefresh() For $x = 1 To UBound($Toolbar_Info) - 1 GUICtrlSetTip($go[$x][0], $Toolbar_Info[$x][2]) Next EndFunc ;==>_tiprefresh ; Send command to SciTE Func SendSciTE_Command($My_Hwnd, $Scite_Dir_hwnd, $sCmd) Sleep(100) ConsoleWrite('-->' & $sCmd & @LF) Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']') DllStructSetData($CmdStruct, 1, $sCmd) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr') DllStructSetData($COPYDATA, 1, 1) DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1) DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct)) DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $Scite_Dir_hwnd, _ 'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _ 'Ptr', DllStructGetPtr($COPYDATA)) EndFunc ;==>SendSciTE_Command ; Received Data from SciTE Func MY_WM_COPYDATA($hWnd, $msg, $wParam, $lParam) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr', $lParam) $SciTECmdLen = DllStructGetData($COPYDATA, 2) Local $CmdStruct = DllStructCreate('Char[255]', DllStructGetData($COPYDATA, 3)) $SciTECmd = StringLeft(DllStructGetData($CmdStruct, 1), $SciTECmdLen) ConsoleWrite('<--' & $SciTECmd & @LF) ;GUICtrlSetData($list,GUICtrlRead($list) & '<--' & $SciTECmd & @CRLF ) EndFunc ;==>MY_WM_COPYDATA Func _options() If WinExists("SciTE interface") Then GUIDelete($My_Hwnd) $opt1 = GUICreate("SciTE Toolbar Options", 400, 420, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) ;GUI CONTROLS SECTION--------------------------------------------------------- ;standard release $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, 150, 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) $group4 = GUICtrlCreateGroup("Built in SciTE Tools", 160, 0, 180, 300) GUICtrlSetBkColor($group4, 0xff0000) ; special - Run Section $group5 = GUICtrlCreateGroup("", 160, 307, 180, 40) GUICtrlSetBkColor($group4, 0xff0000) $Checkbox_34 = GUICtrlCreateCheckbox("Run External Program", 165, 307, 120, 14) $label_1A = GUICtrlCreateLabel("None", 165, 325, 120, 14) $button1A = GUICtrlCreateButton("Find", 285, 322, 45, 20) $button1 = GUICtrlCreateButton("Select All", 160, 355, 85, 25) $button2 = GUICtrlCreateButton("Remove All", 160, 385, 85, 25) $button3 = GUICtrlCreateButton("Apply and Close", 255, 355, 85, 25) $button4 = GUICtrlCreateButton("Cancel", 255, 385, 85, 25) #region -GUI STARTUP SETTINGS SECTION ;standard $item1 = "Rocket.ico|Run" $item2 = "Tools1.ico|Compile" $item3 = "Qmark.ico|AutoIt Helpfile V3.1.1" $item4 = "Envel.ico|SyntaxCheck" $item5 = "go.ico|Run with Beta" $item6 = "toolbox.ico|Compile with Beta" $item7 = "Book07.ico|Beta AutoIt Helpfile" $item8 = "SafetyHelmet.ico|Syntax Check Beta" $item9 = "FuncPopUp.ico|Function Popup" $item10 = "Binoculars1c.ico|AutoIt Window Info" $item11 = "SonyTRV99.ico|AU3Recorder" $item12 = "Etchasketch.ico|Macro Generator" $item13 = "tidy.ico|Tidy AutoIt Source" $item14 = "Wizard.ico|Code Wizard" $item15 = "CodelessDrill.ico|GUI Builder" $item16 = "Crayons.ico|Koda(FormDesigner)" $item17 = "au3.ico|AutoIt Forum" $item18 = "NotePad.ico|Insert Bookmarked Line(s)" $item19 = "IDBadge.ico|Debug to MsgBox" $item20 = "Zvaiofu045.ico|Debug to Console" $item21 = "Papertowels.ico|Debug Remove Lines" $item22 = "full.ico|Full Screen" $item23 = "text.ico|Show Call tip" $item24 = "incid.ICO|Complete Symble" $item25 = "upper.ico|Selected text Uppercase" $item26 = "lower.ico|Selected text Lowercase" $item27 = "padlock.ICO|Block comment or uncomment" $item28 = "OpenBox.ico|Box Comment" $item29 = "insert_abb.ICO|Insert Abbrevation" $item30 = "cleaner.ICO|Clear output" $item31 = "macro1.ico|Macro list" $item34 = "" #endregion #region - ini check to see what needs to be checked before GUI is enabled $check1 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "303", "") If $check1 = $item1 Then GUICtrlSetState($Checkbox_1, $GUI_CHECKED) $check2 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "301", "") If $check2 = $item2 Then GUICtrlSetState($Checkbox_2, $GUI_CHECKED) $check3 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "901", "") If $check3 = $item3 Then GUICtrlSetState($Checkbox_3, $GUI_CHECKED) $check4 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1103", "") If $check4 = $item4 Then GUICtrlSetState($Checkbox_4, $GUI_CHECKED) $check5 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1100", "") If $check5 = $item5 Then GUICtrlSetState($Checkbox_5, $GUI_CHECKED) $check6 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1101", "") If $check6 = $item6 Then GUICtrlSetState($Checkbox_6, $GUI_CHECKED) $check7 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1102", "") If $check7 = $item7 Then GUICtrlSetState($Checkbox_7, $GUI_CHECKED) $check8 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1104", "") If $check8 = $item8 Then GUICtrlSetState($Checkbox_8, $GUI_CHECKED) $check9 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1105", "") If $check9 = $item9 Then GUICtrlSetState($Checkbox_9, $GUI_CHECKED) $check10 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1106", "") If $check10 = $item10 Then GUICtrlSetState($Checkbox_10, $GUI_CHECKED) $check11 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1107", "") If $check11 = $item11 Then GUICtrlSetState($Checkbox_11, $GUI_CHECKED) $check12 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1108", "") If $check12 = $item12 Then GUICtrlSetState($Checkbox_12, $GUI_CHECKED) $check13 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1109", "") If $check13 = $item13 Then GUICtrlSetState($Checkbox_13, $GUI_CHECKED) $check14 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1110", "") If $check14 = $item14 Then GUICtrlSetState($Checkbox_14, $GUI_CHECKED) $check15 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1111", "") If $check15 = $item15 Then GUICtrlSetState($Checkbox_15, $GUI_CHECKED) $check16 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1112", "") If $check16 = $item16 Then GUICtrlSetState($Checkbox_16, $GUI_CHECKED) $check17 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "107", "") If $check17 = $item17 Then GUICtrlSetState($Checkbox_17, $GUI_CHECKED) $check18 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1123", "") If $check18 = $item18 Then GUICtrlSetState($Checkbox_18, $GUI_CHECKED) $check19 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1124", "") If $check19 = $item19 Then GUICtrlSetState($Checkbox_19, $GUI_CHECKED) $check20 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1125", "") If $check20 = $item20 Then GUICtrlSetState($Checkbox_20, $GUI_CHECKED) $check21 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1126", "") If $check21 = $item21 Then GUICtrlSetState($Checkbox_21, $GUI_CHECKED) $check22 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "961", "") If $check22 = $item22 Then GUICtrlSetState($Checkbox_22, $GUI_CHECKED) $check23 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "232", "") If $check23 = $item23 Then GUICtrlSetState($Checkbox_23, $GUI_CHECKED) $check24 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "233", "") If $check24 = $item24 Then GUICtrlSetState($Checkbox_24, $GUI_CHECKED) $check25 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "240", "") If $check25 = $item25 Then GUICtrlSetState($Checkbox_25, $GUI_CHECKED) $check26 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "241", "") If $check26 = $item26 Then GUICtrlSetState($Checkbox_26, $GUI_CHECKED) $check27 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "243", "") If $check27 = $item27 Then GUICtrlSetState($Checkbox_27, $GUI_CHECKED) $check28 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "246", "") If $check28 = $item28 Then GUICtrlSetState($Checkbox_28, $GUI_CHECKED) $check29 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "247", "") If $check29 = $item29 Then GUICtrlSetState($Checkbox_29, $GUI_CHECKED) $check30 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "420", "") If $check30 = $item30 Then GUICtrlSetState($Checkbox_30, $GUI_CHECKED) $check31 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "314", "") If $check31 = $item31 Then GUICtrlSetState($Checkbox_31, $GUI_CHECKED) $check34 = IniRead(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "99", "") If $check34 <> "" Then $split1 = StringSplit($check34, "|") $split = StringSplit($split1[2], ",") $E_file = $split[1] $R_file = $split[2] GUICtrlSetData($label_1A, $E_file) GUICtrlSetState($Checkbox_34, $GUI_CHECKED) EndIf #endregion GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button1A $R_file = FileOpenDialog("Find Program", @ScriptDir, "Executeable (*.exe)", 1 + 2) If Not @error Then $SplitA = StringSplit($R_file, "\") $E_file = $SplitA[UBound($SplitA) - 1] GUICtrlSetData($label_1A, $E_file) Else GUICtrlSetData($label_1A, "None") EndIf Case $msg = $button1 GUICtrlSetState($Checkbox_1, $GUI_CHECKED) GUICtrlSetState($Checkbox_2, $GUI_CHECKED) GUICtrlSetState($Checkbox_3, $GUI_CHECKED) GUICtrlSetState($Checkbox_4, $GUI_CHECKED) GUICtrlSetState($Checkbox_5, $GUI_CHECKED) GUICtrlSetState($Checkbox_6, $GUI_CHECKED) GUICtrlSetState($Checkbox_7, $GUI_CHECKED) GUICtrlSetState($Checkbox_8, $GUI_CHECKED) GUICtrlSetState($Checkbox_9, $GUI_CHECKED) GUICtrlSetState($Checkbox_10, $GUI_CHECKED) GUICtrlSetState($Checkbox_11, $GUI_CHECKED) GUICtrlSetState($Checkbox_12, $GUI_CHECKED) GUICtrlSetState($Checkbox_13, $GUI_CHECKED) GUICtrlSetState($Checkbox_14, $GUI_CHECKED) GUICtrlSetState($Checkbox_15, $GUI_CHECKED) GUICtrlSetState($Checkbox_16, $GUI_CHECKED) GUICtrlSetState($Checkbox_17, $GUI_CHECKED) GUICtrlSetState($Checkbox_18, $GUI_CHECKED) GUICtrlSetState($Checkbox_19, $GUI_CHECKED) GUICtrlSetState($Checkbox_20, $GUI_CHECKED) GUICtrlSetState($Checkbox_21, $GUI_CHECKED) GUICtrlSetState($Checkbox_22, $GUI_CHECKED) GUICtrlSetState($Checkbox_23, $GUI_CHECKED) GUICtrlSetState($Checkbox_24, $GUI_CHECKED) GUICtrlSetState($Checkbox_25, $GUI_CHECKED) GUICtrlSetState($Checkbox_26, $GUI_CHECKED) GUICtrlSetState($Checkbox_27, $GUI_CHECKED) GUICtrlSetState($Checkbox_28, $GUI_CHECKED) GUICtrlSetState($Checkbox_29, $GUI_CHECKED) GUICtrlSetState($Checkbox_30, $GUI_CHECKED) GUICtrlSetState($Checkbox_31, $GUI_CHECKED) GUICtrlSetState($Checkbox_34, $GUI_CHECKED) Case $msg = $button2 GUICtrlSetState($Checkbox_1, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_2, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_3, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_4, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_5, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_6, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_7, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_8, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_9, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_10, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_11, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_12, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_13, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_14, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_15, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_16, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_17, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_18, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_19, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_20, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_21, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_22, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_23, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_24, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_25, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_26, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_27, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_28, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_29, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_30, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_31, $GUI_UNCHECKED) GUICtrlSetState($Checkbox_34, $GUI_UNCHECKED) Case $msg = $button3 IniDelete(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar") IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "bar", "") $ch1 = GUICtrlRead($Checkbox_1) $ch2 = GUICtrlRead($Checkbox_2) $ch3 = GUICtrlRead($Checkbox_3) $ch4 = GUICtrlRead($Checkbox_4) If $ch1 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "303", $item1) If $ch2 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "301", $item2) If $ch3 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "901", $item3) If $ch4 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1103", $item4) If $ch1 = 1 Or $ch2 = 1 Or $ch3 = 1 Or $ch4 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch5 = GUICtrlRead($Checkbox_5) $ch6 = GUICtrlRead($Checkbox_6) $ch7 = GUICtrlRead($Checkbox_7) $ch8 = GUICtrlRead($Checkbox_8) If $ch5 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1100", $item5) If $ch6 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1101", $item6) If $ch7 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1102", $item7) If $ch8 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1104", $item8) If $ch5 = 1 Or $ch6 = 1 Or $ch7 = 1 Or $ch8 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch9 = GUICtrlRead($Checkbox_9) $ch10 = GUICtrlRead($Checkbox_10) $ch11 = GUICtrlRead($Checkbox_11) $ch12 = GUICtrlRead($Checkbox_12) $ch13 = GUICtrlRead($Checkbox_13) $ch14 = GUICtrlRead($Checkbox_14) $ch15 = GUICtrlRead($Checkbox_15) $ch16 = GUICtrlRead($Checkbox_16) $ch17 = GUICtrlRead($Checkbox_17) If $ch9 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1105", $item9) If $ch10 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1106", $item10) If $ch11 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1107", $item11) If $ch12 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1108", $item12) If $ch13 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1109", $item13) If $ch14 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1110", $item14) If $ch15 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1111", $item15) If $ch16 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1112", $item16) If $ch17 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "107", $item17) If $ch9 = 1 Or $ch10 = 1 Or $ch11 = 1 Or $ch12 = 1 Or $ch13 = 1 Or $ch14 = 1 Or $ch15 = 1 Or $ch16 = 1 Or $ch17 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch18 = GUICtrlRead($Checkbox_18) $ch19 = GUICtrlRead($Checkbox_19) $ch20 = GUICtrlRead($Checkbox_20) $ch21 = GUICtrlRead($Checkbox_21) $ch22 = GUICtrlRead($Checkbox_22) $ch23 = GUICtrlRead($Checkbox_23) $ch24 = GUICtrlRead($Checkbox_24) $ch25 = GUICtrlRead($Checkbox_25) $ch26 = GUICtrlRead($Checkbox_26) $ch27 = GUICtrlRead($Checkbox_27) $ch28 = GUICtrlRead($Checkbox_28) $ch29 = GUICtrlRead($Checkbox_29) $ch30 = GUICtrlRead($Checkbox_30) $ch31 = GUICtrlRead($Checkbox_31) If $ch18 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1123", $item18) If $ch19 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1124", $item19) If $ch20 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1125", $item20) If $ch21 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "1126", $item21) If $ch22 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "961", $item22) If $ch23 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "232", $item23) If $ch24 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "233", $item24) If $ch25 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "240", $item25) If $ch26 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "241", $item26) If $ch27 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "243", $item27) If $ch28 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "246", $item28) If $ch29 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "247", $item29) If $ch30 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "420", $item30) If $ch31 = 1 Then IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "314", $item31) If $ch18 = 1 Or $ch19 = 1 Or $ch20 = 1 Or $ch21 = 1 Or $ch22 = 1 Or $ch23 = 1 Or $ch24 = 1 Or $ch25 = 1 Or $ch26 = 1 Or $ch27 = 1 Or $ch28 = 1 Or $ch29 = 1 Or $ch30 = 1 Or $ch31 = 1 Then FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") $ch34 = GUICtrlRead($Checkbox_34) If $ch34 = 1 Then If FileExists($R_file) Then $item34 = "Run.ico|" & $E_file & "," & $R_file IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "99", $item34) FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") EndIf EndIf IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "108", $item32) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "ToolBar", "9999", $item33) FileWriteLine(@ScriptDir & "\bin\SciteToolbar.ini", "bar=") GUIDelete($opt1) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "0") _restart() Case $msg = $button4 GUIDelete($opt1) IniWrite(@ScriptDir & "\bin\SciteToolbar.ini", "bar", "new", "0") MsgBox(0, "Important!", "You will need to click on the options icon to configure what buttons you want on the toolbar") _restart() ;;; EndSelect WEnd Exit EndFunc ;==>_options Func _restart() If @Compiled = 1 Then Run(FileGetShortName(@ScriptFullPath)) Else Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath)) EndIf Exit EndFunc ;==>_restart #cs Here are the other values that could be useful for you: Go = 301 Compile = 302 Complete list from the SciTE source file scite.h // Menu IDs. // These are located 100 apart. No one will want more than 100 in each menu #define IDM_MRUFILE 1000 #define IDM_TOOLS 1100 #define IDM_BUFFER 1200 #define IDM_IMPORT 1300 #define IDM_LANGUAGE 1400 // File #define IDM_NEW 101 #define IDM_OPEN 102 #define IDM_OPENSELECTED 103 #define IDM_REVERT 104 #define IDM_CLOSE 105 #define IDM_SAVE 106 #define IDM_SAVEAS 110 #define IDM_SAVEASHTML 111 #define IDM_SAVEASRTF 112 #define IDM_SAVEASPDF 113 #define IDM_FILER 114 #define IDM_SAVEASTEX 115 #define IDM_SAVEACOPY 116 #define IDM_SAVEASXML 117 #define IDM_MRU_SEP 120 #define IDM_PRINTSETUP 130 #define IDM_PRINT 131 #define IDM_LOADSESSION 132 #define IDM_SAVESESSION 133 #define IDM_QUIT 140 #define IDM_ENCODING_DEFAULT 150 #define IDM_ENCODING_UCS2BE 151 #define IDM_ENCODING_UCS2LE 152 #define IDM_ENCODING_UTF8 153 #define IDM_ENCODING_UCOOKIE 154 #define MRU_START 16 #define IMPORT_START 19 #define TOOLS_START 3 // Edit #define IDM_UNDO 201 #define IDM_REDO 202 #define IDM_CUT 203 #define IDM_COPY 204 #define IDM_PASTE 205 #define IDM_CLEAR 206 #define IDM_SELECTALL 207 #define IDM_PASTEANDDOWN 208 #define IDM_FIND 210 #define IDM_FINDNEXT 211 #define IDM_FINDNEXTBACK 212 #define IDM_FINDNEXTSEL 213 #define IDM_FINDNEXTBACKSEL 214 #define IDM_FINDINFILES 215 #define IDM_REPLACE 216 #define IDM_GOTO 220 #define IDM_BOOKMARK_NEXT 221 #define IDM_BOOKMARK_TOGGLE 222 #define IDM_BOOKMARK_PREV 223 #define IDM_BOOKMARK_CLEARALL 224 #define IDM_BOOKMARK_NEXT_SELECT 225 #define IDM_BOOKMARK_PREV_SELECT 226 #define IDM_MATCHBRACE 230 #define IDM_SELECTTOBRACE 231 #define IDM_SHOWCALLTIP 232 #define IDM_COMPLETE 233 #define IDM_COMPLETEWORD 234 #define IDM_EXPAND 235 #define IDM_TOGGLE_FOLDALL 236 #define IDM_TOGGLE_FOLDRECURSIVE 237 #define IDM_EXPAND_ENSURECHILDRENVISIBLE 238 #define IDM_UPRCASE 240 #define IDM_LWRCASE 241 #define IDM_ABBREV 242 #define IDM_BLOCK_COMMENT 243 #define IDM_STREAM_COMMENT 244 #define IDM_COPYASRTF 245 #define IDM_BOX_COMMENT 246 #define IDM_INS_ABBREV 247 #define IDM_JOIN 248 #define IDM_SPLIT 249 #define IDM_DUPLICATE 250 #define IDM_INCSEARCH 252 #define IDM_ENTERSELECTION 256 #define IDC_INCFINDTEXT 253 #define IDC_INCFINDBTNOK 254 #define IDD_FIND2 255 #define IDC_EDIT1 1000 #define IDC_STATIC -1 #define IDM_PREVMATCHPPC 260 #define IDM_SELECTTOPREVMATCHPPC 261 #define IDM_NEXTMATCHPPC 262 #define IDM_SELECTTONEXTMATCHPPC 263 // Tools #define IDM_COMPILE 301 #define IDM_BUILD 302 #define IDM_GO 303 #define IDM_STOPEXECUTE 304 #define IDM_FINISHEDEXECUTE 305 #define IDM_NEXTMSG 306 #define IDM_PREVMSG 307 #define IDM_MACRO_SEP 310 #define IDM_MACRORECORD 311 #define IDM_MACROSTOPRECORD 312 #define IDM_MACROPLAY 313 #define IDM_MACROLIST 314 #define IDM_ACTIVATE 320 #define IDM_SRCWIN 350 #define IDM_RUNWIN 351 #define IDM_TOOLWIN 352 #define IDM_STATUSWIN 353 #define IDM_TABWIN 354 // Options #define IDM_SPLITVERTICAL 401 #define IDM_VIEWSPACE 402 #define IDM_VIEWEOL 403 #define IDM_VIEWGUIDES 404 #define IDM_SELMARGIN 405 #define IDM_FOLDMARGIN 406 #define IDM_LINENUMBERMARGIN 407 #define IDM_VIEWTOOLBAR 408 #define IDM_TOGGLEOUTPUT 409 #define IDM_VIEWTABBAR 410 #define IDM_VIEWSTATUSBAR 411 #define IDM_TOGGLEPARAMETERS 412 #define IDM_OPENFILESHERE 413 #define IDM_WRAP 414 #define IDM_WRAPOUTPUT 415 #define IDM_READONLY 416 #define IDM_CLEAROUTPUT 420 #define IDM_SWITCHPANE 421 #define IDM_EOL_CRLF 430 #define IDM_EOL_CR 431 #define IDM_EOL_LF 432 #define IDM_EOL_CONVERT 433 #define IDM_TABSIZE 440 #define IDM_MONOFONT 450 #define IDM_OPENLOCALPROPERTIES 460 #define IDM_OPENUSERPROPERTIES 461 #define IDM_OPENGLOBALPROPERTIES 462 #define IDM_OPENABBREVPROPERTIES 463 #define IDM_OPENLUAEXTERNALFILE 464 //#define IDM_SELECTIONMARGIN 490 //#define IDM_BUFFEREDDRAW 491 //#define IDM_USEPALETTE 492 // Buffers #define IDM_PREVFILE 501 #define IDM_NEXTFILE 502 #define IDM_CLOSEALL 503 #define IDM_SAVEALL 504 #define IDM_BUFFERSEP 505 #define IDM_PREVFILESTACK 506 #define IDM_NEXTFILESTACK 507 // Help #define IDM_HELP 901 #define IDM_ABOUT 902 #define IDM_HELP_SCITE 903 // Windows specific windowing options #define IDM_ONTOP 960 #define IDM_FULLSCREEN 961 // Dialog control IDs #define IDGOLINE 220 #define IDABOUTSCINTILLA 221 #define IDFINDWHAT 222 #define IDFILES 223 #define IDDIRECTORY 224 #define IDCURRLINE 225 #define IDLASTLINE 226 #define IDEXTEND 227 #define IDTABSIZE 228 #define IDINDENTSIZE 229 #define IDUSETABS 230 #define IDREPLACEWITH 231 #define IDWHOLEWORD 232 #define IDMATCHCASE 233 #define IDDIRECTIONUP 234 #define IDDIRECTIONDOWN 235 #define IDREPLACE 236 #define IDREPLACEALL 237 #define IDREPLACEINSEL 238 #define IDREGEXP 239 #define IDWRAP 240 #define IDUNSLASH 241 #define IDCMD 242 // id for the browse button in the grep dialog #define IDBROWSE 243 #define IDABBREV 244 #define IDREPLACEINBUF 244 #define IDMARKALL 245 #define IDGOLINECHAR 246 #define IDCURRLINECHAR 247 #define IDREPLDONE 248 #define IDDOTDOT 249 #define IDFINDINSTYLE 250 #define IDFINDSTYLE 251 #define IDPARAMSTART 300 // Dialog IDs #define IDD_FIND 400 #define IDD_REPLACE 401 #define IDD_BUFFERS 402 #define IDD_FIND_ADV 403 #define IDD_REPLACE_ADV 404 #define IDR_CLOSEFILE 100 #ce 8)Your my hero... The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted April 26, 2007 Share Posted April 26, 2007 LOL!!!!That is awesome... maybe you can make the Poll:1) Yes - PsaltyDS is a genius 2) No - litlmike is an idiot 3) Yes - Psalty is a genius AND litlmike is an idiot4) I don't care either way - I just want to let the world know that litlmike is an idiotPersonally, I think there should be a 5th option - Yes - Psalty is a genius AND litlmike is an genius The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 26, 2007 Author Share Posted April 26, 2007 Currently there seems to be a disadvantage in doing this, if anyone copying your code uses IE7.See: http://www.autoitscript.com/forum/index.ph...c=44854&hl=People who willingly use IE get what they deserve! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Developers Jos Posted April 26, 2007 Developers Share Posted April 26, 2007 (edited) ever tried this from IE7 ?http://www.autoitscript.com/forum/index.ph...st&p=332213 Edited April 26, 2007 by JdeB 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...
BrettF Posted April 26, 2007 Share Posted April 26, 2007 Personally, I think there should be a 5th option - Yes - Psalty is a genius AND litlmike is an geniusCan I be a genius?? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted April 26, 2007 Share Posted April 26, 2007 Can I be a genius?? I still don't like those options.... You're not a genius and lilmike isnt an idiot so........ Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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