Skip to main content
Eduard Buta
Inspiring
July 28, 2022
Question

Is there any way to install/convert MacOS scripts to a Windows environment?

  • July 28, 2022
  • 8 replies
  • 1597 views

Hello, community.

 

I've run across this incredible list of scripts by Seiji Miyazawa that I'm dying to test out. However, they appear to only work in a macOS environment.

 

I was wondering if there's any way to quickly convert or use such scripts on Windows? I'm not particularly experienced with coding, so apologies if this sounds like a rather dumb question.

This topic has been closed for replies.

8 replies

Legend
July 28, 2022

I have met the authors and he is a well-known figure in Japan. Some of you may have seen the distinctive GUI of Knights of Sidonia designed by the duo to which he belongs.

 

There are already many users, so there is no need to worry about malicious intent. At least with this author’s script.

Dave Creamer of IDEAS
Community Expert
Community Expert
July 28, 2022

Try this site for other scripts:

https://redokun.com/blog/indesign-scripts

Note: Redokun is a known/safe site, but the page links to other sites. 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Kurt Gold
Community Expert
Community Expert
July 28, 2022

Guys?

 

If some of the comments here are meant as some kind of general ostracism when it comes to encrypted code, it's just foul play as long as you may not know if there are possibly some valid reasons for the creator to work that way.

 

I don't know them, but it's unfair to prejudge without first asking him or her about the reasons and then post pure assumptions in this forum.

 

Disposition_Dev
Community Expert
Community Expert
July 28, 2022

I don't think anyone is prejudging the author. But rather prejudging the concept of running code on your machine when you don't know the developer and can't inspect the code for yourself. Regardless of the developer, it's not good practice to just blindly execute code.

 

The author may very well have reasons for obfuscating the code or converting to binary. They might even have really really good reasons. But none of those potential hypothetical reasons are good enough for me to want to just blindly execute the code on my machine. 

 

IMO, if you're going to release scripts for free use by the public, there's no good reason to obfuscate or hide the logic. From looking around at the scripts on that website, none of them are likely to use any kind of proprietary logic or algorithms (like true shape nesting or similar). Seems pretty much all of them do basic DOM manipulation in specific contexts.. aligning things, resizing things, manipulating layers... As an example, if I wanted to put out some code for the community to use for free that deletes empty layers... it doesn't make sense for me to obfuscate or hide any of that code. it's going to be a loop which does some coditional checking of each layer and then perhaps deleting the layer. There are no secrets to give away by showing how this code works because all of it exists already in the documentation and the forums. If i don't want other people to use or read or edit the code i write for this task, it doesn't make sense for me to release it publicly. At that point it would make the most sense for me to try to sell it directly to a client while keeping the code obscured to prevent them from distributing or deconstructing my logic.

 

The only way I could see it being necessary to hide the code is if you were after some kind of "freemium" licensing model where individual users can use it for free, but commercial organizations need to pay a subscription.. Obviously if the script was available unobfuscated for individuals, it would be trivial for an organization to scoop it up and use it restriction free. But i also think that if this was the model we were talking about, then the reputation of the developer and reviews of the script in question would factor into whether or not to blindly execute that code as a free user.

Kurt Gold
Community Expert
Community Expert
July 28, 2022

Very good points, Dilliam.

 

I hope you know that I am not voting for blindly executing unknown code. Of course, I do not.

 

I was just a bit surprised about the somehow fearful resentments in this case. Yes, there may be malicious code, but at the same time it may be just harmless and beneficial, no matter if the scripts are just simple stuff or something more advanced.

 

In this forum I often share .zip files and potentially I could contaminate them with some vicious contents at any time. Consequently, there definitely should be a warning message about that possibility as it could lull some people into blindly doing things that they may regret later, right?

 

Disposition_Dev
Community Expert
Community Expert
July 28, 2022

As other's stated, .jsx is cross platform and doesn't care which OS you're on. The only potential road block is how file paths are written and whether the script attempt to utilize any preferences folders that exist on Mac but not on windows.

 

Without trying the scripts, we can't know whether they work... But again, as others have stated, if we can't READ the code... We can't recommend running the code. Extendscript can read/write/execute files on the filesystem. So it's possible to embed some malicious code as a string in an extendscript file, then have some logic that writes that code as a file to the filesystem and then more logic to execute that newly created file. (it would likely be tough for this to get around standard security settings in either platform, but it's a possibility worth considering). In fact, this is a workflow I use daily at work, though obviously not with malicious code. I use this process as a workaround for the lack of web socket when I need access to up to date info from the web.

 

Unless you paid someone directly for a script and have a contract with them for that script, don't execute .jsxbin files that you didn't create for yourself. The only reason to convert jsx code to binary is to hide what's inside it. For most, that might just mean hiding their IP... But for others, that might mean hiding something much worse.

 

And that concludes this free PSA regarding internet/software security practices.

Eduard Buta
Inspiring
July 28, 2022

Great explanation for those of us that want to stay safe but do not have the extensive knowledge of knowing when something might be off. I appreciate it, and as I told Mark above, I'll try to steer clear of these. It's unfortunate, but I'm sure I'll manage.

Disposition_Dev
Community Expert
Community Expert
July 28, 2022

If you see a script in there and decide based on it's name that it is something you'd like to use, just let us know. We can almost certainly knock something out that does the same thing, but with transparent code. I browsed through the website and nothing that I saw includes any difficult logic or algorithms. Basically they all just look like quick short scripts for manipulating a couple of selected objects or removing empty layers, etc. trivial things, really. 

m1b
Community Expert
Community Expert
July 28, 2022

Hi @Eduard Buta, yes it's a nicely organised site for his scripts. I downloaded a couple to look at but they are jsxbin encoded. I cannot tell if they will work on Windows because I use Mac myself, but ordinarily I would say that they will most likely work fine on Windows, as ExtendScript is 99% cross platform (and mostly the rest can be handled with a bit of extra work).

 

So you could try them. However, if we can't inspect the code, don't know anything about the website, or the author, then I suppose we should be careful. It is possible for Extendscript code to be malicious. Probably not likely, given the sensible and thoughtful presentation of the website, but a remote possibility at least.

- Mark

Eduard Buta
Inspiring
July 28, 2022

Better safe than sorry. Especially since it's kind of peculiar how something shared for free, presumably for the benefit of the design community, is so secretive. Thank you for your thoughts!

femkeblanco
Legend
July 28, 2022

I tried the first free script ("Add artboards") and it works on Windows.  This script (and I presume the rest) is obfuscated javascript though, which is an immediate turn-off for me.  I will not use or recommend on general principle. 

Disposition_Dev
Community Expert
Community Expert
July 28, 2022

i hear ya Femke. I have no qualms obfuscating my own code.. but i'm not about to install and run someone else's free obfuscated code.

Monika Gause
Community Expert
Community Expert
July 28, 2022

I can't even find the download link on that page.

CarlosCanto
Community Expert
Community Expert
July 28, 2022

the first script's download link is in the green button below the Download heading. It reads "Go to Dropbox...." but I get you, the whole page is really hard to read.

Doug A Roberts
Community Expert
Community Expert
July 28, 2022

They are .jsx files, so should work fine on either platform. Have you tried to use any?

Eduard Buta
Inspiring
July 28, 2022

I truly had no idea prior to today that .jsx works on both platforms. So that's good to know. However, I'm not going to try running any more of these because of what people have pointed out below.

 

I tried running a couple when I first found out about them, but only through a Script Manager plugin. It didn't seem to work, and the code wasn't intelligible to me when I opened it up - hence this post. I legit thought it was a platform issue at play, but might've been my script manager acting up.