shabegom / buttons

Buttons in Obsidian
The Unlicense
478 stars 50 forks source link

Button to run scripts: batch files and .exe files #86

Closed MariosGkMeng closed 8 months ago

MariosGkMeng commented 2 years ago

I've just discovered this really useful tool! I am using Obsidian as an interface to run some calculation scripts, since Obsidian is so versatile. Therefore, buttons can help me run scripts.

Would it be possible to add a "run script", where script is a .bat or .exe file?

shabegom commented 2 years ago

I did mock up something that could run javascript or a shell command via a button. I'm concerned about the safety of doing this and mobile compatibility.

I don't know how .exe files are executed, can you call them in via a shell command?

MariosGkMeng commented 2 years ago

Nice, thank you! I will definitely check it out What do you mean by safety?

Regarding shell command, yes, if you "cd" to the path of the .exe file and then type its name, then the program will run.