View previous topic :: View next topic |
Author |
Message |
predprey Master Cheater
Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Tue Aug 02, 2016 7:55 pm Post subject: Disable Lua Engine Echo Output? |
|
|
Is there a way to disable Lua Engine echoing the executed code? TIA
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4695
|
Posted: Tue Aug 02, 2016 8:19 pm Post subject: |
|
|
If you want to stop it from stealing focus, deselect View -> Show on Print.
Otherwise, I guess you could override the print function. Example:
Code: | canprint = true
local printB = print
print = function(...)
if canprint then
printB(...)
end
end
canprint = true
print("this will be printed")
canprint = false
print("this will not be printed") |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
predprey Master Cheater
Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Tue Aug 02, 2016 8:33 pm Post subject: |
|
|
ParkourPenguin wrote: | If you want to stop it from stealing focus, deselect View -> Show on Print.
Otherwise, I guess you could override the print function. Example:
Code: | canprint = true
local printB = print
print = function(...)
if canprint then
printB(...)
end
end
canprint = true
print("this will be printed")
canprint = false
print("this will not be printed") |
|
I don't mean the stealing focus behavior, I meant that the Lua Engine always prints the executed code before the output. So if I have a long lua script that prints out a long list of data, I have to manually find and delete the script from the output log and not just select all copy paste my output data. I could always output whatever data I have to a io file but I would prefer to just write print().
Last edited by predprey on Tue Aug 02, 2016 8:41 pm; edited 2 times in total |
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4695
|
Posted: Tue Aug 02, 2016 8:40 pm Post subject: |
|
|
Oh. I don't believe there's any official way of doing that.
Executing the code in the Lua script window won't show the code you executed. If you're already working on something, copy and paste whatever is inside of it into notepad or something and restore it after you're done.
You could also add this line of code at the beginning of the code to clear everything (including the script) from the console:
Code: | getLuaEngine().Menu.Items[0][4].doClick() |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
predprey Master Cheater
Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Tue Aug 02, 2016 8:47 pm Post subject: |
|
|
ParkourPenguin wrote: | Executing the code in the Lua script window won't show the code you executed. |
doh! didn't think it would be so simple. i will do this, thanks.
|
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Fri Aug 05, 2016 7:53 pm Post subject: |
|
|
Or add this at beginning script to avoid Lua Engine pop-up
Code: |
getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
|
|
|
Back to top |
|
 |
dxxd How do I cheat?
Reputation: 0
Joined: 20 Sep 2018 Posts: 3
|
Posted: Thu Mar 07, 2019 8:03 pm Post subject: |
|
|
Good way!
Corroder wrote: | Or add this at beginning script to avoid Lua Engine pop-up
Code: |
getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
|
|
|
|
Back to top |
|
 |
|