random file

I am just learnig applescript and thought a fun little project would be to write a script to play a random sound clip at start up or on wake. I am having trouble generating the random number between 1 and the number of sounds in my folder. any help would be appreciated.

random number from 1 to count {"a.mp3", "b.mp3", "c.mp3"}
set theFolder to "Macintosh HD:Users:jobu:Desktop:Sounds:"
set theRandomNumber to random number from 1 to (count items of (list folder theFolder without invisibles))

j

No need. Just use the “some of ” reference form in the Finder, eg:

tell application "Finder" to open some file of myFolder