Note: conditionals are currently only usable in the newest builds of LiteStep. I recommend 11-28-2000, the current stable build.

Conditionals are sub-scripts that allow the themer (you) to have different step.rc elements loaded depending on certain variables. The most common method is for a resolution dependent conditional:
If ResolutionX = 640 or ResolutionY = 480
  *Shortcut "" -36 117 BarRightBlank.bmp  .none .none #1200s  !none
ElseIf ResolutionX = 800 or ResolutionY = 600
  *Shortcut "" -36 117 BarRightBlank.bmp  .none .none #1200s  !none
  *Shortcut "" -36 717 BarRightBlank.bmp  .none .none #1200s  !none

This works because the variables ResolutionX and ResolutionY are internal variables, and are automatically set by LiteStep on load.

Another way, using internal variables, would be a conditional using the UserName variable to select different components, so that a themer can have specific settings for himself, and generic settings for all other users:
If UserName = Maur
  ShutdownWindows c:\windows\shutdown.exe
  RebootWindows   c:\windows\reboot.exe
  RestartWindows  c:\windows\restart.exe
  ShutdownWindows "RUNDLL32.EXE shell32.dll,SHExitWindowsEx 0x1"
  RebootWindows   "RUNDLL32.EXE shell32.dll,SHExitWindowsEx 0x2"
  RestartWindows  "RUNDLL32.EXE shell32.dll,SHExitWindowsEx 0x3"

A third major way would be to have a numeric set, and a variable that is defined by the themer, in this case:
popupimgstyle 1

If popupimgstyle = 1
  PopupDir ..\popupsEN\
    popupstyle_en       "• Entransi popups"
    popupstyle_en2      "Entransi2 popups"
ElseIf popupimgstyle = 2
  PopupDir ..\popupsEN2\
    popupstyle_en       "Entransi popups"
    popupstyle_en2      "• Entransi2 popups"

And then have a selection entry in the step.rc's popup section which changed the variable $popupimgstyle$ according to the user's selection:

    *Popup "Popup Settings..." Folder
      *Popup "$popupstyle_en$" !execute !rc-set popupimgstyle "1"!recyclels
      *Popup "$popupstyle_en2$" !execute !rc-set popupimgstyle "2"[!recyclels]
    *Popup ~Folder

This way requires lsrc.dll to be loaded, in order for the !rc-set command to be able to change the variable in the step.rc.

Of course, as a themer you'll certainly come up with many more ideas, depending on how your theme is designed (eg: possibly a combination of conditionals and LSBox, to have different theme layouts for different user styles).

All examples taken with permission from BarQNX by Maur

Log in or registerto write something here or to contact authors.