Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Importing chocolate script and stylesheet
- import chocolatescript.chocolate as app
- from chocolatescript.chocolate import style
- # Start of the app
- # Does app.chocolate(), chocolatescripts version of hello world
- app.chocolate()
- # Creates two spaces in between the header and the user input
- app.linebreak()
- app.linebreak()
- app.linebreak()
- app.linebreak()
- # Displays header on the screen
- app.display("header", "Hey! I'm a header!")
- app.linebreak()
- app.linebreak()
- # Displays a user input dialog on the screen
- app.display("capture", "Hey I'm a capture. I take user input! ")
- app.linebreak()
- # Displays an info message on the screen
- app.display("info", "Hey! I'm info, I display information!")
- app.linebreak()
- # Displays plain text on the screen
- app.display("write", "I'm just plain ol' text.")
- app.linebreak()
- # Displays an error on the screen
- app.display("error", "Uh oh, I'm an error!")
- app.linebreak()
- # Displays a warning on the screen
- app.display("warn", "I'm a warning, and I'm here to warn you that the next message will take 5 seconds to display using wait()")
- app.linebreak()
- # Waits 5 seconds to continue the script
- app.wait(5)
- app.display("info", "I loaded!")
- app.linebreak()
- app.linebreak()
- app.display("header", "Ip Tools")
- app.linebreak()
- app.linebreak()
- app.display("info", "Below is your private ip!")
- app.linebreak()
- # Get your ip, mode 1 meaning private ip
- app.getip(1)
- app.linebreak()
- app.linebreak()
- app.display("info", "Below is your public ip!")
- app.linebreak()
- # Get your ip, mode 2 meaning public ip
- app.getip(2)
- app.linebreak()
- app.linebreak()
- app.linebreak()
- # Style Sheet to make colors
- app.display("header", "Stylesheet", style.UNDERLINE)
- app.linebreak()
- app.linebreak()
- # List of colors
- app.display("info", "This is color black", style.BLACK)
- app.display("info", "This is color red", style.RED)
- app.display("info", "This is color green", style.GREEN)
- app.display("info", "This is color yellow", style.YELLOW)
- app.display("info", "This is color blue", style.BLUE)
- app.display("info", "This is color megenta", style.MAGENTA)
- app.display("info", "This is color cyan", style.CYAN)
- app.display("info", "This is color white", style.WHITE)
- app.display("info", "This text has an underline", style.UNDERLINE)
- app.display("info", "This text has no style, using style.NONE. However another way you could do this is by typing nothing and leaving the third paramater blank.", style.NONE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement