Probleme de on 1*:TEXT:

Signaler
Messages postés
16
Date d'inscription
dimanche 20 octobre 2002
Statut
Membre
Dernière intervention
18 mai 2003
-
Messages postés
1
Date d'inscription
mardi 11 mai 2004
Statut
Membre
Dernière intervention
11 mai 2004
-
Pour commencer, voici l'etendue de mon probleme.
on 1*:TEXT:!get %getmp3:*: {
/dcc send $nick ( " $+ $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) $+ $chr(34) $+ $chr(32) $+ )
}

Ca ne marche que si la personne fait !get %getmp3
J'ai pourtant mis ca : /Set %getmp3 $me

J'ai essayé des centaines de methodes, ca a pas marché.

Je vous met tout mon code, s'il vous plait, aidez moi !!!

;/load -rs ampstatus/ampstatus.mrc

on *:LOAD: {
echo -a Vous avez chargé le Script Winamp Status
echo -a Utilisable avec toutes les version de mIRC depuis la 5.91. (compatible Fate Script)
echo -a Utilisez les Menus ou la commande /wa pour afficher votre Status Winamp
}

menu query,nicklist,menubar,channel {
Statistiques Winamp: wa
}

alias wa {
if ($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, INSTALLED) == $false) { say $ampnoinstal | halt }
if ($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, RUNNING) == $false) { say $ampquit | halt }
if ($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, STATE) == Playing) { /ampplaying | halt }
if ($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, STATE) == Paused) { say $amppaused | halt }
if ($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, STATE) == Stopped) { say $ampstopped | halt }
}

;on ^*:TEXT:!info $+ $me:*: {
; /mp3gen $gettok( %switches, 1, 32 ) $active $gettok( %switches, 2-, 32 )
;; /notice $nick TITRE : $mp3( %mp3.filename ).title
; if ( $mp3( %mp3.filename ).artist ) {
; /notice $nick AUTEUR : $mp3( %mp3.filename ).artist
; }
; if ( $mp3( %mp3.filename ).album ) {
; /notice $nick ALBUM : $mp3( %mp3.filename ).album
; }
; if ( $mp3( %mp3.filename ).track ) {
; /notice $nick TRACK : $mp3( %mp3.filename ).track
; }
; /notice $nick TAILLE : %mp3.size3
; /notice $nick LONGUEUR : $replace($duration($dll($shortfn($mircdirampstatus\swamp.dll), ;WinAmpGet, TRACKTIME)),hrs,h,hr,h,mins,m,secs,s,sec,s) ;$prcbar($int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / ;$calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100)))
; /notice $nick BITRATE : %mp3.bitrate3 %mp3.rate
; if ( $mp3( %mp3.filename ).track ) {
; /notice $nick VERSION : $mp3( %mp3.filename ).version
; }
;}

alias ampplaying {
/mp3gen $gettok( %switches, 1, 32 ) $active $gettok( %switches, 2-, 32 )
%mp3.type = $gettok( $nopath(%mp3.filename), $numtok( $nopath(%mp3.filename), 46 ), 46 )
if ( %mp3.type != avi ) {
/Set %getmp3 $me
/say 1| %mp3.color1 $+ J'utilise : $+ %mp3.color2 Winamp %mp3.version 1| %mp3.color1 $+ J'écoute " $+ %mp3.color2 $+ %mp3.title $+ %mp3.color1 $+ " %mp3.album %mp3.time %mp3.bitrate %mp3.playlist %mp3.mode %mp3.size 1| %mp3.color1 $+ " $+ %mp3.color2 $+ !get %getmp3 $+ %mp3.color1 $+ " pour recevoir le fichier 1|
}
else {
/say  $+ %mp3.color1 $+ (Winamp %mp3.version $+ )  $+ %mp3.color1Play Video ( $+ %mp3.color2 $+ %mp3.title $+  $+ %mp3.color1 $+ ) %mp3.time
}
}
alias mp3gen {

/unset %mp3.*
if ( $left( $1, 1 ) == - ) {
%mp3.switches = $1
%mp3.channel = $$2
}
else {
%mp3.channel = $$1
}

if ( $version < 5.91 ) {
echo %mp3.channel 4WARNING! You must upgrade to mIRC 5.91 for this script to work.
halt
}

; if ( !$dll( ampstatus\swamp.dll, WinAmpGet, RUNNING ) ) {
; if ( w isin %mp3.switches ) {
; if ( c isin %mp3.switches ) {
; if ( ($3 isnum 0-15) && ($4 isnum 0-15) && (c !isin $gettok( $chan( %mp3.channel ).mode, 1, 32 )) ) {
; %mp3.color1 = $3
; if ( $len( %mp3.color1 ) == 1 ) {
; %mp3.color1 = $+( 0, $3 )
; }
; %mp3.color2 = $4
; if ( $len( %mp3.color2 ) == 1 ) {
; %mp3.color2 = $+( 0, $4 )
; }
; %mp3.color1 = $+( , %mp3.color1 )
; %mp3.color2 = $+( , %mp3.color2 )
; }
; else {
; %mp3.color1 = 04
; %mp3.color2 = 14
; }
; }
;
; msg %mp3.channel $+( %mp3.color1, [mp3, %mp3.color1, $chr( 124 ), %mp3.color2, Winamp is not loaded, %mp3.color1, ] )
; }
; halt
; }

%mp3.filename = $dll( ampstatus\swamp.dll, WinAmpGet, TRACKFILENAME )
%mp3.filetypes = mp2;mp3;wav;mid;
if ( $gettok( %mp3.filename, $numtok( %mp3.filename, 46 ), 46 ) == cda ) {
%mp3.cd = 1
dll ampstatus\swamp.dll WinAmpCmd SAVEPLAYLIST
%mp3.winampdir = $+( $dll( ampstatus\swamp.dll, WinAmpGet, DIRECTORY ), WinAmp.m3u )
%mp3.temp = $read( %mp3.winampdir, sn, %mp3.filename )
%mp3.temp = $read( %mp3.winampdir, n, $calc( $readn - 1 ) )
%mp3.title = $gettok( %mp3.temp, 2, 44 )
}
elseif ( http://*:* iswm %mp3.filename ) {
%mp3.shoutcast = 1
%mp3.title = %mp3.filename
}
elseif ( f isin %mp3.switches ) {
if ( a isin %mp3.switches ) {
%mp3.title = $gettok( %mp3.filename, $+( $calc( $numtok( %mp3.filename, 92 ) - 1 ), - ), 92 )
}
else {
%mp3.title = $replace( $nopath( %mp3.filename ), _, $chr( 32 ) )
}
%mp3.temp = $+( $gettok( %mp3.title, $numtok( %mp3.title, 46 ), 46 ), ; )
if ( (%mp3.temp isin %mp3.filetypes) && (e !isin %mp3.switches) ) {
%mp3.title = $gettok( %mp3.title, $+( 1-, $calc( $numtok( %mp3.title, 46 ) - 1 ) ), 46 )
}
}
else {
%mp3.id3 = $mp3( %mp3.filename ).artist
if ( !%mp3.id3 ) {
%mp3.id3 = Artiste ou groupe inconnu
}
%mp3.temp = $mp3( %mp3.filename ).title
if ( !%mp3.temp ) {
%mp3.id3 = $+( %mp3.id3, $chr( 32 ), Unknown Track )
}
else {
%mp3.id3 = $+( %mp3.id3, $chr( 32), -, $chr( 32 ), %mp3.temp )
}
if ( %mp3.id3 == Unknown Artist - Unknown Track ) {
%mp3.title = $replace( $nopath( %mp3.filename ), _, $chr( 32 ) )
%mp3.temp = $+( $gettok( %mp3.title, $numtok( %mp3.title, 46 ), 46 ), ; )
if ( (%mp3.temp isin %mp3.filetypes) && (e !isin %mp3.switches) ) {
%mp3.title = $gettok( %mp3.title, $+( 1-, $calc( $numtok( %mp3.title, 46 ) - 1 ) ), 46 )
}
}
else {
%mp3.title = %mp3.id3
}
}

if ( (c isin %mp3.switches) && ($3 isnum 0-15) && ($4 isnum 0-15) && (c !isin $gettok( $chan( %mp3.channel ).mode, 1, 32 )) ) {
%mp3.color1 = $3
if ( $len( %mp3.color1 ) == 1 ) {
%mp3.color1 = $+( 0, $3 )
}
%mp3.color2 = $4
if ( $len( %mp3.color2 ) == 1 ) {
%mp3.color2 = $+( 0, $4 )
}
%mp3.color1 = $+( , %mp3.color1 )
%mp3.color2 = $+( , %mp3.color2 )
}
elseif ( (c isin %mp3.switches) && ($3 !isnum 0-15) && ($4 !isnum 0-15) ) {
unset %mp3.color1
unset %mp3.color2
}
elseif ( c !isin $gettok( $chan( %mp3.channel ).mode, 1, 32 ) ) {
%mp3.color1 = 10
%mp3.color2 = 09
}

if ( (u isin %mp3.switches) && (t !isin %mp3.switches) && !%mp3.shoutcast ) {
%mp3.temp = $mp3duration( $dll( ampstatus\swamp.dll, WinAmpGet, TRACKTIME ) )
%mp3.time = $+ %mp3.color1, $chr( 124 ), %mp3.color2, %mp3.temp )
}
if ( %mp3.shoutcast ) {
%mp3.time = connected: $gettok( $calc( $dll( ampstatus\swamp.dll, WinAmpGet, PLAYEDTIME ) / 1000 ), 1, 46 )
}
else {
%mp3.time3 = $+( $int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / $calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100)) $+ $chr(37) of $replace($duration($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME)),hrs,h,hr,h,mins,m,secs,s,sec,s) $prcbar($int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / $calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100))) )
}
if ( t isin %mp3.switches ) {
%mp3.time = $+(  $+ 1| %mp3.color1 $+ Temps écoulé : $+ %mp3.color2 %mp3.time3 )
}
%mp3.time2 = $+(  $+ 1| %mp3.color1 $+ Temps écoulé : $+ %mp3.color2 %mp3.time3 )

%mp3.bitrate3 = $dll( ampstatus\swamp.dll, WinAmpGet, BITRATE ) kbps
if ( $mp3( %mp3.filename ).vbr ) {
%mp3.bitrate3 = $+( %mp3.bitrate, , $chr( 40 ), VBR, $chr( 41 )  )
}
%mp3.rate = $dll( ampstatus\swamp.dll, WinAmpGet, SAMPLERATE )
if ( %mp3.rate = 44 ) {
%mp3.rate = 44100 Hz
}
if ( %mp3.rate = 22 ) {
%mp3.rate = 22150 Hz
}
if ( b isin %mp3.switches || r isin %mp3.switches ) {
%mp3.bitrate = $+(  $+ 1| %mp3.color1 $+ Bitrate : $+ %mp3.color2 %mp3.bitrate3 %mp3.rate )
}
%mp3.bitrate2 = $+(  $+ 1| %mp3.color1 $+ Bitrate : $+ %mp3.color2 %mp3.bitrate3 %mp3.rate )

if ( s isin %mp3.switches ) {
%mp3.state = $+( , $chr( 40 ), , $dll( ampstatus\swamp.dll, WinAmpGet, STATE ), , $chr( 41 ),  )
}

if ( p isin %mp3.switches ) {
%mp3.playlist = $dll( ampstatus\swamp.dll, WinAmpGet, TRACKNUMBER )
%mp3.playlist = $+(  $+ %mp3.color1 $+ Playlist ( $+ %mp3.color2 %mp3.playlist / $dll( ampstatus\swamp.dll, WinAmpGet, PLAYLISTLENGTH ),  $+ %mp3.color1 $+ ) )
}

%mp3.mode3 = $lower( $mp3( %mp3.filename ).mode )
if ( m isin %mp3.switches ) {
%mp3.mode = $+(  $+ %mp3.color1 $+ Temps écoulé %mp3.color2 %mp3.mode3 )
}
%mp3.mode2 = $+(  $+ %mp3.color1 $+ Temps écoulé %mp3.color2 %mp3.mode3 )

%mp3.size3 = $round( $calc( $file( %mp3.filename ).size / 1024 / 1024 ), 2 ) MB
if ( (z isin %mp3.switches) && (!%mp3.shoutcast) && (!%mp3.cd) ) {
%mp3.size = $+(  $+ 1| %mp3.color1 $+ Taille : $+ %mp3.color2 %mp3.size3 )
}
%mp3.size2 = $+(  $+ 1| %mp3.color1 $+ Taille : $+ %mp3.color2 %mp3.size3 )

%mp3.version = $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, VERSION)
}

; return 10(Winamp $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, VERSION) $+ )  $+ %mp3.color1 $+ Play (9 $+ $replace($nopath($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),_,$chr(32)) $+  $+ %mp3.color1 $+ ) Time (9 $int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / $calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100)) $+ $chr(37) of $replace($duration($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME)),hrs,h,hr,h,mins,m,secs,s,sec,s) $prcbar($int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / $calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100))) $+ 10) Bitrate (9 $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, BITRATE) kbps  $+ %mp3.color1 $+ ) (!Mp3Adi pour télécharger :)) }

alias amppaused {
%mp3.type = $gettok( $nopath(%mp3.filename), $numtok( $nopath(%mp3.filename), 46 ), 46 )
if ( %mp3.type != avi ) {
return 10(Winamp $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, VERSION) $+ )  $+ %mp3.color1 $+ Pause ( $+ %mp3.color2 $+ $replace($remove($nopath($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) $+  $+ %mp3.color1 $+ ) Time ( $+ %mp3.color2 $int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / $calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100)) $+ $chr(37) of $replace($duration($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME)),hrs,h,hr,h,mins,m,secs,s,sec,s) $prcbar($int($calc(($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, PLAYEDTIME) / $calc($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKTIME) * 1000)) * 100))) $+  $+ %mp3.color1 $+ )
}
else {
/mp3gen $gettok( %switches, 1, 32 ) $active $gettok( %switches, 2-, 32 )
/say 10(Winamp %mp3.version $+ )  $+ %mp3.color1 $+ Play Video ( $+ %mp3.color2 $+ %mp3.title $+ 10) %mp3.time
}
}
alias ampstopped { return  $+ %mp3.color1 $+ (Winamp $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, VERSION) $+ )  $+ %mp3.color1 $+ Stopped playing }
alias ampquit { return  $+ %mp3.color1 $+ (Winamp $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, VERSION) $+ )  $+ %mp3.color1 $+ Je ne fais rien ;) }
alias ampnoinstal { return winamp(is not installed on this machine) }

alias mp3setup {
dialog -m mp3setup mp3setup
}

dialog mp3setup {
title "MP3Script Setup Menu"
size -1 -1 92 118

option dbu

button "Okay", 1, 55 93 35 10, ok
button "Cancel", 2, 55 105 35 10, cancel

text "Info Display Options", 101, 2 2 90 7
check "Bitrate" 3, 2 10 90 7
check "File Extension (only with filename)" 4, 2 18 90 7
check "Use Filename" 5, 2 26 90 7
check "Stereo Mode" 6, 2 34 90 7
check "Playlist Position" 7, 2 42 90 7
check "Sample Rate" 8, 2 50 90 7
check "Playing/Stopped State" 9, 2 58 90 7
check "Elapsed/Total Time" 10, 2 66 90 7
check "File Size (in MB)" 11, 2 74 50 7
check "Use Custom Colors" 12, 2 82 55 7
check "Show Album" 15, 2 90 50 7
check "Show total time" 16, 2 98 50 7
combo 13, 2 106 23 50, drop
combo 14, 26 106 23 50, drop
}

on *:DIALOG:mp3setup:*:*: {
if ( $devent == init ) {
didtok mp3setup 13 59 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;none
didtok mp3setup 14 59 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;none
if ( b isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 3
if ( e isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 4
if ( f isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 5
if ( m isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 6
if ( p isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 7
if ( r isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 8
if ( s isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 9
if ( t isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 10
if ( z isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 11
if ( a isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 15
if ( u isin $gettok( %switches, 1, 32 ) ) did -c mp3setup 16
if ( c isin $gettok( %switches, 1, 32 ) ) {
did -c mp3setup 12
}
if ( ($gettok( %switches, 2, 32 ) isnum 0-15) && ($gettok( %switches, 3, 32 ) isnum 0-15) ) {
did -c mp3setup 13 $calc( $gettok( %switches, 2, 32 ) + 1 )
did -c mp3setup 14 $calc( $gettok( %switches, 3, 32 ) + 1 )
}
else {
did -c mp3setup 13 17
did -c mp3setup 14 17
}
}
if ( ($did 1) && ($devent sclick) ) {
var %mp3s.temp
if ( $did( mp3setup, 3 ).state ) %mp3s.temp = $+( %mp3s.temp, b )
if ( $did( mp3setup, 4 ).state ) %mp3s.temp = $+( %mp3s.temp, e )
if ( $did( mp3setup, 5 ).state ) %mp3s.temp = $+( %mp3s.temp, f )
if ( $did( mp3setup, 6 ).state ) %mp3s.temp = $+( %mp3s.temp, m )
if ( $did( mp3setup, 7 ).state ) %mp3s.temp = $+( %mp3s.temp, p )
if ( $did( mp3setup, 8 ).state ) %mp3s.temp = $+( %mp3s.temp, r )
if ( $did( mp3setup, 9 ).state ) %mp3s.temp = $+( %mp3s.temp, s )
if ( $did( mp3setup, 10 ).state ) %mp3s.temp = $+( %mp3s.temp, t )
if ( $did( mp3setup, 11 ).state ) %mp3s.temp = $+( %mp3s.temp, z )
if ( $did( mp3setup, 15 ).state ) %mp3s.temp = $+( %mp3s.temp, a )
if ( $did( mp3setup, 16 ).state ) %mp3s.temp = $+( %mp3s.temp, u )
if ( $did( mp3setup, 12 ).state ) {
%mp3s.temp = $+( %mp3s.temp, c )
if ( ($did( mp3setup, 13 ).text != none) && ($did( mp3setup, 14 ).text != none) ) {
%mp3s.temp = %mp3s.temp $did( mp3setup, 13 ).text $did( mp3setup, 14 ).text
}
}
set %switches $+( -, %mp3s.temp )
dialog -x mp3setup
} if ( ($did 16) && ($devent sclick) ) {
did -u $dname 10
}
}

alias prcbar {
set %procent $1
if %procent <= 10 { set %output 12[14||||||||||12] }
if %procent >= 10 { set %output 12[4|14|||||||||12] }
if %procent >= 20 { set %output 12[4||14||||||||12] }
if %procent >= 30 { set %output 12[4|||14|||||||12] }
if %procent >= 40 { set %output 12[4||||14||||||12] }
if %procent >= 50 { set %output 12[4|||||14|||||12] }
if %procent >= 60 { set %output 12[4||||||14||||12] }
if %procent >= 70 { set %output 12[4|||||||14|||12] }
if %procent >= 80 { set %output 12[4||||||||14||12] }
if %procent >= 90 { set %output 12[4|||||||||14|12] }
if %procent >= 95 { set %output 12[4||||||||||12] }
return %output
unset %procent
unset %output
}

on 1*:TEXT:!get *%getmp3*:*: {
/dcc send $nick ( " $+ $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) $+ $chr(34) $+ $chr(32) $+ )
}

3 réponses

Messages postés
708
Date d'inscription
lundi 15 juillet 2002
Statut
Membre
Dernière intervention
17 mars 2005

moi j'aurais coder ça comme ça
on *:text:!get*:*: {
if ( $2 = %getmp3 ) {
ton bloc de commande
}
}
ou alors c un truc dans le genre en tout cas je code tjs ems evenement texte de cette açon et je n'ai jamais eu de probleme ente et dit moi si ça passe
plusssssss
Messages postés
16
Date d'inscription
dimanche 20 octobre 2002
Statut
Membre
Dernière intervention
18 mai 2003

CA MAAAAAAAAARRRRRCHE !!! Je vais mettre la source immediattement !!! Je te remercie infiniement et je te citerai dans la source promis !!!

on *:text:!get*:*: {if ( $2 = %getmp3 ) {
/dcc send $nick ( " $+ $dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) $+ $chr(34) $+ $chr(32) $+ )
}
Messages postés
1
Date d'inscription
mardi 11 mai 2004
Statut
Membre
Dernière intervention
11 mai 2004

je coprme rien au %-6 source
!