mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Jul 2006
Posts: 4,186
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,186
Your current code:
Code
spoton {
  var %status $dll(data\dll\spoton\spoton.dll,status,)
  if (%status == 1) echo -a Spotify is paused.
  elseif (%status == 2) echo -a Spotify is playing Advertisement.
  elseif (%status == 3) say Spotify » $dll(data\dll\spoton\spoton.dll,song,)
  else echo -a Spotify is not running.
}
is using /say in status 3 (the one for other users to see that interest us) to send a message to the current channel (/spoton will fail if what's considered the active window is not a channel/query/etc window.
To send a message to all channel, there is the /amsg command, so first, you could improve the current /spoton alias by offering a feature to send to all channels (though sending a message to all your channel at the same time can be considered and seen bad/harmful/annoying).
Now, you would need to ask Fernet, but 'multi server' and only sending to the active window don't go together, there's only one active window at a time, for a given server. What would multi server support means here if you don't even have an option to send to all channels?


Anyway, /scon -at1 <command> is a command that can be used to execute a command on all connected server. If you use "/scon -at1 spoton", it will fail.

But you can do:

Code
spoton {
  var %status $dll(data\dll\spoton\spoton.dll,status,)
  if (%status == 1) echo -a Spotify is paused.
  elseif (%status == 2) echo -a Spotify is playing Advertisement.
  elseif (%status == 3) say Spotify » $dll(data\dll\spoton\spoton.dll,song,)
  elseif (%status == 4) amsg Spotify » $dll(data\dll\spoton\spoton.dll,song,)
  elseif (%status == 5) scon -at1 amsg Spotify » $unsafe($dll(data\dll\spoton\spoton.dll,song,))
  else echo -a Spotify is not running.
}
Now 4 = all channels and 5 = all channels on all connected server. $unsafe is required to avoid evaluation problem like was mentioned by maroon and $dll() returning some line feed characters (but this times it's because of /scon that we need it)

If this is not what was meant by OP with 'multi server' support, then he would have to explain what he wants smile


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2021
Posts: 33
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
%status is a way to detect if Spotify is in a state: 0 - Not running, 1 - Paused, 2 - Advertisement, 3 - Playing. %status does not yet contains 4 or 5.
Everything else looks good. It's just that people would 100% get annoyed/angry if this would write out everywhere. But that's what I think.

Instead of %status 4 and 5. Someone that really want to do a amsg on 1 network or more networks could use a parameter like /spoton [x], if it contains 0 or 1. Send a message to 1 network, if 1 send to all networks. And if not a parameter just send to current window. I know how to detect parameters in aliases. It's just a bit easier to do like this.

I don't really know if I'm going to support mass messages like this in the Lite Script that I have created.

Anyway thanks for the information Wims.

Joined: Jan 2021
Posts: 33
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
I'm sorry to everyone that is waiting for more features for Spoton. I'm still learning me C++ from courses and my knowledge is getting better and better.

From my current knowledges I have fixed several issues in Spoton. So there is a new update, version 1.1.5.

From my testing I have noticed that the DLL-File never free the memory. So it will add more and more data to the memory. So please update to 1.1.5.

Last edited by turbosmurfen; 18/06/22 07:33 PM.
Joined: Jan 2021
Posts: 33
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
I want to thanks everyone that have helped me and also have tested Spoton from beta stage and upon latest version of Spoton. I have put my time on other things than learning me C++. And I want to say that I no longer is going to update Spoton. If someone else want to update Spoton or use it's code, feel free to do that.

Joined: Jan 2021
Posts: 33
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
I use Spotify now and needed to test out if Spoton 1.1.7 was working.
I noticed that the volume control in Spoton changed master volume instead of Spotify volume. I also needed Artist and Title for a thing.

So why not update the same for everyone else. Version 1.1.8 is now out.

Joined: Apr 2024
Posts: 3
C
Self-satisfied door
Offline
Self-satisfied door
C
Joined: Apr 2024
Posts: 3
Forgive my ignorance but I am unable to find spoton.dll. Have looked in the zip and on github. If you could point me in the right direction I would be very grateful.
Thanks in advance!

Joined: Jan 2012
Posts: 323
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 323
You can find it at the following links:



🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Apr 2024
Posts: 3
C
Self-satisfied door
Offline
Self-satisfied door
C
Joined: Apr 2024
Posts: 3
Awesome!Thank you so much

Joined: Jan 2021
Posts: 33
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
Originally Posted by Epic
You can find it at the following links:


Thanks for the help, I saw this now.

Joined: Jan 2021
Posts: 33
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
Due to lack of time I don't update the code and script anymore. Please use caution while using my project.
I want to thanks everyone in this thread and people on GitHub that have followed me while working on this project.
I hope in the future that someone else create a better project.

Page 2 of 2 1 2

Link Copied to Clipboard