forked from ShadowMario/FNF-PsychEngine
-
Notifications
You must be signed in to change notification settings - Fork 52
LUA ‐ os.execute function
Stinko edited this page Feb 14, 2025
·
2 revisions
Lua's "os.execute
"function can make things interact with the user's command prompt. Which can sometimes be usefull.
This seems like just an random lua command, but it can basically make anything.
Normal example:
function onCreatePost()
os.execute('echo Wait... & echo Takes around 12 seconds. & pip install pywin32 & pip install ctypes & pip install time & pip install math')
end
Example of Python code using "os.execute
"
function onCreatePost()
os.execute('python sample.py') --execute an pre-existing file
end
Example of an simple message box system:
mesage.bat (./TESTS)
:: MessageBox System, make [[ONLY]] for Imaturidade++
:: By: PatoFlamejanteTV, made ONLY by me
:: ----------------------------------------------------------------------------------
@echo off
IF EXIST temp.vbs (
del temp.vbs
)
echo x=msgbox("%1" ,%3, "%2") >> temp.vbs
start temp.vbs
echo DEBUG: Message: %1, Title: %2.
:: del temp.vbs
:: message.bat Die ? 48
:: ^ .bat Name ^ ^ ^- Icon and Other Stuff (eg. "48 for Warning Message icon")
:: | |- Title (eg. "...")
:: |- Content/Message/Text (eg. "I-N-F-E-C-T-E-D")
script.lua (./data/song)
function onCreatePost()
os.execute("cd .. & cd .. & cd TESTS & message.bat Muahahaah ? 48")
end
This works on basically any engine that supports lua, this includes forks of JS Engine and Psych Engine.
Remember: SOME ENGINES MAY DISABLE (for some reason) THIS, SO IT IS NOT GUARANTEED!!!