evidently you've not perfectly understood my macro which is a stand-alone demo, i.e. every time you start the macro, the slice is set to the value that is defined by "setSlice()". Consequently you can't use the slider with my demo macro.
So please realize that the macro is a demo and, as it is written in the code as a comment, its first part is for preparation only and not functional for what you need. This is also indicated by the message "Here comes the beef".
If you want to use my macro with the slider, you should run it once and, before you run it a again, comment the following two lines of code:
run( "MRI Stack (528K)" );
setSlice( 13 );