home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2719
Discussions: 188,384, Posts: 2,243,508, Members: 232,615
Old December 1st, 2001, 05:38 AM   Digg it!   #1 (permalink)
Senior Member
 
Join Date: Oct 2001
Posts: 881
Send a message via AIM to zskillz
need some creative ideas here...PLEASE HELP!!!

I want to write a program that changes my windows 98 wallpaper to a picture that I have saved in a specific directory evertime that I restart windows....

i know how to do it using a .vbs file if I actually hardcode the name of every file in the directory..... I guess that what I am asking for is a way to read and categorize, based on number (as in an array) all of the files in a specific directory.. then I would use the random number feature to generate a background....


my problem is knowing how to read all of the files in a specific directory into some sort of array so that I don't actually have to hardcode the filenames into the .vbs or the *.java file....


if anyone knows of a way to do this, please let me know

-Zp

zskillz is offline   Reply With Quote
Old December 1st, 2001, 03:04 PM     #2 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,019
How about when the application runs it looks for all the files then populates a Database on all of the files.
Also you could make a table with all of the directories in it, that way you dont have to hardcode it, if you want to add a directory just add it into the DB


If you're using VBS you could probably pretty easily setup a DB with Access...

You could then have the application return the highest index # of in the files table, and the app picks a random number sends it back to the DB for a request of the filename....

All you'd need is a table for the folders to look into, and a table for the filenames, to make it a bit more "normalized" you could have a folderId to link back to the folders table so you could just have the filename alone, and then prepend the folder structure to that filename retrieved from the folders table

Clear as mud?


Last edited by vass0922 : December 1st, 2001 at 03:06 PM.
vass0922 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is It Just Me? (2896)
CPU wont boot (6)
3-days in and no threads about Gaza (160)
The United States Debt (20)
I think I just killed my computer w.. (24)
hp compaq nc6000 problems (139)
Upgrading RAM (5)
Folderchat Weekday thread (442)
Antec 300 bulk purchase? (11)
Recent Discussions
CPU wont boot (6)
GLaDOS is up. (3)
HP notebook reinstall Vista NO .. (5)
Building a gaming computer advi.. (4)
hp compaq nc6000 problems (139)
Folderchat Weekday thread (442)
Creative T-3000 Subwoofer (3)
ACPI controller halt on boot (2)
Worth the upgrade?? (15)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 10:20 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28