I don't know where did you get all those extra words from, really....
go(range(1,10,'page'))
delay(10sec, range(1,10,'page'),style:hidden)
where did you get all those from: to: time: and other stuff? Only guess - thought them up yourself. Nyx don't create those, and range command you write completely yourself.
I'v chosen this one as a special case....
go(target:range(from:6,to:8,prefix:'page'),style:hidden))
Again, where did you get all the useless words such as "target" from? Whatever.
style:hidden Hidden button? Aha.... Buttons don't have such parameter.
And to complete the mess - an extra bracket
) in the end.
No wonder it doesn't work. Now I'm not mocking you just pointing errors. You should study the nyx a bit more. Feel free to ask more questions, but the major advice in scripting/programming: you should ALWAYS understand what you are writing and what for. You don't. Style:hidden prooves it... Just spend a bit more time to understand nyx.
However, when I try to create a custom button with the random page function, I can't the button to show up
Unfortunately in my topic I discussed that you just can't. Range works only with "delay", "continue" "goto() function" and maybe I'm forgetting things but I believe yes\no buttons too. It doesnt work with custom buttons.
There's a trick how you may do that. If you want your custom button to link to a random page - create another page (that won't be shown), and make your button link to it. On that service page use either delay with 0 seconds leading to your random pages, or goto() function leading there.
How it will work: When you press your custon button it leads you to your service page, then instantly to the one from your range. The change is so quick that user will not notice it.
Read those please.
http://www.milovana.com/forum/viewtopic.php?f=2&t=4355
http://www.milovana.com/forum/viewtopic.php?f=2&t=5926