Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
62
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 set yourName to (yourName & (round (random number (10 ^ digitsInBLName) to (10 ^ (digitsInBLName + 1) - 1)) rounding to nearest))
  15. on replaceText(find, replace, someText)
  16.     set prevTIDs to text item delimiters of AppleScript
  17.     set text item delimiters of AppleScript to find
  18.     set someText to text items of someText
  19.     set text item delimiters of AppleScript to replace
  20.     set someText to "" & someText
  21.     set text item delimiters of AppleScript to prevTIDs
  22.     return someText
  23. end replaceText
  24.  
  25. set thePath to replaceText(":", "/", (path to desktop folder) as string) --textedit hates POSIX filepaths, we'll convert it to normal
  26. tell application "TextEdit"
  27.     activate
  28.     make new document at the beginning of documents
  29.     set text of document 1 to yourName as text
  30.     tell application "System Events" to tell process "TextEdit"
  31.         if menu item "Make Plain Text" of menu 1 of menu bar item "Format" of menu bar 1 exists then
  32.             keystroke "t" using {shift down, command down}
  33.             keystroke return
  34.         end if
  35.     end tell
  36.     display dialog "Your name has been randomized: " & yourName & ". You can copy and paste this into Blockland." buttons {"OK"} default button 1
  37. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement