nodegui / react-nodegui

Build performant, native and cross-platform desktop applications with native React + powerful CSS like styling.🚀
https://react.nodegui.org
MIT License
6.18k stars 171 forks source link

Cant do functions with created push button #300

Closed terryyoung22 closed 3 years ago

terryyoung22 commented 3 years ago

Is your feature request related to a problem? Please describe. I am trying to find clear documentation on how to execute a command locally

Describe the solution you'd like Trying to build an automation desktop app for my devs and not sure how to link my created button to execute a command, do more then console.log

Describe alternatives you've considered not much, didnt know if it would be written in another langues than what is on the TSX or what

Additional context Looking for documentation or examples of how the buttons work to interact with the MacOS on a directory level for certain task

a7ul commented 3 years ago

Hey @terryyoung22

Can you use the nodejs's inbuilt child_process exec to execute your script ?

https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

terryyoung22 commented 3 years ago

Hey @a7ul I will for sure try and take a look. I wasnt sure if that was an acceptable call within the react-nodegui framework. I will try it, thank you.

a7ul commented 3 years ago

react-nodegui is just a library that works on top of NodeJs. Hence you can call any nodejs api.
Since this is not an issue with react nodegui I am going to close this issue.