ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Create shortcuts from a list

<< < (3/7) > >>

Ruffnekk:
Nice script thesteve, similar to what I had in mind. I have a remark though, possibly a typo or a potential bug:

The statements If array_len > 0 Then and If array_len >= 1 Then are identical in this context. Therefore the statement shortcutName = splut(1) might throw an IndexOutOfRangeException. I think the code should be corrected to If array_len > 1 Then for the second If ... Then clause.

lanux128:
thesteve: your script works fine! :up:

but being on the look-out for a gui tool, i was wondering is it possible to:
• have a tiny window that supports drag-n-drop.
• set the output (shortcuts) to be created in the current folder, i.e. the folder that the text file resides.
• have an exe file of this script for computers that don't have Windows Script.

also to Ruffnekk: tks for the info. will keep that in mind, in case i run into errors..

thesteve:
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.

Ruffnekk:
Can’t you just use splut.Length?

thesteve:
@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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version