Jump to content



Photo

Code Snippet


  • Please log in to reply
145 replies to this topic

#1 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 27 January 2006 - 05:38 AM

Bugs/comments/suggestions are welcome

This tool is already included with SciTE.
In the SciTE folder is a folder called cSnippet.

v 1.0.5.8
  • Fixed ToolTip Timeout
  • Added Else condition to rename Category
Please inform me of any bugs, I find many because I do use this script very much.

-> Snippet Holder 1.0.5.8<-

CODE

http://www.autoitscript.com/fileman/users/gafrost/CSnippet.GIFhttp://www.autoitscript.com/fileman/users/gafrost/CSnippet1.GIF
http://www.autoitscript.com/fileman/users/gafrost/CSnippet2.GIF

v 1.0.5.7
Now located in Downloads
Updated: Configuration option to show/hide tool tip.

v 1.0.5.6
Now located in Downloads

v 1.0.5.5
Fixed bug with switching between ListView and TreeView, depending on where SciTE is installed would get errors switching

v 1.0.5.4
Fixed bug with Primary Down fireing when initializing Preview/Edit windows

v 1.0.5.3
Found/Fixed bug in Treeview side, copy from clipboard context menu

v 1.0.5.2- (beta 3.1.1.128 or higher required)
Fixed Code to not rely on GuiCtrlRead in advanced mode (broken in beta 3.1.1.131 for treeview)

v 1.0.5.1- (beta 3.1.1.128 or higher required)
Fixed Rename Snippet bug on TreeView Side

v 1.0.5.0- (beta 3.1.1.128 or higher required)
enhanced search for both listview and treeview
Search starts from item selected (if any selected) and wraps back around
For Listview if the category column is visible then the search includes that column
Fixed scroll when searching in listview (now calculates the scroll amount by the rect of the 1st row)

v 1.0.4.9- (beta 3.1.1.128 or higher required)
Fixed Fuzzy Search selection on treeview

v 1.0.4.8- (beta 3.1.1.128 or higher required)
Removed Back-up option (was for when snippets were stored all in 1 file "the ini")
Added Fuzzy Search

v 1.0.4.7- (beta 3.1.1.128 or higher required)
Fixed bugs in the treeview side with guicreate not having min/max buttons
Fixed about box being abble to be created more than once.
Fixed docking of controls
Added min/max width of main gui limitations

v 1.0.4.6- (beta 3.1.1.128 or higher required)
Fixed bugs in the treeview side with the delete/save snippet

v 1.0.4.5- (beta 3.1.1.128 or higher required)
Snippets will be in folders by Category
If have save snippets from previous version, and ini file exists with them listed, it will move the scripts to the appropriate folders by Category
Treeview added back in
Other minor fixes and code consolidation :lmao:


v 1.0.4.4- 5/25/06
Fixed Duplicate File Name bug....

v 1.0.4.3- 5/09/06
Added Alt+Shift+r "run"
Added Alt+Shift+b "beta run"

These are only valid hot keys when the tooltip is visible
Alt+Shift+c
Alt+Shift+t
Alt+Shift+r
Alt+Shift+b

v 1.0.4.2- 4/16/06
Fixed crash when run on Win9x

v 1.0.4.1 - 4/15/06
Added ClipBoard Monitoring thanks to Larry/Zedna
Added Alt + Shift + t to close the tooltip

v 1.0.4.0 - 4/9/06
Added Clipboard Copy To/From

v 1.0.3.7 - 3/4/06
Fixed bug introduced with allowing scrollable readonly edit control

v 1.0.3.6 - 3/4/06
View/Edit Source screen now scrollable when not in edit mode
Code Snippet will be in the tools with the next release of SciTE from JdeB

v 1.0.3.5 - 3/2/06
Fixed behaviour of code snippet minimized and sending code from scite to code snippet
Attachment Removed: Code Snippet will be in the tools with the next release of SciTE from JdeB

v 1.0.3.4 - 3/1/06
Fixed error with dllclose

v 1.0.3.3 - 2/27/06
Added checking for ilegal characters in snippet name
Fixed renaming of snippet
Fixed New catogory

v 1.0.3.2 - 2/25/06
Added Import of .au3 files
Added Export to .au3 files
CPU usage should be at about 9 - 10% compared to 1.0.3.0 which was above 40%
Last Import and Export location is saved in the ini

v 1.0.3.1 - 2/24/06
Added Config Option (Select Snippet Folder)
Added ToolTips to Toolbar Buttons
Added Gradient Color to Main GUI (Would Like Input On this if it should have gradient or not)

v 1.0.3.0 - 2/24/06
Snippets no longer stored in Ini File
Snippets are now stored in XML Files
Before using this one I suggest Extracting old snippets into a file or SciTE document
and starting over with new ini


v 1.0.2.1 - 2/17/06
Added Toolbar
Disabled Treeview for now due to the GUIRegisterMsg problem
Combined Notify events to 1 function

v 1.0.1.16 - 2/2/06
Added Owner Drawn Menu's
Note: Holger is still trying to find a solution to problems due to using GUIRegisterMsg

v 1.0.1.15 - 1/30/06
Added DoubleClick on TreeView for Preview/Edit
Problem is there seems to be a refresh/paint problem on TreeView just
like the Slider on the ListView Gui
These Problems seem to tie in with using the GUIRegisterMsg
I may be doing something wrong, but I'm stumped if I am


v 1.0.1.14 1/30/06
Fixed some resizing Issues
As of Beta 3.1.1.106 appears that the unexpected program exits are gone.
Still an Issue with the Slider not repainting on the ListView Screen.

v 1.0.1.13 - 1/29/06
Changed the read from Ini file from IniReadSection to Individual IniReads with default values
due to if ini exists but values don't, then don't want a crash
Vertical Slider on right side of gui (Transparency) from 0 to 75 %

v 1.0.1.12 - 1/29/06
Split ListView and TreeView into 2 seperate gui functions for better maintainability
As with v 1.0.11 DoubleClick uses the WM_NOTIFY event
Click is now used by WM_NOTIFY event for the listview also
$GUI_EVENT_PRIMARYDOWN is only used for gui to hide preview
If change view is selected from Config menu the program exits and restarts with new view
Worked on the names of variables some, make it easier to figure out.

TreeView works as in previous versions
if can figure out the events for treeview then might make another revision otherwise this
should be the last barring any bugs found.

v 1.0.1.11 - 1/28/06
Fixed unexpected app exit with insert into scite, thanks again JdeB
Added DoubleClick event to listview (Preview Snippet)
Added back in context menu's on listview now that events are handled for the listview

command line option for snipping code from scite
example SciTEUser.properties(changed for v 1.0.1.10 and higher)

#Modify Context Menu to add Right Click, Add as Snippet
user.context.menu=||Add as Snippet|1117|

# 17 Gary's Code Snippet
command.17.$(file.patterns.au3)="$(SciteDefaultHome)\Snippets\CSnippet.exe" /CreateSnippet
command.name.17.$(file.patterns.au3)=Code Snippets
command.shortcut.17.$(file.patterns.au3)=Ctrl+Alt+s
command.subsystem.17.$(file.patterns.au3)=2
command.save.before.17.$(file.patterns.au3)=2
command.replace.selection.17.$(file.patterns.au3)=0
command.quiet.17.$(file.patterns.au3)=1


v 1.0.1.10 - 1/28/06
Thanks to JdeB for Help with Interface to SciTE utilizing the WM_COPYDATA command
Problem with too much selected in SciTE selected (errored out) corrected with new interface with SciTE
Insert into SciTE now also uses the WM_COPYDATA command
au3.properties change also

for use with v 1.0.1.9 and below
# 17 Gary's Code Snippet
command.17.$(file.patterns.au3)="$(SciteDefaultHome)\Snippets\CSnippet.exe" "$(CurrentSelection)"
command.name.17.$(file.patterns.au3)=Code Snippets
command.shortcut.17.$(file.patterns.au3)=Ctrl+Alt+s
command.subsystem.17.$(file.patterns.au3)=2
command.save.before.17.$(file.patterns.au3)=2
command.replace.selection.17.$(file.patterns.au3)=0
command.quiet.17.$(file.patterns.au3)=1

v 1.0.1.9 - 1/28/06
Fixed a few bugs with the save/new
Added whole lot more error checking

v 1.0.1.8 - 1/27/06
Added Menu Options for TreeView Colors
Background/Foreground/Line
Selections are saved and loaded next time app starts


v 1.0.1.7 - 1/27/06
Found/Fixed bug when adding new snippet/category

v 1.0.1.6 - 1/27/06
Some more clean-up, 1 window now for new/view/edit
fixed a few minor bugs

v 1.0.1.5 - 1/27/06
streamlined the code a little more
utilized the view/edit window for treeview also (combines the modify/preview)

v 1.0.1.4
Moved this from Mike's thread, felt like I was hijacking his thread.
Added the command line option for snipping code from scite
example au3.properties

v 1.0.1.3
Removed most of the context menu options when using listview,
changed the View/Edit screen to a New/View/Edit screen
Dealt with the problem of sections not having any keys and renaming
the sections (fixed)

v 1.0.1.2
Integrated most of MikeOsdx's Snippet Holder into this one, user can select,
Listview or TreeView
TreeView, pretty much acts as MikeOsdx's Snippet Holder except the latest
couple of items added to snippet holder

v 1.0.1.1
Added back in some category functions and fixed a few minor things
Note: this will work with the data file from MikeOsdx's Snippet
Holder also (code modified from MikeOsdx code to a gui i liked better,
didn't like the treeview, but then there will be plenty that won't like the listview)

Thinking of integrating the 2 together and give the user a choice of
treeview/listview via option.

v 1.0.1.0
Added option of docking the edit window on left or right of main window,
just select File, then Dock Edit Window, then either Dock Left or Dock Right,
the window will slide out from that direction.
Updated: Added Resize Event

Gary

Edited by gafrost, 05 March 2007 - 04:50 PM.

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.






#2 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 27 January 2006 - 02:17 PM

v 1.0.1.5

streamlined the code a little more
utilized the view/edit window for treeview also (combines the modify/preview)

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#3 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 27 January 2006 - 06:05 PM

v 1.0.1.6
Some more clean-up, 1 window now for new/view/edit
fixed a few minor bugs

See 1st post for info, screen shots, and source

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#4 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 27 January 2006 - 06:55 PM

v 1.0.1.7
Found/Fixed bug when adding new snippet/category

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#5 TWC

TWC

    Seeker

  • Active Members
  • 25 posts

Posted 27 January 2006 - 06:58 PM

I am getting an error on line 25 & 27; Au3Check parameters.

#6 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 27 January 2006 - 07:07 PM

I am getting an error on line 25 & 27; Au3Check parameters.



Make sure you have the latest Au3Check

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#7 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 27 January 2006 - 08:47 PM

v 1.0.1.8

Added Menu Options for TreeView Colors
Background/Foreground/Line
Selections are saved and loaded next time app starts

Edited by gafrost, 27 January 2006 - 08:48 PM.

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#8 w0uter

w0uter

    resreveR nA

  • Active Members
  • PipPipPipPipPipPip
  • 2,262 posts

Posted 27 January 2006 - 10:05 PM

certainly looks usefull.

nj garry.
My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

#9 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 28 January 2006 - 01:23 AM

certainly looks usefull.

nj garry.



Thanks, credit goes to MikeOsdx also, just making this one to fit my likes.

Have a couple more fixes done, but still testing, deciding on some other changers or not.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#10 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 28 January 2006 - 08:46 AM

v 1.0.1.9
Fixed a few bugs with the save/new
Added whole lot more error checking

Edited by gafrost, 28 January 2006 - 08:46 AM.

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#11 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 28 January 2006 - 05:41 PM

v 1.0.1.10
Thanks to JdeB for Help with Interface to SciTE utilizing the WM_COPYDATA command
Problem with too much selected in SciTE selected (errored out) corrected with new interface with SciTE
Insert into SciTE now also uses the WM_COPYDATA command
au3.properties change also

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#12 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 28 January 2006 - 09:54 PM

v 1.0.1.11
Fixed unexpected app exit with insert into scite, thanks again JdeB
Added DoubleClick event to listview (Preview Snippet)
Added back in context menu's on listview now that events are handled for the listview

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#13 w0uter

w0uter

    resreveR nA

  • Active Members
  • PipPipPipPipPipPip
  • 2,262 posts

Posted 28 January 2006 - 11:42 PM

your releasing to fast to keep up ><
My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

#14 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 28 January 2006 - 11:48 PM

your releasing to fast to keep up ><



Trying to get it done so I can clean up all these scripts off my drive :lmao:

Edited by gafrost, 28 January 2006 - 11:49 PM.

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#15 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 29 January 2006 - 08:59 PM

v 1.0.1.12
Split ListView and TreeView into 2 seperate gui functions for better maintainability
As with v 1.0.11 DoubleClick uses the WM_NOTIFY event, Click is now used by WM_NOTIFY event for the listview also, $GUI_EVENT_PRIMARYDOWN is only used for gui to hide preview
If change view is selected from Config menu the program exits and restarts with new view
Worked on the names of variables some, make it easier to figure out.

TreeView works as in previous versions
if can figure out the events for treeview then might make another revision otherwise this should be the last
barring any bugs found.


Gary

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#16 Gene

Gene

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 494 posts

Posted 29 January 2006 - 10:44 PM

Hi,

I downloaded a fresh copy, compiled it, copied the EXE to "K:\_Documents\_Dev\OtherCode\Code Snippet", started it via Scite's left-click on Tools menu...

Went to Config selected Dock Right then selected Treeview. Immediately I got the following error:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title: AutoIt Error
Class: #32770
Size: X: 200 Y: 280 W: 633 H: 201


>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 602 Y: 378
Cursor ID: 2


>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB: Hex: 0xD4D0C8 Dec: 13947080


>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size: X: 68 Y: 14 W: 553 H: 98
Control ID: 65535
ClassNameNN: Static2
Text: Line 0 (File "K:\Local\Prog\AutoIt3\SciTe\Snippet\CSnippet.exe"):


$PosW = $StoredDTA[3][1]
$PosW = ^ ERROR


Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.
Style: 0x50022080
ExStyle: 0x00000004


>>>>>>>>>>> Status Bar Text <<<<<<<<<<<


>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
OK
Line 0 (File "K:\Local\Prog\AutoIt3\SciTe\Snippet\CSnippet.exe"):


$PosW = $StoredDTA[3][1]
$PosW = ^ ERROR


Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

The INI file content is below:

[~xx123Data]
Dock=0
View=0


Gene




Bugs/comments/suggestions are welcome

command line option for snipping code from scite
example au3.properties (changed for v 1.0.1.10 and higher)

#Modify Context Menu to add Right Click, Add as Snippet
user.context.menu=||Add as Snippet|1117|


Snipped


Thinking of integrating the 2 together and give the user a choice of
treeview/listview via option.

v 1.0.1.0
Added option of docking the edit window on left or right of main window,
just select File, then Dock Edit Window, then either Dock Left or Dock Right,
the window will slide out from that direction.
Updated: Added Resize Event


Gary


Thanks for the response.GeneYes, I know the punctuation is not right...

#17 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 30 January 2006 - 12:20 AM

Hi,

I downloaded a fresh copy, compiled it, copied the EXE to "K:\_Documents\_Dev\OtherCode\Code Snippet", started it via Scite's left-click on Tools menu...

Went to Config selected Dock Right then selected Treeview. Immediately I got the following error:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title: AutoIt Error
Class: #32770
Size: X: 200 Y: 280 W: 633 H: 201


>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 602 Y: 378
Cursor ID: 2


>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB: Hex: 0xD4D0C8 Dec: 13947080


>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size: X: 68 Y: 14 W: 553 H: 98
Control ID: 65535
ClassNameNN: Static2
Text: Line 0 (File "K:\Local\Prog\AutoIt3\SciTe\Snippet\CSnippet.exe"):


$PosW = $StoredDTA[3][1]
$PosW = ^ ERROR


Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.
Style: 0x50022080
ExStyle: 0x00000004


>>>>>>>>>>> Status Bar Text <<<<<<<<<<<


>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
OK
Line 0 (File "K:\Local\Prog\AutoIt3\SciTe\Snippet\CSnippet.exe"):


$PosW = $StoredDTA[3][1]
$PosW = ^ ERROR


Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

The INI file content is below:

[~xx123Data]
Dock=0
View=0


Gene



v 1.01.13
Changed the read from Ini file from IniReadSection to Individual IniReads with default values
due to if ini exists but values don't, then don't want a crash
Vertical Slider on right side of gui (Transparency) from 0 to 75 %

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#18 Gene

Gene

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 494 posts

Posted 30 January 2006 - 03:08 AM

Thanks for the quick response. How is the docking supposed to work? I can move Csnippet any where and it comes back up in approximately the same place (+-50 pixels). It doesn't seem to "dock" anywhere. I would be happy if it docked at the edge of the screen with a constant height and Y position.

Gene



v 1.01.13
Changed the read from Ini file from IniReadSection to Individual IniReads with default values
due to if ini exists but values don't, then don't want a crash
Vertical Slider on right side of gui (Transparency) from 0 to 75 %


Thanks for the response.GeneYes, I know the punctuation is not right...

#19 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 30 January 2006 - 03:26 AM

Thanks for the quick response. How is the docking supposed to work? I can move Csnippet any where and it comes back up in approximately the same place (+-50 pixels). It doesn't seem to "dock" anywhere. I would be happy if it docked at the edge of the screen with a constant height and Y position.

Gene



The Docking is for the Preview/Edit/New script window, docks to the main gui

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.


#20 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 30 January 2006 - 11:29 PM

v 1.0.1.14
Fixed some resizing Issues
As of Beta 3.1.1.106 appears that the unexpected program exits are gone.
Still an Issue with the Slider not repainting on the ListView Screen.

Edited by gafrost, 30 January 2006 - 11:30 PM.

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users