forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Start Menu Filler

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
scottsteely
Newbie


Joined: 04 Dec 2005
Posts: 2

PostPosted: Sun Dec 04, 2005 2:12 pm    Post subject: Start Menu Filler Reply with quote

Hi, I just downloaded Personal VDS and it seems fairly useful but it’s been a while since I’ve programmed anything. I’m trying to write a script that will go through my Program Files directory, find all executable files and create a shortcut in a corresponding folder in my start menu. – Seems simple enough but I am new to VDS and am running into a few problems. I can create a list file with all .exe from the directory but after that I’m lost.
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Sun Dec 04, 2005 3:34 pm    Post subject: Reply with quote

Hi Scott,

welcome to VDS World...

It sounds like all youhave left to do is create a directory in the appropriate start menu, using DIRECTORY CREATE, and then start creating links from your list, using LINK CREATE, inside a loop.

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
scottsteely
Newbie


Joined: 04 Dec 2005
Posts: 2

PostPosted: Tue Dec 06, 2005 2:17 am    Post subject: Thnk for the reply Reply with quote

Well, so far I have been able to create a directory for each .exe file but I am have a little problem with the link command and the loop command. Maybe you could give a newbie like my self some advice, - I know it’s sloppy coding.
Code:


  %Z = 1
  %A = 1
     list create,2
    list create,1
     list filelist,1,c:\program files,*
   
    :loop
    repeat   
      
      list seek,1,%A
      %I = @ITEM(1)   
      directory change, %I      
      %X = @STRDEL( %I,1,17)
       REM info %X   
      list filelist,2,*.exe         
      %Y = @count(2)
       rem info %Y      
        if @not(@EQUAl(%Y,%Z))   
          list seek,2,%Y
         %P = @Item(2)
          directory create, c:\test\%X
          link create,%I%P,c:\test\%X,%P    
          %Z = %Y
        end
      
      %A = @succ(%A)   
   until @equal(%A,250)
Back to top
View user's profile Send private message
kOt
Contributor
Contributor


Joined: 19 Jan 2004
Posts: 89
Location: Fyffe, AL

PostPosted: Tue Dec 06, 2005 4:58 am    Post subject: Reply with quote

This may be what your looking for...
could use a little tuning up
Code:

# setting up variables
%%startmenufolder = "C:\FAKESTARTMENU"
%%programfiles = "C:\Program Files"

# create a list routine to find all exe's in
# programfiles folder and subfolders
list create,1
list filelist,1,%%programfiles,*
list add,1,%%programfiles
list create,2
repeat
  list filelist,2,@item(1)\*".exe"
  %n = @next(1)
until @null(@item(1))

# take the list created above and create all
# directories and create link in them
list seek,2,0
repeat
  %%path = @path(@item(2))
  %%name = @name(@item(2))
  directory create,%%startmenufolder\%%name
  link create,@item(2),%%startmenufolder\%%name,%%name,@item(2),@path(@item(2))
  %n = @next(2)
until @null(@item(2))

_________________
Visual Dialogscript 5
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group