satanttin Posted July 21, 2014 Posted July 21, 2014 Hello, This program put little snippets we all like to use (i assume) into a tray menu so we don't have to look for them anymore. the only thing u need to do is make a map name it Snippets and put your snippets in there.(note: The Snippets Tray Tool doesn't go in there but in the same place as the folder is) The script: (note: to easy change the folder name to your own liking just open the script in scite and ctrl + f and look for Snippets and replace those 2 names with the name u want to use) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** ;#AutoIt3Wrapper_Icon=.ico #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_Comment=By: ;#AutoIt3Wrapper_Res_Description= #AutoIt3Wrapper_Res_Fileversion=1.0 #AutoIt3Wrapper_Res_SaveSource=y ;#AutoIt3Wrapper_Res_Icon_Add=.ico #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <File.au3> #include <GUIConstantsEx.au3> #include <TrayConstants.au3> Opt("TrayMenuMode", 3) Opt("TrayIconHide", 0) Opt("GUIResizeMode", 1) Opt("TrayIconDebug", 1) Opt("TrayAutoPause", 0) Opt("MouseCoordMode", 2) Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 0) Opt("GUIEventOptions", 1) Opt("TrayOnEventMode", 0) Opt("ExpandEnvStrings", 1) Opt("WinDetectHiddenText", 1) ;Tray Local $PLTray, $PSTray, $STTray, $NTray, $PTray, $CTTray, $ExitItem ;Vars Local $Au3filesArray, $Item, $State, $Msg, $GuiMsg, $CursorInfo, $txt TraySetIcon("ico.ico") $ExitItem = TrayCreateItem("Close") TrayItemSetOnEvent(-1, "Quit") SrchAdd() GUISetState() TraySetState(1) TraySetClick(8) ;============================================================================= Do $Msg = TrayGetMsg() If $Msg > 0 Then $txt = TrayItemGetText($Msg) ConsoleWrite('$txt ' & $txt & @CRLF) If $txt = 'Close' Then Quit() ConsoleWrite(@ScriptDir & '\' & $txt & @CRLF) Run("C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe " & @ScriptDir & '\' & "Snippets" & '\' & $txt) EndIf Sleep(50) Until GUIGetMsg() = $GUI_EVENT_CLOSE ;============================================================================= Func SrchAdd() $Au3filesArray = _FileListToArray(@ScriptDir & '\'& "Snippets" & '\', '*.au3', 1, 0) ConsoleWrite('$Au3filesArray[1] ' & $Au3filesArray[1] & @CRLF) For $i = 1 To $Au3filesArray[0] $Au3filesArray[$i] = TrayCreateItem($Au3filesArray[$i]) TrayItemSetOnEvent($Au3filesArray[$i], $Au3filesArray[$i]) Next EndFunc ;==>SrchAdd ;============================================================================= Func Minimize() WinSetState('', '', @SW_MINIMIZE) EndFunc ;==>Minimize Func Restore() WinSetState('', '', @SW_RESTORE) EndFunc ;==>Restore Func Quit() Exit EndFunc ;==>Quit ;============================================================================= The guy behind this code is careca <-- i justĀ edited the script a little bit so u u don't get a gui with a button anymore to load the snippets in the tray menu. If you have any questions feel free to comment and i will try to help you reason i uploaded this script is because i think a lot of people would like it. Greetings
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