# Cut and Paste under Plugin for Mac and PC

**URL:** <https://forums.sketchup.com/t/cut-and-paste-under-plugin-for-mac-and-pc/30965>\
**Category:** Ruby API\
**Tags:** copy, cut, paste\
**Created:** [September 19, 2016, 3:50pm UTC](https://forums.sketchup.com/t/cut-and-paste-under-plugin-for-mac-and-pc/30965 "2016-09-19T15:50:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabster](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@gabster](https://forums.sketchup.com/u/gabster)\
**Post date:** [September 19, 2016, 3:50pm UTC](https://forums.sketchup.com/t/cut-and-paste-under-plugin-for-mac-and-pc/30965/1 "2016-09-19T15:50:51Z")

</div>

Hi guys

I’m trying to run the following situation through an extension I’m developing:

```
Sketchup.send_action ("cut")
Sketchup.send_action ("paste")

```

By typing this in ruby console, it works perfectly in both the PC and Mac. It copies and pastes the selected component. However, implementing this directly in the extension (ex. in a extensionx.rb), only works on the PC, even returning “true” for both sentences.

Any idea how to make it work on Mac?

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [September 19, 2016, 6:30pm UTC](https://forums.sketchup.com/t/cut-and-paste-under-plugin-for-mac-and-pc/30965/2 "2016-09-19T18:30:08Z")

</div>

that doesn’t work from Ruby Console or a file on my mac…

```ruby
  Sketchup.send_action('cut:')
  Sketchup.send_action('paste:')

```

works from both, as it has the correct syntax…

john

---

<div class="post-metadata">

**Author:** ![TIG](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tig/32/198_2.png) [@TIG](https://forums.sketchup.com/u/TIG)\
**Post date:** [September 19, 2016, 8:44pm UTC](https://forums.sketchup.com/t/cut-and-paste-under-plugin-for-mac-and-pc/30965/3 "2016-09-19T20:44:13Z")

</div>

For the avoidance of doubt…

Never include a space between the method and its parenthesized argument[s].

Always end your ‘send\_action’ string with a colon [:]

When you do a send\_action paste the user still needs to choose the location…

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [September 20, 2016, 8:16pm UTC](https://forums.sketchup.com/t/cut-and-paste-under-plugin-for-mac-and-pc/30965/4 "2016-09-20T20:16:33Z")

</div>

If you could describe more closely what you actually wish to do, there are better alternatives.
