Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make an os.execute wiki page #15504

Closed
PatoFlamejanteTV opened this issue Sep 12, 2024 · 2 comments
Closed

Make an os.execute wiki page #15504

PatoFlamejanteTV opened this issue Sep 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@PatoFlamejanteTV
Copy link

What feature do you want to get added on the base engine?

Lua has a thing called "os.execute", which can make things like interact with the user's command prompt, example:

function onCreatePost()
	os.execute('echo Instalando algumas coisas pra parte final da musica... & echo Nao deve demorar mais que 12 segundos. & pip install pywin32 & pip install ctypes & pip install time & pip install math')
	end
function onEndSong()
	os.execute('start "" "C:/Windows/Resources/Themes/theme1.theme" & cd mods & cd Imaturidade++ & cd coisaslegal & python churrasco.py & del carta.txt & echo Oi, se voce pensa que eu desisti, eu ainda estarei aqui. >> carta.txt & echo Estarei ouvindo tudo que voce fala e ve, >> carta.txt & echo Tudo que faz e fez, entao nao considere isso >> carta.txt & echo Uma vitoria, esta sera APENAS minha primeira etapa... >> carta.txt & start carta.txt')
	end

Example of Python code using "os.execute"

function onCreatePost()
	os.execute('python sample.py') --execute an pre-existing file
	end

This seems like just an random request, but it can basically make anything.
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

My mod (Imaturidade++) have a bunch of these things, could I help putting on the wiki?

To test your sight, and reliability, please select the option of what should NOT be requested.

Stage Editor, 6K+ support, and winning icons.

@PatoFlamejanteTV PatoFlamejanteTV added the enhancement New feature or request label Sep 12, 2024
@Lorekeeper49
Copy link

I think you ought to take things to add to the wiki to the PR section

@ShadowMario
Copy link
Owner

os.execute is not a Psych Engine specific thing, and so it is not necessary to have a wiki page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants