lluxury 2008-5-7 19:43
经典脚本求解
'*************************************************************************
,IO~\\@;v0^
' delete_playing_file.vbs
*X/@3IQ1E4d@
0r%@a r)SxC
' version: 0.2.4Uve#?i)wD?
' update: 2006.6.19
6N2IJh2w~,y
Au
1~WKfg2uJQ$a lW
' -- Scripted by lifesinger
&Vvg
m{ Y\I)G@+gF
'
-MV%r|^?"yb}J
' Usage:H/J'[
Jf#sUE
' 1. place this script in foobar2000\scripts
U$m7T8b m??
' 2. configure Run sevices (foo_run.dll), see cfg_run.pngo.?G7t*E
' 3. assign a hotkey to this script, such as Ctrl + Del
*a){N`;quJF9p8c%`
' 4. play music now, and use Ctrl + Del to delete ugly songs ^i^HdK!\
Ox
}([S
X)kb"k-\
' Home: [url]http://lifesinger.3322.org/[/url]
#g7w;G/W}1kb
'*************************************************************************kzYp1n-{l8d)f
Option Explicit
d0H*GUK V q/h^
Const beQuiet = False ' If you are annoyed with any confirmation, please change False to True0u9V3f+HK
W$X!n[P6T
'Get commandline arguments, if none, show tips and quit
*C__H'jK
Dim objArgs, filepath, songname5DS:|3T:T$e
Mx({
Set objArgs = WScript.Arguments
uQ)T,w2cR1A
5KaqKN:`/c
If objArgs.Count <> 2 Then
J_{.wj*G
P"?p
msgbox "delete_playing_file.vbs: delete song on playing. " & _
7q/C;b
^}.`
vbNewLine & vbNewLine & _|!z&\Y,AC$x\
" -- by lifesinger, 2006 " & _:uS*z*p~(K`)[M7Re*U
vbNewLine & vbNewLine & _
K!e,@5FM8u'Y
"Usage: delete_playing_file.vbs <file_path> <song_name>" & _
e;s9Ca$F0}@
y0x
vbNewLine, 64, "About"
8`~.X |;C YD2X
Wscript.Quit8`@Mk0@
Else'_ N`
cW
filepath = objArgs(0)
'PP a9e+wP
songname = objArgs(1)
P3a,m$JO{O%e
_
End If
:Fce'A"aTFX:Yn
xk-Yr(\-_:XZ7{-qu
'**** DON'T EDIT BELOW **** J*w._K@
'-------------------------== CODE BEGIN ==----------------------------
OO`'c5F%J
Dim file_ext
)hX
YR*oc$IzX yk
file_ext = LCase(Right(filepath, 3))c4zI8K4uE
`u,r
E3uh
If Not beQuiet Then
v`lo;eVr
Dim r : r = vbNo
7W(d7zl:i0B.i
;Z1k
x,I&i)?
If file_ext = "cue" ThenF~%h:Z\2CN]4c
r = MsgBox("This will remove:" & vbNewLine & vbNewLine & songname & vbNewLine & vbNewLine & "from now-playing playlist." & vbNewLine & vbNewLine & "Continue ?", vbYesNo + vbQuestion, "Warning")
0Cy(O`*Ts!v2Z
Else[j6t0~$x
r = MsgBox("This will delete 1 file:" & vbNewLine & vbNewLine & filepath & vbNewLine & vbNewLine & "Continue ?", vbYesNo + vbQuestion, "Warning")
r6l1TA:_0qe7o
c
End If8tZVV.Gl8@Yy
;r+Bq*ada2i Q
If r = vbNo Thenng%n N,](~y2as
WScript.Quit