0

I use Adobe products (such as Premiere Pro/Photoshop) a lot and wanted to have Discord Rich Presence implementation. I found a very useful python script for this: https://github.com/smokes/adobe-rpc

If I manually execute it (opens command prompt) it works perfectly fine, it detects my Discord and Premiere Pro/Photoshop and displays it correctly in Discord.

However I wanted to run this script when I launch Premiere Pro/Photoshop so I used a batch file for this:

@echo off

start "Premiere Pro" "C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe"
ping -n 20 localhost

python "E:\Software\Python\Adobe Discord Rich Presence\adobe-rpc-master\rpc.py"

It opens the script as it should but when it actually launches the script, the script can not find Discord or the Adobe software. It just states "Run Adobe/Discord App".

I have tested the script by opening a fresh Command Prompt and dragging the script in: same result as stated above. It can not find Discord or the Adobe software.

This is very strange to me as I can perfectly run it if I open it manually but not if I run it in the Command Prompt?

Furthermore, Python does not give an actual error message, just the "error message" that is built inside the script.

When I launch it manually, it opens in the Command Prompt so I am very confused as to why this happens.

Can anyone explain this/help me? I am very new to the Command Prompt and Python.

Magnum
  • 43
  • 6
  • Why not try to download the exe from releases (https://github.com/smokes/adobe-rpc/releases) and start that from your script? – NotNik. Jun 25 '19 at 14:07
  • The exe file is only for Photoshop for some reason. You got me thinking tho, so I turned the .py file into an exe file using [this video](https://www.youtube.com/watch?v=OZSZHmWSOeM) However, this did not work either... It had the same "Run Adobe/Discord" (cannot find the software) problem. Also I noticed that the title of the command prompt while running the original .py file leads to C:\Windows\py.exe WHICH IS AN EXE FILE. But when I run that one, it doesn't work either. I am very confused right now... – Magnum Jun 26 '19 at 11:29

1 Answers1

0

Warning! This is comment and maybe answer both!

First of all: do you have Python 3.4>= added in PATH? If not add.

Second: Do you followed instructions in README.md? If not follow!

Third: Which Adoble application do you use and is it available in adobe-rpc's repository? If not then wait for next update of adobe-rpc.

Fourth: Try to open script in it's directory and this is how:

  1. Go to script's folder
  2. Hold SHIFT and click RMB, also called Right Button Mouse. In menu Open Command Prompt here or Open Powershell here must be displayed.
  3. If Open Command Prompt here is displayed instead of Open Powershell here, click it.
  4. Now do: python scriptname.py ~ I don't know that script usage and if it requires arguments, just do python scriptname.py arguments.
  5. If Open Powershell here is displayed instead of Open Command Prompt here. Go back, but first copy directory.
  6. Then press WIN+R and in Run input type cmd.
  7. In Command Prompt(CMD) type cd and paste your directory, then hit Enter.
  8. Now do same as in 4. line.

Maybe this would help. Otherwise I don't know.

UltraStudioLTD
  • 300
  • 2
  • 14