| View previous topic :: View next topic |
| Author |
Message |
Andreas129
Joined: 25 Jan 2008 Posts: 24 Location: Sweden
|
Posted: Thu Feb 21, 2008 1:55 pm Post subject: Media Player Classic - Remove file & Move file |
|
|
Problem Solved. Go to: http://www.autohotkey.com/forum/viewtopic.php?p=180442#180442
Thanks for the help SKAN! =)
--
Hello,
I'm trying to make two hotkeys for Media Player Classic and need some help:
1. I found this script for Winamp, how do I get the filename of the movie I'm playing in MPC?
| Code: | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete the file playing in MPC
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#x::
SetWorkingDir, C:\Moviez\
FileDelete, %ClipVariable%
IfNotExist, %ClipVariable%
MsgBox, File not found: %ClipVariable% |
2. I found this script for Winamp to, can I use it for MPC to move the file?
| Code: | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copy the file playing in MPC to a directory
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#c::
;winamp5 hotkey ^+0 (place mp3 filename in clipb)
send, ^+0
sleep 100
; copy mp3 to favorites dir
FileCopy, %clipboard%, c:\Moviez\Old
return |
Last edited by Andreas129 on Fri Feb 22, 2008 3:23 pm; edited 1 time in total |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Thu Feb 21, 2008 7:00 pm Post subject: |
|
|
I think there is no way to retrieve the full path of the file playing from Media Player Classic.
At the most, you can retrieve the command line.
This would be fruitful only if the filename was passed as a parameter ( from a link / explorer etc. )
 |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 372
|
Posted: Thu Feb 21, 2008 10:55 pm Post subject: |
|
|
| There are players who have this function built in. At least the deleting part, like KMPlayer here. |
|
| Back to top |
|
 |
Andreas129
Joined: 25 Jan 2008 Posts: 24 Location: Sweden
|
Posted: Fri Feb 22, 2008 5:02 am Post subject: |
|
|
| SKAN wrote: | I think there is no way to retrieve the full path of the file playing from Media Player Classic.
At the most, you can retrieve the command line.
This would be fruitful only if the filename was passed as a parameter ( from a link / explorer etc. )
 |
Ok, I always use "C:\Moviez\*.videoformat" for my videofiles, no folders, so I think I only need the filename. MPC can send the filename to MSN in "now playing", so maybe I can pick it up that way somehow? The script: I think I need the filename be copied to clipboard first somehow, then close MPC, then delete the file/or move. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Fri Feb 22, 2008 7:57 am Post subject: |
|
|
| Andreas129 wrote: | | Ok, I always use "C:\Moviez\*.videoformat" for my videofiles, no folders, so I think I only need the filename. |
Why not retrieve it from the Titlebar then ?
| Code: | WinGetTitle, Title, ahk_class MediaPlayerClassicW
StringTrimRight, Title, Title, % StrLen( " - Media Player Classic" )
MsgBox, % Title |
 |
|
| Back to top |
|
 |
soggos
Joined: 27 Mar 2008 Posts: 37 Location: France
|
Posted: Sat Aug 09, 2008 8:50 pm Post subject: and for grabbing the position time ? |
|
|
very good !)
and di you know for grabbing the position time of the play file? |
|
| Back to top |
|
 |
|