Try this:acSendKeys("^c")
acDelay(50)
local clip = acGetClipboardText()
local parse = #clip
while parse > 0 and clip:find("^%s", parse) do parse = parse - 1 end
clip = clip:sub(1, parse)
acSetClipboardText(clip)
Modified from here: http://lua-users.org/wiki/CommonFunctions