Code: Select all
tellraw @s [{"text":"Welcome back ","color":"yellow"},{"selector":"@s","color":"yellow"}]
Welcome back "@s"
The script attached does this to the command when the correct amount of characters are input:
Code: Select all
tellraw @s
[
{
"text":"Welcome back ",
"color":"yellow"
},
{
"selector":"@s",
"color":"yellow"
}
]
- Auto-Completion > Auto-Completion > Enable auto-completion on each input > off
MISC. > Auto-indent > on
Note: This script does not check whether it is inside a pair of quotes (yet)... so it might mess some stuff up if you have any of these inside a pair of quotes (or any combination of them)
- [
]
{
}
,
Code: Select all
;----------------------
;Created by RandomGgames / Gianluca O.
#SingleInstance, force
SetTitleMatchMode, 2
;----------------------
;SetBatchLines, 100ms
Inputbox, loop, MC Command Formatter, How many characters are there?
Loop, %loop%
{
send, {shift down}{right}{shift up}{lcontrol down}c{lcontrol up}{right}
if clipboard = ,
{
if previous = }
{
send, {enter}{backspace}
previous = },
}
else if previous = ]
{
send, {enter}{backspace}
previous = ],
}
else
{
send, {Enter}
previous = ,
}
}
else if clipboard = [
{
send, {left}{enter}{tab}{right}{enter}{tab}
previous = [
}
else if clipboard = ]
{
send, {left}{enter}{backspace}{right}
previous = ]
}
else if clipboard = {
{
if previous = [
send, {enter}{tab}
else if previous = ,
send, {enter}{tab}
else if previous = },
send, {left}{tab}{right}{enter}{tab}
else
send, {left}{enter}{tab}{right}{enter}{tab}
previous = {
}
else if clipboard = }
{
if previous = }
send, {left}{enter}{backspace 2}{right}
else if previous = ]
send, {left}{enter}{backspace 2}{right}
else
send, {left}{enter}{backspace}{right}
previous = }
}
else
previous =
}