Page 1 of 1

Easy one. How to clear Command Line via applescript

Posted: Sun Sep 09, 2018 3:27 pm
by nizer
Having a brain fart here.

I have tried ALL the commented out lines. I just want to clear the command line in LX after I patch the light. The first part works for the string mypatch

tell application "LXConsole"
set mypatch to "@436"
set mylight to "Left L.E.D. Intensity Patched."
tell the front document to doCommand string mypatch
say mylight
delay 1
--set ClearCommandLine to "/key.lxconsole/clear"
--tell the front document to doCommand string ClearCommandLine
--tell the front document to doCommand string "clear"
--tell the front document to doCommand string "/key.lxconsole/clear"
end tell

As always thanks for the help and great software.

Posted: Sun Sep 09, 2018 9:31 pm
by admin

Code: Select all

-- script that clears the command line

tell application "LXConsole"
	
	tell the front document
		set currentCommand to ""
	end tell
	
	
end tell

Wow too easy

Posted: Sun Sep 09, 2018 9:34 pm
by nizer
I knew it was too simple for me to figure out. ;-)

one more question

Posted: Mon Sep 10, 2018 4:32 pm
by nizer
Is there a way to have QLab get the current command line info.

I need to get the number that is there.

tell application "LXConsole"
tell the front document to get currentCommand
set mytest to currentCommand
say mytest
end tell