How to use a "tab" in text / string / chat?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

pepper82

Member
Jan 26, 2017
272
1
18
41
Hi all,
I would like to know if it is possible to use tab in a message?

Like:
send "Hey there!<tab>How are you?"
 
upload_2018-6-19_13-26-31.png

try this.. the character is: " ".. dont forget to change coding to UTF-8.. and if you want more you can find all spaces in character map.. default application installed with windows.. paste this to start menu(Win+S), or run menu(Win+R): "%windir%\system32\charmap.exe"..
 
Okay, so @pepper82 your question is asking if you could use TAB in a message.
Die responded with this
Press space 4 times
and you respond with this?
Very useful answer .... not

Well based on your question he is right... 4 spaces, that's the size of a tab.
Maybe you should be a little less vague with your questioning if you want a proper answer.

What are you meaning by "TAB" exactly?
If you are meaning new line you could use %nl% (which i think is a tuske thing?!?!)
or just do
send "hello"
send "how are you?"

If you want the spacing of a tab you use 4 spaces.... its not rocket science.
Rather than posting a snarky response like "very useful answer ... not" how about you give more details on what you are looking to do
 
I mean like the tab functionality in a word document if you know what I mean. Like forming a table in the chat.

NAME --- FIRSTNAME --- COUNTRY

Spector Anton Germany
Havaly Ryke Sweden
etc.

I don't think this will work out with "spaces".
 
Well I guess that's sort of impossible in Skript, because different characters have different widths, and as far as I know there isn't really a way to get the width of a character (in Skript or Java, but I don't know Java very well). And I don't think you can simply add a tab for this (I've never seen it in MC)
 
And how is he supposed to do that if the text is from a variable???
 
Look at this:
upload_2018-6-21_12-13-40.png

and since you can't use tabs, and you want to include variables (so that means they can have different word lengths), you can't add the spaces manually in the code so you will have to use the last one, which doesn't align right.
 
Everyone saying "just use four spaces" doesn't understand how tabs work in most text editors. The point of tabs is that they force things to align because tabbing brings you to the next divider. It generally doesn't just add four spaces. Y'all could do without the smartass replies when you're not even fully understanding.

As for your actual question, I've never seen any functionality for tabs in Skript, and even if there was I don't think Minecraft would really display them properly in-game. It's up to the text renderer to use tabs appropriately and I doubt Minecraft's chat does so.
 
  • Like
Reactions: pepper82
Well this could be possible as I have seen something about character width in Java before, but if you want to make it will be hard, but it might be possible
 
Status
Not open for further replies.