# Retrieving plex player status via apllescript

**URL:** <https://forums.plex.tv/t/retrieving-plex-player-status-via-apllescript/9644>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [June 14, 2011, 11:33pm UTC](https://forums.plex.tv/t/retrieving-plex-player-status-via-apllescript/9644 "2011-06-14T23:33:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LukeSpad](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@LukeSpad](https://forums.plex.tv/u/LukeSpad)\
**Post date:** [June 14, 2011, 11:33pm UTC](https://forums.plex.tv/t/retrieving-plex-player-status-via-apllescript/9644/1 "2011-06-14T23:33:59Z")

</div>

Dear all,  
  
  
  
I’m using a bang and olufsen BEO4 remote to control my media, which is great since it controls everything else in the living room, but a bit of a drag because it only has a few buttons. I have written a simple C programme to retrieve the IR input from a USB receiver, and action applescript commands to IOSpirit remote buddy (or sometimes directly to the application I want to control). The setup works really well, and I have set up context specific key mapping for various apps (e.g. iTunes, plex, DVD player etc.) It is also necessary to have context specific control within applications for example, using the 4 directional buttons on the remote to navigate menus, but changing the function of navigate left and navigate right to fast forward and rewind when media is playing. This is more intuitive than it sounds, and I have this working for eyeTV and the Apple DVD player. However, I’m a bit stuck in plex since there doesn’t seem to be an applescript dictionary for it.   
  
  
  
\*\*Is there a way to ask plex via applescript whether or not media is currently playing? \*\*I’d like to do something along the lines of  
  
  
  
IF left button is pressed  
  
IF plex is currently playing media  
  
rewind  
  
ELSE  
  
navigate left  
  
END IF  
  
END IF  
  
  
  
I’d like to stick to applescript if possible, as the code for this would sit within a larger script. Apologies for a dumb question, but I’m more used to Fortran and C programming than applescript (from a science programming background).  
  
  
  
Thanks for your help  
  
  
  
Luke

---

<div class="post-metadata">

**Author:** ![waw74](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@waw74](https://forums.plex.tv/u/waw74)\
**Post date:** [June 23, 2011, 1:15am UTC](https://forums.plex.tv/t/retrieving-plex-player-status-via-apllescript/9644/2 "2011-06-23T01:15:54Z")

</div>

the default remote buddy profile has navigation: left, right, up, and down for the directions on the apple remote keypad, and they will either navigate if in a menu, or skip forward or back or adjust the volume if you’re playing a video,   
  
  
  
  
  
otherwise, you can get what you want from this.

```auto

http://localhost:3000/xbmcCmds/xbmcHttp?command=getcurrentlyplaying

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 9:10pm UTC](https://forums.plex.tv/t/retrieving-plex-player-status-via-apllescript/9644/3 "2019-12-20T21:10:08Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
