# Command corresponding to the buttons

**URL:** https://in-thread.sonic-pi.net/t/command-corresponding-to-the-buttons/664
**Category:** \[P\] Patreon Support
**Created:** [January 28, 2018, 4:59pm UTC](https://in-thread.sonic-pi.net/t/command-corresponding-to-the-buttons/664 "2018-01-28T16:59:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)
#### Post date: [January 28, 2018, 4:59pm UTC](https://in-thread.sonic-pi.net/t/command-corresponding-to-the-buttons/664/1 "2018-01-28T16:59:01Z")

</div>

hI,

imagine i want to send an osc message to sonic pi to stop all or to reload the script ?  
What are the sonic pi commands that simulate the stop, play, reload, record buttons ?

Tanks for your help

---

<div class="post-metadata">

### Author: ![Eli](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/eli/32/116_2.png) [@Eli](https://in-thread.sonic-pi.net/u/Eli)
#### Post date: [January 28, 2018, 5:31pm UTC](https://in-thread.sonic-pi.net/t/command-corresponding-to-the-buttons/664/2 "2018-01-28T17:31:12Z")

</div>

I’m not so sure you can exactly do what you want to do… but  
check out ‘stop’, ‘run\_file’ and ‘run\_code’ in the help/language  
section in the boffom left of SP…

There is also: with\_fx :record, but whether it works over OSC ?

I’m guessing that run\_code “stop” would stop all running buffers  
though… if its a viable command?

Only way is to try, I reckon…

Eli…
