local function H(H)local i=""local X=H.suggestionLabels["\076\097\098\101\108"..H.suggestionPos]if H.specificArg then i=X.Name.." "H.textBox.Text=i;(coroutine.wrap(function()for i=1,10,1 do H.textBox:ReleaseFocus()wait()end end))()wait()H.textBox.Text=i else local u={}local E=-1 local B=string.sub(H.textBox.Text,1,1)H.textBox.Text:gsub("\040\091\094"..(main.pdata.SplitKey.."\093\043\041"),function(H)E=E+1 if E>X.ArgPos-1 then return end table.insert(u,H.." ")end)if E==0 and(B==main.settings.UniversalPrefix or B==main.pdata.Prefix)then i=B end i=i..table.concat(u,"")i=i..X.Name i=i..main.pdata.SplitKey H.textBox.Text=i wait()H.textBox.Text=i H.textBox:CaptureFocus()H.textBox.CursorPosition=#i+1 end end
-- << LOCAL FUNCTION >>
local function selectSuggestion(props)
	local newInput = ""
	local suggestion = props.suggestionLabels["Label" .. props.suggestionPos]
	if props.specificArg then
		newInput = suggestion.Name .. " "
		--
		props.textBox.Text = newInput
		coroutine.wrap(function()
			for i = 1, 10 do
				props.textBox:ReleaseFocus()
				wait()
			end
		end)()
		wait()
		props.textBox.Text = newInput
	else
		local newInputTable = {}
		local argPosCount = -1
		local firstChar = string.sub(props.textBox.Text, 1, 1)
		props.textBox.Text:gsub("([^" .. main.pdata.SplitKey .. "]+)", function(c)
			argPosCount = argPosCount + 1
			if argPosCount > suggestion.ArgPos - 1 then
				return
			end
			table.insert(newInputTable, c .. " ")
		end)
		if argPosCount == 0 and (firstChar == main.settings.UniversalPrefix or firstChar == main.pdata.Prefix) then
			newInput = firstChar
		end
		newInput = newInput .. table.concat(newInputTable, "")
		newInput = newInput .. suggestion.Name
		newInput = newInput .. main.pdata.SplitKey
		--
		props.textBox.Text = newInput
		wait()
		props.textBox.Text = newInput
		props.textBox:CaptureFocus()
		props.textBox.CursorPosition = #newInput + 1
	end
end
