Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Run a .jsx file through a .bat file

Engaged ,
Jan 29, 2022 Jan 29, 2022

Hey guys!
How do I run a.jsx file through a.bat file?
Thanks!

TOPICS
Actions and scripting
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 29, 2022 Jan 29, 2022

 

start "" "C:\Program Files\Adobe\Adobe Photoshop 2022\Photoshop.exe" "D:\a.jsx"

 

Translate
Adobe
LEGEND ,
Jan 29, 2022 Jan 29, 2022

 

start "" "C:\Program Files\Adobe\Adobe Photoshop 2022\Photoshop.exe" "D:\a.jsx"

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022

start "" "C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe" "~/Desktop/script.jsx"

Hi @Kukurykus , it's not correct but it didn't work for me

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2022 Jan 29, 2022

My code is correct - did you check if that works when the file is on d (or other drive)?

 

You didn't ask of specific localization. For desktop replace 'User' to name of your User Name: 

 

C:\Users\User\Desktop

 

by the way, the logic of "it's not correct but it didn't work for me" sentence is not correct.

Either say: 'it's not correct but it did work for me" or: 'it's correct but it didn't work for me'.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022
citar

Meu código está correto - você verificou se isso funciona quando o arquivo está em d (ou outra unidade)?

 

Você não pediu localização específica. Para desktop, substitua 'Usuário' pelo nome do seu nome de usuário: 

 

 

 

 

 

 

C : \Usuários\Usuário\Desktop

 

 

 

 

 

 

a propósito, a lógica da frase "não está correto, mas não funcionou para mim" não está correta.

Ou diga:  'não está correto, mas funcionou para mim'  ou:  'está correto, mas não funcionou para mim'.


Por @Kukurykus

primeiro testei o jsx da unidade D:\ conforme seu exemplo, mas não funcionou

Corrigi o caminho C:\Users\myUser\Desktop, salvei como arquivo.bat mas nada acontece quando executo

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2022 Jan 29, 2022

If you saved it as 'arquivo.bat', not 'a.bat' then I'm not surprised. Especially if you have might done same it for 'a.jsx'. Step back to d drive path and try again. Check your Ps path as well.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022

@Kukurykus I'm leaving work for my house now, when I get there I'll use my computer to test again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022

After checking all the ways, I managed to run the script through a.bat but this annoying warning appeared!

Capturar.PNG

To suppress this warning, add "WamRunningScripts 0" to the "PSUserConfig.txt" file in the Photoshop settings folder and restart Photoshop. The problem this time is that in the Photoshop 2022 settings folder there is no file "PSUserConfig.txt", I tried to create the same after I added the line add WamRunningScripts 0 and saved and it still displays the warning.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2022 Jan 29, 2022

There is no 'PSUserConfig.txt' in 'Adobe Photoshop 2022 Settings' unless you create it.

 

The command you added is incorrect. I see there lack of 'r' letter in first word, ie. 'Warn'.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022

Now it all worked out!
I found this tutorial:
https://www.youtube.com/watch?v=QsStQ6jhKoM&ab_channel=3DLUTCreator

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2022 Jan 29, 2022

How that you found differs from that you wrote yourself, plus my hints: 3 mins ago?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022
LATEST

@Kukurykus I believe I typed it wrong, then I went to the video description, copy and then pasted the filename and code line in the directory. Thank you for your dedication and helping us

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2022 Jan 29, 2022

Thanks for your help @Kukurykus  ! thanks to you everything worked out.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2022 Jan 29, 2022
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines