Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Variables
  2. set numbersInBLName to false -- boolean (set to true or false)
  3. set digitsInBLName to 2 -- positive integer (set this to any number that is not decimal or negative)
  4.  
  5. -- The Script
  6. set BLNamePart1 to {"Constant", "Crystallized", "Abstract", "Dynamic", "Firey", "Icy", "Cool", "Unique"}
  7. set BLNamePart2 to {"Gamma", "Ice", "Fire", "Aspect", "Day", "Night", "Error", "Flight", "Failure", "Approach"}
  8. set yourName to some item of BLNamePart1
  9. set yourName to (yourName & some item of BLNamePart2)
  10. if yourName is equal to "IcyGamma" then
  11.     say "It's not possible!"
  12.     display dialog (1 / 0)
  13. end if
  14. if numbersInBLName then
  15.     if (digitsInBLName ≥ 9) then
  16.         beep 1
  17.         display dialog "Your digitsInBLName can't be over 9" buttons {"OK"} with icon 2 with title "Script Error" default button 1
  18.         return
  19.     end if
  20.     if (digitsInBLName ≤ 0) then
  21.         beep 1
  22.         display dialog "Your digitsInBLName can't be under 1" buttons {"OK"} with icon 2 with title "Script Error" default button 1
  23.         return
  24.     end if
  25.     set yourName to (yourName & (round (random number (10 ^ digitsInBLName) to (10 ^ (digitsInBLName + 1) - 1)) rounding to nearest))
  26. end if
  27. tell application "TextEdit"
  28.     activate
  29.     make new document at the beginning of documents
  30.     set text of document 1 to yourName as text
  31. end tell
  32. tell application "System Events" to tell process "TextEdit"
  33.     if menu item "Make Plain Text" of menu 1 of menu bar item "Format" of menu bar 1 exists then
  34.         keystroke "t" using {shift down, command down}
  35.         keystroke return
  36.     end if
  37. end tell
  38. activate
  39. display dialog "Your name has been randomized: " & yourName & ". You can copy and paste this into Blockland." buttons {"OK"} default button 1
  40. tell application "TextEdit" to activate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement