topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 6:38 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thesteve [ switch to compact view ]

Pages: [1]
1
Developer's Corner / Re: F*cks per source package and license
« on: November 24, 2006, 03:01 PM »
PHP is a bastard to work with, I think, so it seems only fitting that it gets "fuck"ed the most.

2
Post New Requests Here / Re: IDEA: Run Dialog aliases
« on: November 24, 2006, 02:53 PM »
Using the same basic technique as Ruffnekk suggested, you can skip the folder creation bit and stick your shortcuts directly in a folder already in your system path, like %SYSTEMROOT%\Windows\System32. The advantage to Ruffnekk's method is that you get a much more organized result.

3
Post New Requests Here / Re: IDEA: Simple Race Brackets Program
« on: November 24, 2006, 02:47 PM »
I've seen this type of program as an assignment for a couple of different classes, and what you're proposing sounds like the objective of a number of tournament organizers. I've done a cursory Google examination for you:
http://www.download.com/Tournament-Bracket-Builder/3000-2136_4-10444952.html
http://www.softplatz.com/Soft/Home-Hobby/Cataloging/Professional-Tournament-Organizer.html
http://www.allprosoftware.com/ts/ (trial version)
http://games.softpedia.com/get/Tools/Tourney-Master.shtml (trial version)

4
Post New Requests Here / Re: IDEA: Create shortcuts from a list
« on: November 24, 2006, 02:18 PM »
@Ruffnekk:
splut.Length returns an "Object required" error - though it's been a while since I've worked with VBScript, my thought (and some quick Google research) is that the Length property is available for strings, but not arrays. UBound([arrayname]) is the accepted way to find an array's length in VBScript. I believe IsNull() could be used to check for null values in the array.

5
Post New Requests Here / Re: IDEA: Create shortcuts from a list
« on: November 23, 2006, 10:17 PM »
Nice catch, Ruffnekk. I suppose the If array_len > 0 should really be a check for null instead. Testing for array_len = 0 wouldn't work, unfortunately. If anyone has a more elegant way of doing the same task, please jump in.

6
Post New Requests Here / Re: Create shortcuts from a list
« on: November 23, 2006, 12:30 AM »
@lanux128:

I'm a brandy-new member here, so please be tolerant of my ignorance of protocol.

I wrote a small VBScript that appears to suit your needs. I don't see a way to upload this to DonationCoder, and I should have been in bed hours ago so I'm not going to go and upload it to my website, so I've placed the source code inside the nifty code tags:
'*********************************************
'** ShortcutCreator
'*********************************************
'** Author: Steve Perkins Date: 11/23/06
'** Purpose:
'**  This VBScript allows the user to
'**  specify a file containing paths to
'**  shortcuts and possibly shortcut names and
'**  creates shortcuts on the user's desktop
'**  according to the specifications.
'**
'** REQUIREMENTS:
'**  You must have Windows Script Host installed
'**  (http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en
'**  OR http://browse.files.filefront.com/Windows+Script+Windows+v560/;1652432;/browsefiles.html
'**  if you don't want to validate your copy of Windows).
'**
'** USAGE:
'**  Open a command prompt and type wscript ShortcutCreator.vbs /file:[shortcutDataFile.txt].
'**
'** NOTES:
'**  With this utility you can either let the program
'**  figure out shortcut display names or specify
'**  them in the file. If you do not specify shortcut
'**  names, this script will strip the filename
'**  from the path the shortcut points to and remove
'**  the file extension and use the remainder as
'**  the shortcut's display name.
'**  IF YOU WANT TO SPECIFY SHORTCUTS NAMES, put them
'**  after the path of the shortcut, separating the ]
'**  two values with a comma.
'**  EXAMPLE: C:\Program Files\Fortitude.exe, Fortitude Shortcut
'**
'**  You can specify some shortcuts with display names
'**  and some without in the same data file.
'**
'**  This script has no useful comments. It was put together
'**  specifically for a user on DonationCoder.com.
'*********************************************

Dim shortcut_file

Set args = WScript.Arguments.Named

shortcut_file = args.Item("file")

If shortcut_file = "" Then
Wscript.Echo "Usage: ShortcutCreator.vbs /file:filepath"
Else
Dim objFSO, objTextFile, WshSysEnv, sh
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(shortcut_file, 1, False)
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")
dim root
root = WshSysEnv("USERPROFILE")

Set sh = WScript.CreateObject("WScript.Shell")
Do Until objTextFile.AtEndOfStream
Dim file_name
Dim shortCutName
Dim splut
Dim pos, array_len
shortCutPath = objTextFile.ReadLine
splut = Split(shortCutPath, ",")
array_len = UBound(splut)

If array_len > 0 Then
shortCutPath = splut(0)
End If
If array_len >= 1 Then
shortCutName = splut(1)
file_name = shortCutName
Else

pos = Len(shortCutPath) - InStrRev(shortCutPath, "\")
file_name = Right(shortCutPath, pos)

pos = Len(file_name) - 4
file_name = Left(file_name, pos)
shortCutName = file_name
End If

Set shortCutLink = sh.CreateShortcut(root & "\Desktop\" & shortCutName & ".lnk")
shortCutLink.TargetPath = shortCutPath
shortCutLink.WindowStyle = 1

shortCutLink.Description = file_name
shortCutLink.Save
Loop

objTextFile.Close
WScript.Echo("Finished.")
End If

I don't know how familiar you are with WSH and VBScript, so a quick instruction guide:
1. Copy the code I've presented to you and paste it into a new text document.
2. Rename the text document with a .vbs extension.
3. Run the little snot from the command line using the syntax wscript [whatever].vbs /file:[directory\]shortcutPathsFile.txt

I won't check back until after Thanksgiving, so if you have questions I'll be glad to answer them then.

Pages: [1]