{cprintf}Symbols also

You may request or share scripts for MicroMacro in this forum.
Post Reply
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

{cprintf}Symbols also

#1 Post by Lamkefyned » Fri May 23, 2014 9:03 am

Hello, I want to put this picture in one of my userfunctions and work me for the symbols... I can put it in another way?

Code: Select all

 		function LTU_Loading()
			LTU_clear()
			cprintf(cli.lightblue," * ,------------------------------------------,      .    _  .")
			cprintf(cli.lightblue," * |  Lamkefyned Tools Version 2  !!!         |      |\_|/__/|")
			cprintf(cli.lightblue," * |------------------------------------------|     / / \/ \  \")
			cprintf(cli.lightblue," *                                           \     /__|O||O|__ \")
			cprintf(cli.lightblue," *                                             \  |/_ \_/\_/ _\ |")
			cprintf(cli.lightblue," *                                                | | (____) | ||")
			cprintf(cli.lightblue," *                                                \/\___/\__/  //")
			cprintf(cli.lightblue," *                                                (_/         ||")
			cprintf(cli.lightblue," *                                                 |          ||")
			cprintf(cli.lightblue," *                                                 |          ||\")
			cprintf(cli.lightblue," *                                                  \        //_/")
			cprintf(cli.lightblue," *                                                   \______//")
			cprintf(cli.lightblue," *                                                 __ || __||")
			cprintf(cli.lightblue," *                                                (____(____)")
			yrest(2000) 
			LTU_clear()
		end
If you think something is right just because everyone else believes,you're not thinking.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: {cprintf}Symbols also

#2 Post by BlubBlab » Fri May 23, 2014 9:07 am

You could put it in a file and load the file as strings
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: {cprintf}Symbols also

#3 Post by Lamkefyned » Fri May 23, 2014 9:11 am

And how to load an external file? but it would not be the same?
If you think something is right just because everyone else believes,you're not thinking.

User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: {cprintf}Symbols also

#4 Post by lisa » Fri May 23, 2014 4:56 pm

there is a few ways to do it, the easiest way though is to use what you have done but you need to add a little extra here and there.

Any time you have a \ you need to add another \ before it, so \ becomes \\

Also you will want to add \n at the very end so it starts a new line before printing the next line.

example

Code: Select all

cprintf(cli.lightblue," * |  Lamkefyned Tools Version 2  !!!         |      |\\_|/__/|\n")
Also if you want to make a better looking box you can use other characters, such as 186,187,188,200,201,205
Just hold alt and then press those numbers on numberpad.
alt + 186 is ║
alt + 187 is ╗
and so on.

Code: Select all

╔═════╗
║     ║
╚═════╝


Command> cprintf(cli.lightblue,"╔═════╗\n║     ║\n╚═════╝\n")
╔═════╗
║     ║
╚═════╝

Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: {cprintf}Symbols also

#5 Post by rock5 » Fri May 23, 2014 8:58 pm

If you want to make it easier to draw without the double slashes you could use double square brackets, eg.

Code: Select all

str=[[
		 |\_/|
		 (o|o)
		  \W/
		   ~
]]
print(str)
Double square brackets means everything between the square brackets is taken as a literal string. Even new lines are part of the string. There is no converting of special code such as \n. What you see is what you get.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: {cprintf}Symbols also

#6 Post by Lamkefyned » Sat May 24, 2014 4:07 am

Thanks to all the problem already this arranged
If you think something is right just because everyone else believes,you're not thinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest