[ create a new paste ] login | about

Link: http://codepad.org/IaG46dMl    [ raw code | fork ]

DarkStar - Plain Text, pasted on Oct 13:
' make a file called rbcap.txt, in this file, put some captions, seperated by a line
' make a file called rbclicky.txt, in this file, put ... i dunno. anything.
' Both of these files must be in your icechat scripts directory
' save this file as randombuttons.ice or something

Dim RandomButtonDialog
 max_x = 600
 min_x = 20
 max_y = 600
 min_y = 20
 max_width = 500
 min_width = 120
 max_height = 300
 min_height = 20
Sub RandomButton()
  SendCommand "/timer RandomButton off"
  x = int(RND * max_x) + min_x + 1
  y = int(RND * max_y) + min_y + 1
  width = int(RND * max_width) + min_width + 1
  height = int(RND * max_height) + min_height + 1
  RandomButtonDialog = CreateDialog("Whats this do?",X,Y,width,Height)
  AddButton RandomButtonDialog,GetIdentifier("$randphrase(rbcap.txt)"),2,2,Width-6,Height-4,1,0,"RandomButton"
  ShowDialog RandomButtonDialog
End Sub

Sub RandomButton_clicked()
  SendCommand GetIdentifier("$randphrase(rbclicky.txt)")
  CloseDialog RandomButtonDialog
  SendCommand "/timer RandomButton 1 " & int(RnD * 60 * 60) & " /! RandomButton"
End Sub
SendCommand "/timer RandomButton 1 " & int(RnD * 5 * 60) & " /! RandomButton"



Create a new paste based on this one


Comments: