Multi-Plugin bug possibly?

Ok so i just downloaded iTunes 4.8 which stopped the old Multi-Plugin working so I downloaded the new Multi-Plugin 6.

I dont use many features of the plugin except for the text file with the song data in it.

In the new version of the plug-in this text file is called CurrentTrack.txt instead of CurrentSong.txt, I didnt think this would be too much of a problem and i quickly changed all references to this file in the mIRC script config. However my irc script still didnt work. I took the opportunity to do a rewrite of the script, clean and simple. It follows...

alias npx {



%iTunes.dir = C:Program FilesiTunesCurrentTrack.txt



%artist = $read(%iTunes.dir , 2)

%song = $read(%iTunes.dir , 3)

%album = $read(%iTunes.dir , 4)

%genre = $read(%iTunes.dir , 6)

%year = $read(%iTunes.dir , 15)

%time = $read(%iTunes.dir , 8)



%details = ( $+ %album %genre %year %time $+ )



/say [Now Playing] %artist - %song %details

}

In theory this should make the following appear after typing /npx into mIRC

<@Matt> [Now Playing] Blah - Waffle (Yadda yadda Talking 2005 3:42)

however instead this happens

<@Matt> [Now Playing] - ( )

I have tried all sorts to get it to work and I have come to the conclution that its the plug-in's fault making some kind of corrupted text file. Because if i make my own text file and enter data in the exact same layout as the one Multi-Plugin creates then it springs to life.

Is there some kind of fix to get the plugin to make valid text outputs? The old versions worked fine but not this new one.

Matt

#284763

MPlugin doesn`t work well with 4.8

wait till it's updated

#284861

MPlugin doesn`t work well with 4.8

wait till it's updated

Fair enough, i'll just wait :(

#284911

can you post the corrupted file that doesn't work? I'll try to see what's the difference between it and a file saved in Notepad.

#286958

It seems to be double the filesize than it shoudl be. I opened it in editplus and see what it looks like...

editplusitunesscript2ee.png

Theres boxes everwhere... My mIRC script picked up the P from the first letter on the first line. But those random boxes (or whatever they are) seem to mess everything else up :(

#287023

The new version seems to speak UNICODE instead of ANSI.

Maybe you can pipe it through a wide to dbcs filter in mIRC?

#287025

Looks normal when opened in notepad however. The script works when you remove those boxes manually from within editplus.

notepaditinesscript7pj.png

If i "select all" from within editplus only the P is pasted :-/

When the boxes are deleted it works perfectly

#287026

The new version seems to speak UNICODE instead of ANSI.

Maybe you can pipe it through a wide to dbcs filter in mIRC?

Im a bit of a pleb when it comes to mirc scripting, maybe you could point me in the right direction to set this up ^_^

#287027

oh, that...

could you send me the script so I could see what I can do?

I really don't want to go back to ANSI. I'm kinda against backward compatibility when it comes to things like this.

#288666

; ##############################################

; # Matt Sims' iTunes Now Playing Script v.0.1 #

; # My first attempt at a proper mIRC script #

; # Works with the iTunes Multi-Plugin #

; # Copyright Matt Sims (c) 2005 #

; # [url]www.mattsims.com[/url] [email]mattsims@evilmerc.com[/email] #

; ##############################################





alias np {



%iTunes.dir = C:Program FilesiTunesCurrentTrack.txt



%artist = $read(%iTunes.dir , 2)

%song = $read(%iTunes.dir , 3)

%album = $read(%iTunes.dir , 4)

%genre = $read(%iTunes.dir , 6)

%year = $read(%iTunes.dir , 15)

%time = $read(%iTunes.dir , 8)



%output = %artist 6-5 %song

%details = 3( $+ %album $+ , %genre $+ , %year $+ , %time $+ )



if (%np.extended == on) {

/say 6[10Now Playing6]7 %artist 6-5 %song %details

}

else {

/say 6[10Now Playing6]7 %artist 6-5 %song

}





; if (%np.extended == on) {

; %extended = %details

; }



; /say 6[10Now Playing6]7 %artist 6-5 %song %extended

}







; BEGIN Right Click menu controls



menu status,channel,query,nicklist,menu,chat {

.-

.iTunes Now playing:/np

.iTunes Controls

.Play/Pause:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,PlayPause,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}

.< Previous:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,PreviousTrack,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}

.> Next:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,NextTrack,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}

.Advanced Controls

..Open iTunes:run itunes



..Close iTunes:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,Quit,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}

..iTunes Control Panel:/dialog -mdieo iPanel iPanel



.Contact Matt Sims:run [url]http://www.mattsims.com/page.php?page=contact[/url]

}



; END Right Click menu controls





; BEGIN Control Panel



dialog iPanel {

title "iTunes Control Panel"

size -1 -1 184 40

option pixels



button "< prev", 1, 0 0 40 20, push

button "play/pause", 2, 40 0 70 20, push

button "stop", 3, 110 0 30 20, push

button "next >", 4, 140 0 44 20, push

button details in output: %np.extended, 5, 0 20 184 20, push

}



on *:DIALOG:iPanel:SCLICK:1:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,PreviousTrack,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}



on *:DIALOG:iPanel:SCLICK:2:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,PlayPause,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}



}



on *:DIALOG:iPanel:SCLICK:3:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,Stop,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}



on *:DIALOG:iPanel:SCLICK:4:{

if (!$com(itunes)) {

/comopen itunes iTunes.Application

}

%com.result = $com(itunes,NextTrack,3)

if (%com.result==0) {

echo -a Error: Make sure iTunes is open.

}

}





on *:DIALOG:iPanel:SCLICK:5:{

if (%np.extended == on) {

%np.extended = off

/did -r iPanel 5

/did -a iPanel 5 details in output: %np.extended

}

else {

%np.extended = on

/did -r iPanel 5

/did -a iPanel 5 details in output: %np.extended

}

}



on *:DIALOG:iPanel:close:*:{

if ($com(itunes)) {

/comclose itunes

}

}



; END Control Panel

Thats my entire script. Its quite complex but the important bits are these lines %artist = $read(%iTunes.dir , 2) as its that which tries to import the data from the text file. IRC just cannot read unicode. I dont know what youve got it like that anyway it only needs to be plain text

#288808

Here is a simplified version if this helps

alias np {



%iTunes.dir = C:Program FilesiTunesCurrentTrack.txt



%artist = $read(%iTunes.dir , 2)

%song = $read(%iTunes.dir , 3)

%album = $read(%iTunes.dir , 4)

%genre = $read(%iTunes.dir , 6)

%year = $read(%iTunes.dir , 15)

%time = $read(%iTunes.dir , 8)



%details = ( $+ %album $+ , %genre $+ , %year $+ , %time $+ )



/say [Now Playing] %artist - %song %details



}

the ,2 refers to the line number that the info is on.

#289007

Done.

See my other thread to download the DLL...

These are the changes for your script:

alias np {

if (%np.extended == on) {
%details = 3(!Album, !Genre, !Year, !Duration)
}
else {
%details =
}

/say $dll(mIRC_iTunes.dll, GetInfo, 6[10Now Playing6]7 !Artist 6-5 !Name %details)
}

#289132