I need to slice one image into 50 different images automatically.
You could use ImageMagick?
convert -crop 100x100 original.jpg tiles_%d.jpg
100 is the tile size.
In Photoshop, pull out guides where you want to slice the image. When you have all the guides in place, choose the slice tool from the tool palette. Once the slice tool is chosen, you will see a button on the toolbar that says "slices from guides". Push that button and Photoshop will put labels on the slices. Then just go through Save For Web dialogue.