mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2006
Posts: 3
R
razraz Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Jun 2006
Posts: 3
This is my first time trying to write a script (or even use one), so I'm sorry if it sounds stupid, but here it goes.

I'm trying to write a simple script that alerts me whenever the topic of then current channel I'm in changes. I want it to make a sound (got this part done), and then in a custom window make show the channel name, and the topic it was changed to, and have it focus to the channel when I doubleclick it.

Right now I've gotten as far as making a custom window that alerts me whenever the topic changes, but I cant figure out how to even add items in the list of the custom window.

Here is where I'm at right now:
Code:
on 1:TOPIC:*:{ 
  { window -dg[2]k[0]lR @Topic-Alerts [ -1 -1 [ 900 500 ] { /iline 3 1 @Topic_$chan $1 } }
  { flash @Topic-Alerts }
  { beep 1 1 }
}  

I don't know where I'm going wrong, and what to do now... confused

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you are not using the { } brackets right for one thing

try this
Code:
on 1:TOPIC:#:{ 
  window -dg2k0lR @Topic-Alerts -1 -1 500 80 
  aline @Topic-Alerts $chan(#).topic
  flash @Topic-Alerts
  beep 1 1 
}


when the instructions in mIRC hel p show a command with <something> [some other thing] the <> and [] are not used, they indicate usually that <parameters> are options (one of which) is required and the [] indicate the items are optional parameters and are not usually required

Joined: Jun 2006
Posts: 3
R
razraz Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Jun 2006
Posts: 3
Thanks, that just made it a whole lot simpler to understand. I just need one tiny little thing fixed, then I'm sure I can go venture out on my own. How would I make it so that the text is displayed in multiple lines, and all I'd have to do is to scroll vertically to read the rest (instead of the current horizontal way that its at now)? I modified the code a bit, I hope it's not horrible
Code:
on 1:TOPIC:#:{ 
  window -Cdg2k0mR @Topic-Alerts -1 -1 650 250 
  aline @Topic-Alerts $chan
  aline @Topic-Alerts $chan(#).topic
  flash @Topic-Alerts
  beep 1 1 
} 


::edit::
Scratch that, I figured it out. I'm sorry I posted so hastily, I changed the code to the this, it's what I had in mind from the start wink
Code:
on 1:TOPIC:#:{ 
  window -Cdg2k0mR @Topic-Alerts -1 -1 650 250 
  aline @Topic-Alerts &lt; $chan changed $asctime &gt;
  echo @Topic-Alerts $chan(#).topic
  flash @Topic-Alerts
  beep 1 1 
}


What I'd really like to know is how I can make specific channel windows flash (like how it works in the "highlight" option), and how to place an action on the event that I close the /window ... again sorry, and thanks

Last edited by razraz; 29/06/06 02:58 AM.
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
thats fine, you can add other parameters info too
Code:
on 1:TOPIC:#:{ 
  window -Cdg2k0mR @Topic-Alerts 100 100 650 250 
  aline @Topic-Alerts $chan changed by $nick $timestamp
  aline @Topic-Alerts $chan(#).topic
  aline @Topic-Alerts -
  flash @Topic-Alerts
  beep 1 1 
} 

Joined: Jun 2006
Posts: 3
R
razraz Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Jun 2006
Posts: 3
ack, I edited after you replied, thanks alot though, you really helped.


Link Copied to Clipboard