So, borrowing on Gargoyle's example, you could
 Code:
Function DoStuff($1,$2)
  Dim $
  $ = writevalue ("HKEY_CURRENT_USER\Environment", 'Station', $1, "REG_SZ")
  $ = writevalue ("HKEY_CURRENT_USER\Environment", 'Extension', $2, "REG_SZ")
  $ = writevalue ("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons", "1", "REG_SZ")
  Exit 0
EndFunction

Select
 Case @USERID = "xxx" DoStuff('601100', '601100')
 Case @USERID = "yyy" DoStuff('601200', '601200')
EndSelect
Basically, you are doing the same thing many times with slightly different values. You pass those unique values to the function, which plugs them in to the proper place.

This is an EXAMPLE which may not be complete for your needs and does not have any error checking.. it's a place for you to start, not finish! \:\)

Glenn


Edited by Glenn Barnas (2009-04-17 08:47 PM)
Edit Reason: added disclaimer
_________________________
Actually I am a Rocket Scientist! \:D