LsLnkMenu version 1.75

Introduction:

LSLnkMenu is a Litestep module that will display a menu of .lnk files (Explorer shortcuts). It was created because I got tired of modifying all my shortcuts everytime I switched themes. With LsLnkMenu, all you have to do is change the location of the main button and all your shortcuts stay the same. LsLnkMenu will now read any file and its associated icon. However, you can change the icon that the file displays via explorer to any icon or bitmap.

Installation:

To install, add an entry to your step.rc file to load the dll (ex. LoadModule C:\LiteStep\LSLnkMenu.dll). Then make whatever modifications needed in the LSLnkMenu.ini file and place it in the LiteStep directory. NOTE: If you use the sample INI file provided, the top part contains an Example of the format don't use this, use the bottom part. You can also add an entry in your step.rc file called LsLnkMenuControlFile to have LsLnkMenu use a specific format file. This is useful for themes.
(Example LsLnkMenuControlFile c:\Litestep\themes\MyTheme\lslnkmenu.ini)

I have also included a screen shot of the module in action.

Format File:

Below is a list of all the options that can be set for the format file and a brief description of each  (An “X” indicates a required value.)

[Main] Section

Command

R

Description

Sample

NumberOfSliders = integer

X

The number of Sliders to create (Required)

NumberOfSliders = 3

[SliderX] Section

This is the start of the settings for each of the buttons. Note the X represent the slider number these settings are for. Example = [Slider2] would be the settings for button number 2.

 

Command

R

Description

Sample

Description = string

 

The sliders description which appears on tooltip (If blank, then no tooltip for the main window)

Description = Internet Programs

LnkPath = string

X

The directory to read the .lnk files (Required)

LnkPath = c:\Internet

LnkFilesOnly = integer

 

Display .Lnk files only (Exploder shortcuts).
1 = Show only .Lnk files, 0 = Show all files.

LnkFilesOnly = 0 (Show all files)

ExclusionList = string

 

If we are showing all files, do we want to exclude certain file types. This is a string that lists the types of files to exclude.

ExclusionList = *.bat | *.txt | *.bmp
(This would exclude any .bat, .txt and .bmp files from showing)

StartUpHidden = integer

 

The button is initially hidden.
1 = Start Hidden, 0 = Start Visible.
Default = 0

StartUpHidden = 0

MainTooltip = integer

 

Display the tooltip for the Main Button. Note that you must have a Description for the button to get a tooltip. This is just a way to turn it off.
1 = Show tooltip, 0 = Don't show tooltip.
Default = 1

MainTooltip = 0

MainMouseOverSound = string

 

The sound to play when the mouse passes over the main button.

MainMouseOverSound = D:\LiteStep\over.wav

MainPressSound = string

 

The sound to play when the mouse is pressed on the main button.

MainPressSound = D:\LiteStep\pressed.wav

XPos = integer

 

The X Position to place the main button. If the value is positive, the value is relative to the left side of the screen. If it is negative, it is relative to the right side of the screen.

XPos = 10

YPos = integer

 

The Y Position to place the main button. If the value is positive, the value is relative to the top of the screen. If it is negative, it is relative to the bottom of the screen.

YPos = 0

AlwaysOnTop = integer

 

Keep the button always on top.
1 = True, 0 = False
(Default = 1)

AlwaysOnTop = 1

MainBitmap = string

X

The bitmap used for the main button (Required)

MainBitmap = MainButton.bmp

MainOverBitmap = string

 

The bitmap used when the mouse is over the main button.

MainOverBitmap = MainOver.bmp

MainPressedBitmap = string

 

The bitmap used when the mouse presses the main button.

MainPressedBitmap = MainPress.bmp

PanelMouseOverSound = string

 

The sound to play when the mouse passes over a button on the panel.

PanelMouseOverSound = D:\LiteStep\over.wav

PanelPressSound = string

 

The sound to play when the mouse is pressed on a button on the panel.

PanelPressSound = D:\LiteStep\pressed.wav

PanelTooltip = integer

 

Display the description of the button the mouse is over on the panel.
1 = Show tooltip, 0 = Don't show tooltip.
Default = 1

PanelTooltip = 0

PanelTopBitmap = string

 

Bitmap to place at top of the Panel.

PanelTopBitmap = PanelTop.bmp

PanelMiddleBitmap = string

X

Bitmap used for background of each .lnk file in the panel (Required)

PanelMiddleBitmap = PanelMid.bmp

PanelBottomBitmap = string

 

Bitmap to place at bottom of Panel.

PanelBottomBitmap = PanelBot.bmp

Orientation = integer

 

Orientation of Panel
1 = Vertical, 2 = Horizontal
Default = 1

Orientation = 1

SlideDirection = integer

 

Direction to slide the Panel
1 = Down, 2 = Vertical, 3 = Left, 4 = Right
5 = Right and Down, 6 = Right and Up
(The last 2 are like the Explorer menu's 'Slide' feature)
Default = 1

SlideDirection = 5

SlideSpeed = integer

 

How much to expand the panel (in pixels) each loop until it is fully expanded.
0 = no 'animation' just appear.
1 = Real Slow, 50 = Faster.
(Default = 0)

SlideSpeed = 15

ShowIcon = integer

 

Show Icons on the panel.
(1 = True, 0 = False)
Default = 1

ShowIcon = 1

UseSmallIcon = integer

 

Use the small icon or the big one.
(1 = use small, 0 = use big)
Default = 1

UseSmallIcon = 1

IconXPos = integer
IconYPos = integer

 

Where to place the icon. This means the location of the icon on the PanelMiddleBitmap.

IconXPos = 10
IconYPos = 1

ShowText = integer

 

Do we print the .lnk decription.
(1 = yes, 2 = no)
default = 1.

ShowText = 1

TextXPos = integer
TextYPos = integer

 

Same as the IconXPos and IconYPos except for the Text

TextXPos = 20
TextYPos = 25

TextColorR = integer
TextColorG = integer
TextColorB = integer

 

The color of the text when printing the .lnk decription.

TextColorR = 200
TextColorG = 200
TextColorB = 200

TextHighlightColorR = integer
TextHighlightColorG = integer
TextHighlightColorB = integer

 

The color of the text when it is highlighted.

TextHighlightColorR = 255
TextHighlightColorG = 255
TextHighlightColorB = 255

FontName = string

 

The font to use when printing the .lnk decription.
Default = Small Fonts.

FontName = Tahoma

FontSize = integer

 

The size of font to use when printing the .lnk decription.
Default = 10.

FontSize = 9

PanelXPos = integer
PanelYPos = integer

 

Where to place the panel (In Screen Coordinates). If these are blank or missing, the location will calculated to be either under / over / left or right of the MainButton depending on the Orientation and slide direction. If the values are positive, the values is relative to the left side of the screen. If they are negative, they are relative to the right side of the screen.

PanelXPos = 200
PanelYPos = 0

[Default]

The default section was created because like all programmers, I'm very lazy and didn't like making the same change to 15 sections. The default section can contain any setting that appears in the [SliderX] section that you want to apply to all [SliderX] sections. An example would be PanelMiddleBitmap or ShowText. When the settings are loaded, the [SliderX] section will be checked first. If the setting is found there, it will use it. If it's not found, the [Default] section will searched and if the setting is found, it will use that. If the setting is not found in any of these sections, the default value will be used. An example of this is below :

[Default]
AlwaysOnTop = 1
MainTooltip = 1
PanelToolTip = 0
PanelBottomBitmap = LSLnkMenuBottom.bmp
PanelMiddleBitmap = LSLnkMenuMiddle.bmp
SlideDirection = 1
SlideSpeed = 15
TextXPos = 15
TextYPos = 2
TextColorR = 200
TextColorG = 200
TextColorB = 200
TextHighlightColorR = 255
TextHighlightColorG = 255
TextHighlightColorB = 0
FontHeight = 9
FontName = Tahoma
ShowText = 1
ShowIcon = 0

[Slider1]
LnkPath = $ShortcutsDir$Coding Stuff
Description = Code
XPos = 264
YPos = 0
MainBitmap = CodeButton1.bmp
MainPressedBitmap = CodeButton.bmp
MainOverBitmap CodeButton.bmp


[Slider2]
LnkPath = $ShortcutsDir$Coding Utilities
XPos = 304
YPos = 0
Description = Coding Utilities
MainBitmap = CodeUtilButton1.bmp
MainPressedBitmap = CodeUtilButton.bmp
MainOverBitmap = CodeUtilButton.bmp


!Bang Commands

The following is a list of all the !Bang Commands supported by LsLnkMenu

Command

Description

Sample

!LsLnkRefresh xxxx

Causes the Button to refresh its Panel (.Lnks). Pass the Description of the button to refresh that button, or pass the Slider number of the button. Pass no arguments to refresh all buttons

!LsLnkRefresh Code
or
!LsLnkRefresh 1 (From the format file section [Slider1]
or
!LsLnkRefresh (No parameters = Refresh all buttons)

!LsLnkExecute xxxx yyyy

Causes a program in LsLnkMenu to execute. Pass the Description of the button, or the Slider number of the button that contains the .Lnk file for the first parameter. Pass .Lnk description or button number in the panel for the second parameter.

!LsLnkExecute Code 1 (Causes the first .Lnk in the Code button to execute)
or
!LsLnkExecute Code Spy++ (Causes the .Lnk with description of Spy++ in the Code button, to execute)
or
!LsLnkExecute 1 5 (Causes the 5th .Lnk file in the 1st button to execute)

!LsLnkHide xxxx

Hides a button. Pass the Description of the button, or pass the Slider number of the button to hide it. Pass no arguments to hide all buttons.

!LsLnkHide Code (Hides the button with the description of 'Code')
or
!LsLnkHide 1 (Hides the first button. (From the format file section [Slider1]))
or
!LsLnkHide (Hides all buttons)

!LsLnkShow xxxx

Shows a button. Pass the Description of the button, or pass the Slider number of the button to show it. Pass no arguments to show all buttons.

!LsLnkShow Code (Show the button with the description of 'Code')
or
!LsLnkShow 1 (Show the first button. (From the format file section [Slider1]))
or
!LsLnkShow (Shows all buttons)

!LsLnkToggle xxxx

Toggle's the visible state of a button. Pass the Description of the button, or pass the Slider number of the button to toggle it. Pass no arguments to toggle all buttons

!LsLnkToggle Code (Toggle the button with the description of 'Code')
or
!LsLnkToggle 1 (Toggle the first button. (From the format file section [Slider1]))
or
!LsLnkToggle (Toggle all buttons)

!LsLnkMove xxxx aa bb

Move a button. Pass the Description of the button, or the Slider number of the button for the first parameter. Pass the XPos and YPos for the second and third parameters.

!LsLnkMove Code 100 56 (Move the button with the description of 'Code' to Screen Coord 100, 56)
or
!LsLnkToggle 1 -10 -100 (Move the first button. (From the format file section [Slider1]) to 10 pixels from the right side and 100 pixels from the bottom of the screen)

!LsLnkShowMenu xxx

Shows the specified menu x.

!LsLnkShowMenu 1

LSBox support:

There is (mostly finished) support for LSBox.  You need to load the LsLnkMenu before LSBox.  In your .box file put a like…

*ModuleHook !LsLnkBoxHook

And configure lslnkmenu as normal.  Note: I don’t think you should try destroying a box if it has LsLnkMenu in it.

 

 


Enjoy!

 


If there are any questions, bugs or comments, please feel free to contact me at carluchi@stratos.net

Carl


History

Version 1.75 (07/01/2002)
[ilmcuts]

Making better use of lsapi's functions (should support PNGs).

$evar$ problems should be fixed, .INI file should fully support $evars$.

minor tweaks

 

Version 1.7 (1/21/2002)
[repugnant]

Added !LsLnkCloseAll

Added !LsLnkBoxHook

Bitmaps don't require full paths
Removed some unnecessary code

Added poor support for LSBox.

 

Version 1.6 ( unreleased )

Added LsLnkShowMenu


Version 1.51 (2/27/2000)
Added the ability to show all files in a directory
Added exclusion list


Version 1.5 (2/24/2000)
Added !LsLnkExecute
Added !LsLnkRefresh
Added !LsLnkHide
Added !LsLnkShow
Added !LsLnkToggle
Added !LsLnkMove
Added Sound support
Added abiltiy to startup hidden
Added ability to turn ToolTips off
Added ability to run !Bang commands from an Exploder shortcut
Added LsLnkMenuControlFile entry for the step.rc file
.Lnk's now display alphabetically
Fixed some focus problems
Fixed problem when not using AlwaysOnTop and the buttons disappearing


Version 1.0 (2/10/2000)
Initial Release