Cockos Incorporated Forums
>
REAPER Forums
>
newbieland
LUA script to copy text to clipboard
User Name
Remember Me?
Password
Register
Search
Today's Posts
Mark Forums Read
Thread Tools
Display Modes
02-03-2018, 06:37 AM
#
1
curtdusoleil
Human being with feelings
Join Date: Jan 2018
Posts: 51
LUA script to copy text to clipboard
I am a total noob to LUA.
I need a script that will just copy a file path as text to the clipboard. That's it. I absolutely cannot figure it out. I keep getting the error:
attempt to call a nil value (global 'set_clipboard')
Here is the file path I am trying to copy to the clipboard:
D:\_Google Drive\_Acting\VO\Room Tone\roomtone.wav
This must be a simple script, right?
curtdusoleil
View Public Profile
Send a private message to curtdusoleil
Find More Posts by curtdusoleil
02-03-2018, 06:40 AM
#
2
cfillion
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,970
Where did you get this set_clipboard from?
If you have SWS 2.9.5+ you can use my function CF_SetClipboard:
Code:
reaper.CF_SetClipboard([[D:\_Google Drive\_Acting\VO\Room Tone\roomtone.wav]])
__________________
💖 Donate (PayPal)
|
Sponsor (GitHub)
|
The Endless Journey (Keyboard Ensemble)
ReaPack
, a package manager for REAPER
| SWS 2.14 is now available in ReaPack
[new!]
Developer tools:
Lua profiler
|
Interactive ReaScript
|
ReaPack Editor
|
ReaImGui
cfillion
View Public Profile
Send a private message to cfillion
Visit cfillion's homepage!
Find More Posts by cfillion
02-03-2018, 12:46 PM
#
3
curtdusoleil
Human being with feelings
Join Date: Jan 2018
Posts: 51
Still erroring
Thanks for the quick reply, but I'm still getting an error message with that code:
invalid escape sequence near '"D:\_'
curtdusoleil
View Public Profile
Send a private message to curtdusoleil
Find More Posts by curtdusoleil
02-03-2018, 04:06 PM
#
4
cfillion
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,970
Quote:
Originally Posted by
curtdusoleil
invalid escape sequence near '"D:\_'
You appear to have added quotes (") to the code. Use [[ ]] like I did or escape the backslashes.
__________________
💖 Donate (PayPal)
|
Sponsor (GitHub)
|
The Endless Journey (Keyboard Ensemble)
ReaPack
, a package manager for REAPER
| SWS 2.14 is now available in ReaPack
[new!]
Developer tools:
Lua profiler
|
Interactive ReaScript
|
ReaPack Editor
|
ReaImGui
cfillion
View Public Profile
Send a private message to cfillion
Visit cfillion's homepage!
Find More Posts by cfillion
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
REAPER Forums
REAPER General Discussion Forum
newbieland
REAPER Q&A, Tips, Tricks and Howto
Recording Technologies and Techniques
REAPER Compatibility
REAPER Color Themes and Icon Sets
MIDI Hardware, Control Surfaces, and OSC
REAPER Non-English Speaking User Forums
Forum de REAPER en français
Foro de REAPER en Español
Fórum do REAPER em português
Forum di REAPER in italiano
Deutschsprachiges REAPER Userforum
Pyccкоязычный фopyм REAPER
REAPER Bug Reports
REAPER Feature Requests
Dstruct's Casa De Nitpicks
REAPER for Live Use
REAPER for Video Editing/Mangling
REAPER for Spatial Audio
ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum
REAPER for macOS
REAPER for Linux
REAPER Pre-Release Discussion
REAPER Music/Collaboration Discussion
NINJAM Discussion
NINJAM User Discussion
NINJAM Developer Discussion
Other Software Discussion
WDL users forum
LICEcap Discussion
OSCII-bot forum
Old Cockos Products Forum
All times are GMT -7. The time now is
12:54 PM
.
-- Cockos
---- REAPER 5
---- Reaper 3
---- Reaper 2
---- Reaper 1
Contact Us
-
Çockos Incorporated
-
Archive
-
Top
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.