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

I want to run Lua scripts with output to the cmd console on windows 10, but the script runs twice when starting. #82

Open
egor230 opened this issue Feb 6, 2020 · 4 comments

Comments

@egor230
Copy link

egor230 commented Feb 6, 2020

I really like the Atom editor. I have Lua 5.3.5 installed on my computer. using the process-palette package, I want to run Lua scripts with output to the cmd console on windows 10, but the script runs twice when starting. please tell me how you can solve this problem? I will attach a video demonstration, I really hope for Your answer. https://www.youtube.com/watch?v=vR7doJO39wI&feature=youtu.be

@morassman
Copy link
Owner

Thanks for the video. It's very helpful!.

I don't see anything wrong with your configuration. What's strange is that the command appears twice in the Process Palette panel even though it is defined only once. That might be related to the problem and it might be a bug.

I noticed that the command runs twice when it is triggered from the context menu in the file tree, but runs once (as it should) when triggered from the Process Palette panel, so it might have something to do with the way the command in the context menu is handled.

I haven't been able to reproduce this though. I'm on OSX, but I'll try to reproduce it in a Windows VM.

@egor230
Copy link
Author

egor230 commented Feb 24, 2020

Спасибо за видео. Это очень полезно!

Я не вижу ничего плохого в вашей конфигурации. Странно то, что команда появляется дважды на панели «Палитра процессов», хотя она определяется только один раз. Это может быть связано с проблемой, и это может быть ошибка.

Я заметил, что команда запускается дважды, когда она запускается из контекстного меню в дереве файлов, но запускается один раз (как и должно быть), когда запускается из панели «Палитра процессов», поэтому она может иметь какое-то отношение к тому, как команда в контекстное меню обрабатывается.

Я не смог воспроизвести это все же. Я на OSX, но я постараюсь воспроизвести его в Windows VM.

thank you very much for your answer, now the console is displayed once.

but after executing the script, the console does not close itself.

please tell me how to make the console and panel close automatically.

this eliminates the need to close the panel and console manually.

here is a video demonstration https://www.youtube.com/watch?v=aUhgCJC4shY&feature=youtu.be

@morassman
Copy link
Owner

Ok cool. I'm glad you got the console displaying once to work.

Since I don't use Windows I'm not that familiar with its command prompt, but I Google's around a bit. If you run exit, it might close the window.

Try configuring your command as follows by putting && exit at the end:

start cmd /k C:\"Program Files"\lua\lua.exe {fileNameExt} && exit

@egor230
Copy link
Author

egor230 commented Feb 27, 2020

Thank you very much for your response. to my great regret, this option did not solve the problem. I continue to look for solutions to this problem. After executing the script, the console displays F:\Program Files\lua> and you need to exit to close the console.

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

No branches or pull requests

2 participants