Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for macOS

Reply
 
Thread Tools Display Modes
Old 03-01-2017, 08:30 AM   #1
dreamtuned
Human being with feelings
 
Join Date: Jan 2017
Posts: 88
Default Can't download scripts as lua

When I download a script with lua extension in my scripts folder, and then I try to load it through actions, the extension is shown as txt and not clickable.
I am forced to download the scripts through VMWare Fusion Windows 10 and then copy them into the scripts folder on my Mac. But even then, something is wrong with the scripts because I get the error lua:7 unexpected error <.
dreamtuned is offline   Reply With Quote
Old 03-01-2017, 08:46 AM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

It's not technically a Reaper problem, it's something to do with Mac and/or your browser.

Did you try the Cmd+S suggestion?
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-01-2017, 09:23 AM   #3
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by dreamtuned View Post
When I download a script with lua extension in my scripts folder, and then I try to load it through actions, the extension is shown as txt and not clickable.
Which browser are you using?
Can you post a link to the script you're trying to download and use?

Assuming the downloaded file should be a lua file: have you tried to simply rename the .txt extension to .lua ?

Last edited by solger; 03-01-2017 at 09:34 AM.
solger is offline   Reply With Quote
Old 03-01-2017, 09:41 AM   #4
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

This: https://github.com/ReaTeam/ReaScript...ial%20Menu.lua

Unless I'm just missing a BBCode option, left-clicking always opens the file as plaintext in the browser. On Windows (in Chrome at least), right-clicking and choosing Save As preserves the .lua extension, but on his Mac it's being converted to .txt and apparently screwing with the file.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-01-2017, 09:47 AM   #5
dreamtuned
Human being with feelings
 
Join Date: Jan 2017
Posts: 88
Default

Here it is the double process I do.
First saving it and then opening it in Reaper's actions, that is, loading it.

By downloading it through windows Lokasenna's script work, but not MPL's like Align Takes.
Attached Images
File Type: png Screen Shot 2017-03-01 at 5.45.52 PM.png (18.4 KB, 400 views)
File Type: png Screen Shot 2017-03-01 at 5.46.14 PM.png (28.6 KB, 361 views)

Last edited by dreamtuned; 03-01-2017 at 09:52 AM.
dreamtuned is offline   Reply With Quote
Old 03-01-2017, 09:53 AM   #6
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

What does the little ^ button in the first image do?
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-01-2017, 09:57 AM   #7
dreamtuned
Human being with feelings
 
Join Date: Jan 2017
Posts: 88
Default

Quote:
Originally Posted by Lokasenna View Post
What does the little ^ button in the first image do?
It opens a browser as to where you want to save the file. It is the same with both options, no way to change the extension. And it shows lua, the text extension is only shown when already saved and trying to load it in reaper/actions.
dreamtuned is offline   Reply With Quote
Old 03-01-2017, 09:59 AM   #8
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Just to rule something out, if you open the .txt file does it look like this:
Code:
--[[
Description: Radial Menu 
Version: 2.3.1
Author: Lokasenna
Donation: https://paypal.me/Lokasenna
Changelog:
- Fixed a crash with color frames on first running the Setup script
- Rearranged the Global tab to give the font settings more room
Links:
	Forum Thread http://forum.cockos.com/showthread.php?p=1788321
	Lokasenna's Website http://forum.cockos.com/member.php?u=10417
About: 
...
or like this:

Code:
!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">



  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-1c30b0313abc295ceb250bcca245a1b53076428b724ec8e560bf6ad4b2065981.css" integrity="sha256-HDCwMTq8KVzrJQvMokWhtTB2QotyTsjlYL9q1LIGWYE=" media="all" rel="stylesheet" />
  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-f44040156d00c12f721839269463d6a68ebd351da98383825bb7f65cb600da8e.css" integrity="sha256-9EBAFW0AwS9yGDkmlGPWpo69NR2pg4OCW7f2XLYA2o4=" media="all" rel="stylesheet" />
  
  ...
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-01-2017, 10:02 AM   #9
dreamtuned
Human being with feelings
 
Join Date: Jan 2017
Posts: 88
Default

The first.
Attached Images
File Type: png Screen Shot 2017-03-01 at 6.02.22 PM.png (60.3 KB, 297 views)
dreamtuned is offline   Reply With Quote
Old 03-01-2017, 10:15 AM   #10
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by dreamtuned View Post
It opens a browser as to where you want to save the file. It is the same with both options, no way to change the extension. And it shows lua, the text extension is only shown when already saved and trying to load it in reaper/actions.
Which web browser are you using (so I can try to recreate this on my computer)?

In Finder file extensions are hidden by default. So in your case scriptname.lua is actually the file name (and the extension .txt is hidden).
So to rename the file either do this:

1) Finder -> Preferences -> Advanced
2) Select 'Show all filename extensions'
3) Rename the file from scriptname.lua.txt to scriptname.lua

Or rename the file via File -> Get Info -> Name & Extensions to scriptname.lua

Last edited by solger; 03-01-2017 at 10:53 AM. Reason: typo
solger is offline   Reply With Quote
Old 03-01-2017, 10:16 AM   #11
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Good, it's at least being downloaded correctly.

Alright, Google is telling me that this is a known issue with Safari - going back at least ten years, it looks like. I think what's happening is:

- Safari sees ".lua"
- Safari doesn't see any applications that can open a .lua file
- Safari looks at the file's contents, and it looks like text
- Safari guesses that it might be a text file and adds ".txt"

It might be related to the Safari setting "Open 'safe' files after downloading".

Try renaming the downloaded file to .lua, then using Get Info -> Open With to associate .lua files with your text editor. Then when Safari goes to look it should see that .lua files are okay and leave them alone.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-01-2017, 10:20 AM   #12
dreamtuned
Human being with feelings
 
Join Date: Jan 2017
Posts: 88
Default

Ok I was able to save the file correctly with Mozilla. When I save the file with mozilla it gives me option to choose whether I like to save the file as text or all files. By defailt is txt file but I choose all files and now it downloads correctly with lua extension and I am able to see it in Actions/Load browser.

Thank you both for your patience and help. Keep up the great work!
dreamtuned is offline   Reply With Quote
Old 03-01-2017, 10:28 AM   #13
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by dreamtuned View Post
Ok I was able to save the file correctly with Mozilla. When I save the file with mozilla it gives me option to choose whether I like to save the file as text or all files. By defailt is txt file but I choose all files and now it downloads correctly with lua extension and I am able to see it in Actions/Load browser.
OK, great
solger is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 Jump


All times are GMT -7. The time now is 10:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.