Login | |
|
 |
RE: Inventory of scripts on this site. - 12/23/2005 2:19:15 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
quote:
just imagine the discussion about "Option explicit I am the script Nazi. No Option Explicit? No script for you one year!! NOTE: For those who may not be familiar with the sitcom Seinfeld, I'd like to say that the use of the term Nazi is by no means intended to be inflamatory.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/14/2006 11:19:45 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
It's a good idea. I did myself a compilation of all sort of short code in htm. Everytime I need something I open it and copy-paste the code. I sorted codes by the type of use, concretely: - buttons and dialog boxes - read and write files - text manipulation - number manipulation - registry manipulation etc Rules should be: - respect object naming convention as much as possible - respect case convention as much as possible - short (if more than 50 lines, post it on the "show off you scripting skills" forum) - no garbage (Most of the examples I find on line has dozen of lines not relevant to the main goal) - avoid too many variable creation
_____________________________
Fred
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/16/2006 6:01:30 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
quote:
may I ask you to give a little more details on the technical aspects of your script repository? Do you use one large .html file? No: I have one "index" page with a dozen of links to a specific page. It's very simply made. If you want I can post it on my site or send to you the set of files. But I will have to translate it before because it's in french. quote:
How did you sort the code fragments? As I wrote above by the concrete use of this code, NOT by theorical classification that means nothing for a noob. Everything related to "reading and writing in a file" in Read_write_files.htm, everything related to "send keys" in Send_keys.htm etc I have a link to an scii table also. quote:
Could you describe how you do the searching (keywords/tags?). I don't have that many codes as to need a search engine. When it's well sorted, I find things very easily. And I even don't have a glossary and tags on my pages thought that maybe useful. That may be different when we will do a database with everething. But then, a 3 levels index can be enough. Eventualy a "search by keyword" box. quote:
Regarding your rules: How do you define 'garbage' and what would I have to do to eliminate it from my code (no irony intended, I really want to know about your criteria to work over some code just written in a quick and dirty fashion to weed out the bad/ugly parts)? I found almost all my codes by google search and found lots of helpfull website giving code sample. But everytime they are building a whole script around the single line you were looking for. I mean there is always a way to make the example shorter. Mentioning "Sub" or "Function" is useless, let alone html tags. quote:
What do think about comments? Should each contribution contain/be augmented with (short) user/developer documentation? If somebody find a case when a code doesn't work, it can be useful. but better is to add a simple short comment about his finding. instead of having a whole blog scrolling down. I would keep everybody's comments in a separate page and just put a link to it under the code. It's important that the page where the code is to be as simple as possible, not clogged with hundreds of links and tabs. To summ it up I have an allergy to microsoft.com help pages. IYKWIM quote:
What do you think about using a database as a data store? It depends on how many code samples we will have. If we have a lot and is unmageable in html pages, why not? But I know zero about these technologies.
< Message edited by Fredledingue -- 1/16/2006 6:05:49 AM >
_____________________________
Fred
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/30/2006 1:37:11 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
If you are simply looking for a tool to insert snippets of your saved code for you, PrimalScript is great for that. Here at my work we keep all of our snippets on a network share so with a double click I am using the same code as my coworkers.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/30/2006 7:11:15 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
In that case, I would think the best solution would be a MySql back ended web page (although I suppose that to be true to VBScript it should be SQL/ASP).
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/30/2006 7:45:18 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
Well, 1. an 'universal' agreement about the classification scheme - I would expect whoever was maintaining the collection to decide on a scheme then anyone who wanted to use the collection to follow it. 2. a webhost - If we are talking about a solution for www.visualbasicscript.com then I don't think coming up with a webhost would be a problem. 3. a lot of work - True, but I think it would be true of any solution. and it would cut off the VBScript Repository from this Forum - What do you mean?
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/30/2006 8:54:39 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
I guess I don't understand what the goal is here. If it is a script repository that is maintained on the web or one that each person would maintain themselves locally. If the oal is a web version, then here are my answers: (1) - I often get referred to as the script nazi for forcing people at work to follow my standards however the standards that I am most adamant about are ones that are pretty widely agreed to be important in the scripting community at large (use OPtion Explicit, No global On Error Resume Next, etc.) I just think that if you have a web based scripts repository then whoever maintains it should be able to determine the layout. That is no different than the fact that the site creators for this forum were able to determine the categories available for posting in. (4) - If there was a central code repository then there would be no need for the forum category and thus no dilemma over where to post. If the goal is a local repository, then I agree that something like iCodeLibrary would be fine. I don'tthink you will ever be able to get everyone to agree on a format though. I doubt you could even get them to agree on something like using spaces or tabs for indentation let alone how far to indent in the first place.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 1/30/2006 10:41:43 AM
|
|
 |
|
| |
ehvbs
Posts: 2204
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
|
Hi ebgreen, thanks for forcing me to think and talk about my pet more clearly! The goal of the first contributor was to get scripts/howtos from this forum fast - no complicated search process, no fear to miss the gold because you selected a 'wrong' keyword. I have my own material organized in a way that is not bad (ok, sometimes I write something again, because another computer isn't available at the moment or I forget which project that particular function was used in), but it is difficult to integrate other people's code/postings/docs. Fredledingue's description of his practice made me realize that a centralized approach would have to be maintained correctly and wouldn't be usable if the contributers wouldn't adhere to very specific rules of classification a localized approach would allow each person to take what she needs and to classify it according to his own scheme (that doesn't mean there couldn't be some proposals/discussions about categories and their order) I don't want to critize the order/structure/categories of this forum - it's a forum: you get some 10 main categories and below that a chronological list of topics (normaly a question and some answers). Finding something which isn't on the first two pages and hasn't got a carefully worded subject means a full text search - in my opinion just the opposite of accessing categorized data. Just because I know that I wouldn't come up with a 'one size fits all' and easy to apply scheme makes me think: each to her own. I don't think that coding style would be a problem: if you get something helpful fast, you can spend a little time to rework ('refactor') the code - and you don't have to discuss it with the original author. From what I learned about the xml format of iCodeLibrary, a contribution could look like this (a 'normal' posting, just VBSR as a marker in the subject) Subject: VBSR Create ADO Connection Author: ehvbs Keywords: database, ado, connection Description: Creates an ADODB.Connection according to the information in aParams. aParams(0) is the type (MDB, TEXT, ...), the following paramaeters depend on this type - e.g. Param( 1 ) is the directory with schema.ini and data files for TEXT ... Function newAdoCN( aParms ) Const csODBVers = "" Dim oRVal : Set oRVal = Nothing .... oRVal.Open sCNStr Set newAdoCN = oRVal End Function Sample usage: Dim oCN : Set oCN = newAdoCN( Array( "text", ".\" ) ) for accessing the current directory as a poor man's sql server. The user would select all + copy [I have to test this for code tags ...] and the hta app would put this into the mdb readable by iCodeLibrary.
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 2/10/2006 5:37:38 AM
|
|
 |
|
| |
HOTROD69
Posts: 23
Score: 0
Joined: 12/15/2005
Status: offline
|
Do we need it to be so difficult? First we need to have a name for this folders Like " InventoryVBScripts" and subdirectories for classification. We need to decide what wood be these folder names to properly class these Scripts. Inside these folders people will but there codes and if someone has the same code but better, he replies to it. But we would need to send it to an adviser that would classify it and explain what function of this script is in a general way. This advisor will only class the new scripts so people can modify to simplify the script. InventoryVBScripts -Commands lines (Make directories, etc...) -Computer inventory -Change Permissions -Computer Management -Etc….. 
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 2/10/2006 5:59:05 AM
|
|
 |
|
| |
HOTROD69
Posts: 23
Score: 0
Joined: 12/15/2005
Status: offline
|
Yes exactly but better. With your site their better information because you have real problems that people face and if you can use that knowledge and learn other ideals to simplify the scripts that are done. People can search on this site and use the script that are done and if this person find a better or modifies this script to even be better replies to this script and show what he changed.
|
|
| |
|
|
|
 |
RE: Inventory of scripts on this site. - 2/16/2006 7:54:40 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
ehvbs, I don't think it should be too difficult to create an hta script to generate html pages or adding to existing html pages, to save script samples The html format is the most universal and readable by everybody and it's easy and configurable at will. We could create another hta to search scripts, but I don't think it's necessary because it's not that difficult to copy paste from a html page. Unless you wants to add lots of comments and extra stuffs. But my idea is to put 5 to 20 samples in each page therefore we would need to economise as much room as possible to avoid scrolling too much. Well, there tons of possibilities anyway. This hta interface would allow each user to create his own category and will show categories already available. And sub categories. This way everybody could make its own database and even, since users are supposed to be able to script, modify the hta application themselves if they want. One public version could be posted here, as a website, and downloadable in a zip pack. If you want I can try a first pre-beta version. A second thought: before starting we should share all the naming convention and style that we think are the most universaly shared and the easiest to use and read. We should post in a special forum all these conventions and discuss and decide which one to use. Example: for setting the createobject("scripting.filesystemobject") do you name it: fso FSO oFS objFS fs
_____________________________
Fred
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|