Skip to main content
Damon D Bell
Known Participant
July 27, 2018
Answered

Hide a file from the scripts menu other than using a "Scripts Only" folder?

  • July 27, 2018
  • 2 replies
  • 2385 views

Is there a way to hide a jsx file from the Photoshop scripts menu other than putting it into a sub folder ending in "Scripts Only".

I tried adding ∼ to the beginning of the file name, which I thought was another way. However, that is not working.

This topic has been closed for replies.
Correct answer Kukurykus

I already fixed it using the tilde on the keyboard instead of copying and pasting from the spreadsheet. Just thought it was interesting that there are 2 tilde characters.

From jsx, .charCodeAt() reports code 8764 from what was in my spreadsheet. That is apparently the "tilde operator" character, not the normal tilde.

I have no idea how I got the 8764 character into the spreadsheet in the first place instead of 126.  So, just typing in the file name and all is good


Apparently some scripts / text editors interpret some characters that way. Sometimes that may happen when you change font, size or something else that text is processed. I do not know which editors do that but saw others with same problem.

Or there's default encoding during saving sheets of such editor that translates characters to certain encoding if not specified.

2 replies

Legend
July 27, 2018

At the beginning of the script, insert

/*

<javascriptresource>

<menu>dummy_menu</menu>

</javascriptresource>

*/

Kukurykus
Legend
July 27, 2018

I actually tried the same idea before you but with name item:

<javascriptresource>

<menu></menu>

<name></name>

</javascriptresource>

also without manu item:

<javascriptresource>

<name></name>

</javascriptresource>

It showed first empty position on Scripts list in both cases so I added <enableinfo>false<enableinfo>. I could disable that item this way, but still it was present. Too bad I didn't think to remove name part, but that had no sense to me to try it

Reading documentation I was sure that <menu></menu> tag will result as no using it at all, so set default localization to Scripts Menu. I also noticed in documentation they use /*  */ arround that code, but it works without so what is its goal?

Legend
July 27, 2018

Kukurykus 

I also noticed in documentation they use /**/ arround that code, but it works without so what is its goal?

I think this is done so that there are no problems

Kukurykus
Legend
July 27, 2018

For me it's working I mean adding '~' at beginning of .jsx file in 'Presets / Scripts' folder. If that's done before launching Photoshop then at least on Windows I can't see such file on the list of scripts.

You can try to change extension as well. When you launch then Photoshop then other of your scripts change that extension back to .jsx so file can be used by other script which after performed task rename .jsx to some other undetectable format.

There's even more practical way. You may create all your scripts you don't want they wre seen in that 'File / Menu' with .jsxinc extension. Then some other of your file will simply including indicated .jsxinc file and perform its commands.

Damon D Bell
Known Participant
July 27, 2018

Thanks. It seems there are 2 different tilde characters. I had done a copy and paste from a spreadsheet I had with file names to use and it didn't work.

Anyway, I noticed the tilde character in my post online looked different that the tilde character in your post. I tested by copying and pasting each one in the file name and the one in you post worked and the one in my post didn't. In the file name, they both look identical to the keyboard tilde. ....strange.

Sp apparently, my spreadsheet was save with the wrong tilde character. So the bottom line is to just type it in and it will work.

Kukurykus
Legend
July 27, 2018

Char code for mine is 126. Replace my tilde to yours in code at end to see what char code belongs to yours: '~'.charCodeAt()