mike2003 Posted June 20, 2021 Share Posted June 20, 2021 (edited) I am using SciTe from site. But I really want to add ready text blocks code snippets and store them for another case. But I haven't found in SciTe. Tell me pls the program for this or how to do it? Here on the forum I just found old versions from 2006, they do not start now. Edited June 20, 2021 by mike2003 Link to comment Share on other sites More sharing options...
pseakins Posted June 21, 2021 Share Posted June 21, 2021 I store my snippets in a file called snippets.au3. Cut and paste. Phil Seakins Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 21, 2021 Moderators Share Posted June 21, 2021 As you begin to write more code, potentially in multiple languages, keeping snippets/functions/etc. in a single file becomes unwieldy. I would suggest becoming comfortable now with an online repository like Git. Aside from allowing you to organize your code, it provides ready access from anywhere. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Dan_555 Posted June 21, 2021 Share Posted June 21, 2021 Maybe something like this ? : mike2003 1 Some of my script sourcecode Link to comment Share on other sites More sharing options...
mike2003 Posted June 22, 2021 Author Share Posted June 22, 2021 On 6/21/2021 at 10:53 PM, Dan_555 said: Maybe Need to try. But why do you have to double-click everywhere to close the window? This is so strange. Link to comment Share on other sites More sharing options...
argumentum Posted June 23, 2021 Share Posted June 23, 2021 I use https://www.autoitscript.com/forum/topic/202316-searching-specific-content-in-text-file-or-au3/ and always find what I need Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Dan_555 Posted June 23, 2021 Share Posted June 23, 2021 (edited) The double click is there to prevent closing the window/app by misclicks. If you do not like it, the source code is in the archive. Change the following code Case $GUI_EVENT_CLOSE If $closecounter = 1 Then If TimerDiff($TimeHandle) <= 1000 Then ExitLoop EndIf EndIf If $closecounter = 0 Then $closecounter = 1 $TimeHandle = TimerInit() WinSetTitle($h_SnipForm, "", "Doubleclick to close") EndIf Into Case $GUI_EVENT_CLOSE ExitLoop And the main window will close on single click. Then seek the Case $GUI_EVENT_CLOSE, $BTN_EXIT If $closecounter = 1 Then If TimerDiff($TimeHandle) <= 1000 Then $snipeditclose = 0 If $snipeditchanged = True Then $iMsgBoxAnswer = MsgBox(8244, "Exit without saving ?", "Do you want to close the editor without saving the changes ?") If $iMsgBoxAnswer = 7 Then $snipeditclose = 1 ;No EndIf If $snipeditclose = 0 Then GUIDelete($Form1) ExitLoop EndIf WriteToolBar("Please save your file.") EndIf EndIf If $closecounter = 0 Then $closecounter = 1 $TimeHandle = TimerInit() WinSetTitle($Form1, "", "Doubleclick to close") EndIf code and change it into: Case $GUI_EVENT_CLOSE, $BTN_EXIT $snipeditclose = 0 If $snipeditchanged = True Then $iMsgBoxAnswer = MsgBox(8244, "Exit without saving ?", "Do you want to close the editor without saving the changes ?") If $iMsgBoxAnswer = 7 Then $snipeditclose = 1 ;No EndIf If $snipeditclose = 0 Then GUIDelete($Form1) ExitLoop EndIf WriteToolBar("Please save your file.") And the editor will close on single click. Edited June 23, 2021 by Dan_555 mike2003 1 Some of my script sourcecode Link to comment Share on other sites More sharing options...
Gianni Posted June 25, 2021 Share Posted June 25, 2021 on this site (http://www.garybeene.com/index.htm), among other freeware, there is gbSnippets, which also offers a special set of optional features for programmers. "It is a powerful code librarian with syntax highlighting and other editing features and software analysis tools specifically written to work with source code. Multiple languages are supported and snippet libraries are provided for several languages.The programmer/code librarian features (http://www.garybeene.com/sw/gbsnippetshelpa.htm) are hidden by default - kept out of the way unless needed - but available at the press of single button! " Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Dan_555 Posted June 25, 2021 Share Posted June 25, 2021 (edited) Alternatively, you can use this to store snippets, as well: http://www.freesoftland.net/dtt.html It saves all in one database (so far i know). and, (i guess) this could be used as a note/snippet tool as well: https://sourceforge.net/projects/keynote/ I'm using KeyNote for note/passwordkeeping. The Developer Tricks and Tips (DTT) are ok, but you need to copy and paste the text (from dtt to your code) by yourself. Well, while the app is ok in itself, there is a little annoyance: The select all button works only if the editor field is active (and it is not at the first time you select the snippet). So basically i need 3 clicks to get the text into the clipboard, and then to use the ctrl v for the paste. That's why i have written the Simple Snippet Manager. And i was going for the simplicity and ease of use. It keeps the files in a folder, and all you need to do is to select the snippet, to switch to the app, and to press ctrl /strg + b (within a minute - to prevent copying text into wrong apps by missclicks) You can add snippets, by saving them from the Scite editor into the folder. Edited June 25, 2021 by Dan_555 Gianni and mike2003 2 Some of my script sourcecode 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