AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Media Player Classic - Remove file & Move file

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Andreas129



Joined: 25 Jan 2008
Posts: 24
Location: Sweden

PostPosted: Thu Feb 21, 2008 1:55 pm    Post subject: Media Player Classic - Remove file & Move file Reply with quote

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
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Thu Feb 21, 2008 7:00 pm    Post subject: Reply with quote

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. )

Smile
Back to top
View user's profile Send private message
automaticman



Joined: 27 Oct 2006
Posts: 372

PostPosted: Thu Feb 21, 2008 10:55 pm    Post subject: Reply with quote

There are players who have this function built in. At least the deleting part, like KMPlayer here.
Back to top
View user's profile Send private message
Andreas129



Joined: 25 Jan 2008
Posts: 24
Location: Sweden

PostPosted: Fri Feb 22, 2008 5:02 am    Post subject: Reply with quote

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. )

Smile


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
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Fri Feb 22, 2008 7:57 am    Post subject: Reply with quote

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


Smile
Back to top
View user's profile Send private message
soggos



Joined: 27 Mar 2008
Posts: 37
Location: France

PostPosted: Sat Aug 09, 2008 8:50 pm    Post subject: and for grabbing the position time ? Reply with quote

very good !)

and di you know for grabbing the position time of the play file?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group