Glad you like it. I stole some of the scope definitions from Twilight, so credit due etc.<br><br><div><span class="gmail_quote">On 11/10/05, <b class="gmail_sendername">Allan Odgaard</b> <<a href="mailto:throw-away-1@macromates.com">
throw-away-1@macromates.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 10/11/2005, at 16.22, Andreas Wahlin wrote:
<br><br>> [...] what was described was a way of having a toggle between two<br>> files, but i want a toggel between n files.<br><br>The stuff I showed used a bash array, so just do:<br><br>themes=(theme1 theme2 theme3)
<br><br>You'll have to use modulo "number of themes", which was the "total"<br>variable in my last script.<br><br>So just making it:<br><br>>> themes=(theme1 theme2 theme3)<br>>> rand=$(dd </dev/random bs=1 count=1 2>/dev/null|hexdump -e '/1 "%u"')
<br>>> total=${#themes[@]}<br>>> open "${themes[$((rand % total))]}"<br><br>Should work. Though remeber to quote theme paths properly, though ~<br>won't expand in double quotes, so use $HOME instead.
<br><br><br>______________________________________________________________________<br>For new threads USE THIS: <a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a><br>(threading gets destroyed and the universe will collapse if you don't)
<br><a href="http://lists.macromates.com/mailman/listinfo/textmate">http://lists.macromates.com/mailman/listinfo/textmate</a><br></blockquote></div><br>