Important alert: (current site time 7/16/2013 2:32:21 AM EDT)
 

winzip icon

Unique Tool to Search & Download Top Code on PSC

Email
Submitted on: 12/16/2006 4:06:22 AM
By: Dreamcoding  
Level: Intermediate
User Rating: By 31 Users
Compatibility: VB 5.0, VB 6.0
Views: 16421
author picture
(About the author)
 
     Unique Tool to Search For Top Code on PSC This is a tool created to accompany an article I posted on here which explains a simple tip for retrieving the top code related to your search keywords. Now although the code may seem simple to many of you expert coders on here, take note that it's not so much the code but the way in which it queries the website. Never before have you been able to search for a keyword on PSC and have it display top rated code related directly to what you are searching. Sounds strange doesn't it? Well granted you can search for popular code on here, it's not the same as "top rated" code since popular code is just code that has been viewed lots of times. Why don't you just give it a try and you will instantly see what I'm talking about. I promise you will not regret such a powerful way of searching. Oh and ofcourse, please vote if you like it. =) Here is the short article explaining the secret: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=67031&lngWId=1 Updates 12/16/2007 - Author View Bug Fix 12/15/2006 - New mini mode 12/05/2006 - Wow! DL Multiple Code 11/30/2006 - Added ability to Retain Log-In - Added Systray Icon 11/22/2006 - New Options Button - Lavolpe Buttons

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
11/9/2006 1:46:08 AMRobert Rayment

Neat *****. Couple of things: vbp file needs editting has Form\. Also I prefer not to have my registry used even though it's a useful way of locating the form.
(If this comment was disrespectful, please report it.)

 
11/9/2006 7:46:33 AMT Jackson

Nice one. Also gives a great example on how to manipulate a web page from within VB. *****
(If this comment was disrespectful, please report it.)

 
11/9/2006 11:44:32 AMKenneth Foster

You've got my vote.I agree with Robert though on the registry.Now is I can find a way to create a list of the search results and multiselect from that list to download the selected , I'd have it made.
(If this comment was disrespectful, please report it.)

 
11/10/2006 12:02:23 AMBill K of Boston

This app is the ballz, in fact 5
Please remove the "form/" path part in vbp.
This code can save hours of searching thru PSC.
Thanks,
Bill K.
(If this comment was disrespectful, please report it.)

 
11/10/2006 11:53:28 AMClive

Thanks for sharing.
(If this comment was disrespectful, please report it.)

 
11/10/2006 5:23:47 PMPaul Bahlawan

If I un-check "Top Code Only" PSC gives an error. Also is it nessary to have both &intMaxNumberOfEntriesPerPage AND &lngMaxNumberOfEntriesPerPage ?
(If this comment was disrespectful, please report it.)

 
11/10/2006 9:28:35 PMDreamcoding

The /form in vbp file has been removed and I have changed it so that it uses an ini file instead of the registry. Multiselect download could be done, this will take time. Thanks everyone for votes and comments.
(If this comment was disrespectful, please report it.)

 
11/11/2006 11:34:19 AMplutomusang

Inspiring contribution, I voted 5 for this!
(If this comment was disrespectful, please report it.)

 
11/11/2006 6:51:22 PMDreamcoding

I've added a new feature that I think many of you will find useful. Now you can navigate to a PSC code download page and add the author to your favorites. Double clicking his name in your favorites list will display all of his work to date. It seems to work okay, feedback on this would be great.
(If this comment was disrespectful, please report it.)

 
11/12/2006 11:47:12 AMKenneth Foster

Works great here.Nice addition to program.Can't wait to see more.
(If this comment was disrespectful, please report it.)

 
11/19/2006 9:44:19 AMxpert

Simple, original and very useful for any PSC "adict". 5 globes.
Please keep on enhancing it.
(If this comment was disrespectful, please report it.)

 
11/21/2006 6:42:17 AMaz1d

Needs msxml6.dll to run, is this something that only works for XP?
-az1d
(If this comment was disrespectful, please report it.)

 
11/22/2006 1:03:52 AMRobert Rayment

Dreamcoding: I have various msmsm#.dlls but not the one you are using. I could hunt for it on Google but is it possible to use one that's already in WinXP?
(If this comment was disrespectful, please report it.)

 
11/22/2006 12:40:14 PMDreamcoding

Paul: Fixed unchecked "Top Code Only" problem and as for &intMaxNumberOfEntriesPerPage AND &lngMaxNumberOfEntriesPerPage I leave these in because it is part of PSC's search format, but you are right you only really need one. You have to test by trial and error to see what URL variables are necessary and which are not.
(If this comment was disrespectful, please report it.)

 
11/22/2006 12:44:14 PMDreamcoding

az1d: I have updated the code so that it uses msxml2 instead of msxml6, I thought maybe using the newer version would be better but I think using the older version will make this code usuable to more people. I'm not sure whether this works on 98 and I do not have the ability to test this. Maybe someone else can let us know.
(If this comment was disrespectful, please report it.)

 
11/22/2006 12:54:14 PMDreamcoding

Robert: I've switched the reference so that it uses msxml2 so I think this should make things easier for everyone. I thought xml6 was with a service pack but maybe it was something I had downloaded for a project. In any case, 2.6 seems to work okay.
(If this comment was disrespectful, please report it.)

 
11/23/2006 1:08:25 AMRobert Rayment

Thanks - works fine with msxml2.
(If this comment was disrespectful, please report it.)

 
11/30/2006 5:45:33 AMDreamcoding

New Retain log-in and "Log Me In" feature. (An attempt to stay logged in to PSC) Thanks Robert for the link to sample code. Also, optional systray icon added for convenience. Let me know if there are any problems.
(If this comment was disrespectful, please report it.)

 
11/30/2006 11:27:44 AMFrédéric Côté

The systray icon is not working correctly. First, if you just hit the X after opening the program, it stays in memory and the only way to close it is the task manager. Second, each time I use the i button, it creates another icon in the systray. Nice program though :)
(If this comment was disrespectful, please report it.)

 
11/30/2006 4:49:53 PMDreamcoding

Frederic: Thanks, this should now be fixed. Added more options for the behavior of the icon as well as option to load with windows.
(If this comment was disrespectful, please report it.)

 
12/1/2006 6:33:50 AMMohammed Sayed

Amazing tool I found many useful ideas in it (Like how you get the associated application with specific extension which is better than searching for it in the registry).
5G are less than what it deserve.

Thanks for sharing & in advance
Regards :D
(If this comment was disrespectful, please report it.)

 
12/2/2006 5:03:16 AMRobert Rayment

Nice update. Couple of minor things: 1. the maximum Results per page that PSC will show, I find, is 50:
2. Double-clicking a Favourites does not log in.
Also End? I added code to unload all forms before that.
(If this comment was disrespectful, please report it.)

 
12/5/2006 2:55:08 PMDreamcoding

Robert: Newest update should fix those problems

Also, huge update it can now download code. Not sure how to submit this into the contest as they won't accept it as a new entry. In any case, enjoy!
(If this comment was disrespectful, please report it.)

 
12/5/2006 9:21:59 PMTuanHai

Cant not compile to Exe, LV_ITEM was not declared in project.
(If this comment was disrespectful, please report it.)

 
12/6/2006 12:46:10 AMRobert Rayment

Latest update: Starting with full compile I get ' tListItem ' not defined in Function LVSelectedItems.
(If this comment was disrespectful, please report it.)

 
12/6/2006 2:57:40 PMDreamcoding

Okay this is now fixed. Program will fully compile. Just some missing declarations, should have no problems now.
(If this comment was disrespectful, please report it.)

 
12/7/2006 2:35:50 AMRobert Rayment

Dreamcoding sorry - but when viewing from Favourites I get 'incorrect syntax near keyword AND'. Hope you're fed-up with this yet because I'll use it all the time for PSC.
(If this comment was disrespectful, please report it.)

 
12/7/2006 4:39:16 AMJos N. van der Kooij

Great work! Five from here also! However, when I check 'download' and click 'Search' I enconter an error 9 (subscript out of range). Line responsible is:
strUserExcellents = Split(strUserRating, "Users")(1)
This happens only when a submission is still unrated....
Fixed it by adding:
If Not strUserRating = "Unrated" Then ... in front of this line.
(If this comment was disrespectful, please report it.)

 
12/7/2006 5:22:18 AMRobert Rayment

Errata: 'fed-up' should be 'not fed-up'
(If this comment was disrespectful, please report it.)

 
12/12/2006 11:20:50 AMDreamcoding

Jos N: Thanks, I added this line so hope that fixes the problem.

Robert: I'm having trouble reproducing this error. Did you specify your log-in info in the options section? I changed a couple of lines that could have been the problem for someone not retaining log-in info, let me know if this fixes it.
(If this comment was disrespectful, please report it.)

 
12/12/2006 3:16:12 PMRobert Rayment

DreaCoding: EG I navigated to one of my programs then under Options I added it to the favourites. Closed. [User setting] is a set of numbers in the ini file (you've changed this?). Ran again, favourites, view page then get error on PSC page. SQL Server error 80040e14 - Syntax error near keyword AND.
(If this comment was disrespectful, please report it.)

 
12/12/2006 3:18:54 PMRobert Rayment

I tried a third time and now it's working OK - all very curious but thanks.
(If this comment was disrespectful, please report it.)

 
12/13/2006 12:07:57 PMPhilip Zac

Greate Code, i have downloaded ur previous verision, when i came next time i could not see that code on psc, but now i could see a improved verison, but i like the old one...:) one suggestion, frmmain can be in one line as all the controls in one line, like a long horizontal strip, then it will sit on the top of browser or sit on bottom of the browser, so that it will not be obstrution to view the web page...:) Five globe from me, thanks for sharing

(If this comment was disrespectful, please report it.)

 
12/14/2006 12:54:32 AMPhilip Zac

add this line in frmfavourite to retain the form position, iniSettingsFile = App.Path & "\settings.ini"
(If this comment was disrespectful, please report it.)

 
12/15/2006 12:49:18 AMDreamcoding

Philip: Thanks I have added this line and also added an option to display a mini version to save space.

Robert: Strange, I'm not sure why it would work this way but at least it is working. Let me know if you see anything else that might help with this.

Hope the updates work okay, let me know if you have any problems. Thanks everyone!
(If this comment was disrespectful, please report it.)

 
12/15/2006 3:56:03 AMRobert Rayment

DreamCoding: Provided I am logged in to PSC viewing a favourites is OK, but if I try to view a favourites straightaway with your program it goes to the PSC site home page. Then viewing favourites gives a PSC error. So, can easily work around this by logging in first. Not to worry if you cannot reproduce this. The only thing missing, I think, is Upload for new submissions or editting.
(If this comment was disrespectful, please report it.)

 
12/16/2006 3:24:16 AMDreamcoding

Robert: Now I understand, Thanks. It was actually logging in before viewing authors code. PSC server wants it to specify the programming area first. Long story short, changed things so it navigates to VB area first then navigates to show all languages of code the author uploaded. PSC server is a bit quirky. Only tested a bit, let me know if this works for you. Upload & Edit would be a nice feature.

(If this comment was disrespectful, please report it.)

 
12/16/2006 4:40:49 AMRobert Rayment

Bit of struggle this - I find now, that all favourites go to the PSC home page wherever called from and a call from this gives a PSC error. I think there are some unexpected effects in the PSC server since the PSC error does not always produce the same error.

(If this comment was disrespectful, please report it.)

 
12/17/2006 12:14:45 PMDreamcoding

I've been testing in IE and believe I have a fix for all favorites navigating to home page, however something strange happened and I can no longer add authors to favorites list. I will provide another update soon.
(If this comment was disrespectful, please report it.)

 
5/17/2007 10:50:17 AMDreamcoding

If you click the nickname in your favorites list twice, it seems to work logging in and showing their code after the intial display of PSC homepage. There is a bug that the first person you add to your list will be blank. Also some trouble with code download but hope to fix some day when I have more time. Other than that everything seems to work well for me with this program. Thanks everyone for all the comments, votes and making this program a COTM!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.