INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Getting the current selected file  (Read 2040 times)

Amadan

  • Junior Woodchuck
  • **
  • Posts: 51
  • Mine. Mine. Mine.
Getting the current selected file
« on: November 05, 2006, 03:46:51 pm »

Hi,

this question was asked before, but not really answered. So i'd like to raise it again: is it possible to detect the currently selected file?  I found nothing in the automation interface, but there are message like "MCC_GET_SELECTED_FILES"...

I want to develop an application that can display the track information of the currently selected file (similar like the track info tooltip).

Any chance to get that information?  ?

Thx in advance,
Stefan
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Getting the current selected file
« Reply #1 on: November 06, 2006, 05:13:17 am »

you can get the current playing file, I don't think you can get selected file.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Amadan

  • Junior Woodchuck
  • **
  • Posts: 51
  • Mine. Mine. Mine.
Re: Getting the current selected file
« Reply #2 on: November 06, 2006, 04:54:35 pm »

Thanks, KingSparta, i was afraid you'd say that  :P

Ok, so i did a little low level programming and i think i solved the problem. It's only meant as a proof of concept and was done in a rush. However, it seems to run quite stable.

I'm curious if it also works for other users. I implented and tested it with Delphi under Windows XP and with Media Center 12. 

Could some of you be so kind to download the small demo program from the attached link. It needs Media Center 12 installed. If it works correct, you should be able to list the informations for the currently selected MC file (independent if it is the file currently being played or not)

Thx for any feedback,
Stefan


http://www.yourfilehost.com/media.php?cat=other&file=GetSelectedMCFile.zip
Logged

Amadan

  • Junior Woodchuck
  • **
  • Posts: 51
  • Mine. Mine. Mine.
Re: Getting the current selected file
« Reply #3 on: November 06, 2006, 05:08:48 pm »

I forgot to mention: the demo works only if the file list contains a column with the filename. (just in case you customized your view and removed the filename column).

Do you usually have this column in your views? Or do i have to think about an extended solution?

Once again: Thx,
Stefan
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Getting the current selected file
« Reply #4 on: November 06, 2006, 05:40:58 pm »

Do This

Select 3 Files, Then Unselect The Center File

The Program ReTurns The Unselected File
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Amadan

  • Junior Woodchuck
  • **
  • Posts: 51
  • Mine. Mine. Mine.
Re: Getting the current selected file
« Reply #5 on: November 06, 2006, 05:51:12 pm »

the behaviour is correct in terms of how it is implemented (i detect the selected file by getting the focused line. And by unclicking the center File this line gets focused, but it's of course not selected anymore).

Would be easy to change. But the most important info for me is that it works in general.

Thx for testing
Logged
Pages: [1]   Go Up