mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
hey all,

i'm trying to write a script where everytime a user says something in the main channel, the script will automatically copy what that person said and open a new window and paste it there.

kinda like:

[9:00a] <JohnDoe> New Announcement
[9:00a] <JohnDoe> Name
[9:00a] <JohnDoe> URL

and it'll automatically open a new window (named JohnDoe for example) and it'll basically copy all that JohnDoe said in the main channel.

here's my non-working script so far:

Code:
on *:TEXT:*:#sample_channel:{
  if ($nick == JohnDoe) &amp;&amp; (New isin $1-) &amp;&amp; (Announcement isin $1-) {
    splay alarm.wav    
    window -b @JohnDoe
    echo @JohnDoe 7[ $+ $time(hh:nn:ss) $+ 7] 4 $+ $1- 
  }
  else {
    if ($nick == JohnDoe) &amp;&amp; (Name.. isin $1-) {
      window -b @JohnDoe
      echo @JohnDoe 7[ $+ $time(hh:nn:ss) $+ 7] 1 $+ $1- 
    }
    else {
      if ($nick == JohnDoe) &amp;&amp; (URL.. isin $1-) {
        window -b @JohnDoe
        echo @JohnDoe 7[ $+ $time(hh:nn:ss) $+ 7] 13 $+ $1- 
        echo @JohnDoe 7[ $+ $time(hh:nn:ss) $+ 7] 8 $+ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


i can get the first line to show up, that is, the time and the message "New Announcement." however, i can't get the name and the URL to show up in that new window.

any help?


thanks!

Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I hope this is what you are talking about.
Code:
on *:TEXT:*:#mychan: {
  if ($nick == JohnDoe) {
    if (Attention isin $1-) &amp;&amp; (Everyone isin $1-) {
      .splay alarm.wav
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (Name.. isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL.. isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}

-untested


-Kurdish_Assass1n
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
thanks Kurdish_Assass1n but it still won't echo the "Name" and the "URL" part.

i am stuck on this one...


frown

Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
Code:
    if (Name.. isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL.. isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}

For Name and URL, it will only echo if they say something like
"Name..Kurd" or "URL.. yahoo"
or something like that, what do u want them to say for it to echo?


-Kurdish_Assass1n
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
Quote:
Code:
    if (Name.. isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL.. isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}

For Name and URL, it will only echo if they say something like
"Name..Kurd" or "URL.. yahoo"
or something like that, what do u want them to say for it to echo?


that one didn't work either.

here's what i'm trying to do:

on channel #mychan for example, i want a new window to open everytime something like this gets announced in the main channel:

[9:00p] <JohnDoe> Attention Everyone!
[9:00p] <JohnDoe> Name: New_Post_Title_Goes_Here
[9:00p] <JohnDoe> URL: http://www.somerandomurl.com

i want the script to open a new window and paste EXACTLY those 3 lines - the time, the "Attention Everyone" part, the "Name" and "URL" part.

unfortunately, with the script we're working on, it only shows this on the new window:

[9:00p] <JohnDoe> Attention Everyone!

and the "Name" and "URL" part is missing.


appreciate the help!

Last edited by r0uJe; 18/06/06 01:45 AM.
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
well, I took all of the messages from your first script, but, there's the problem is that "URL.." has to be in the text, it's not, only "URL" is..here's the script to keep :P
Code:
on *:TEXT:*:#mychan: {
  if ($nick == JohnDoe) {
    if (Attention isin $1-) &amp;&amp; (Everyone isin $1-) {
      .splay alarm.wav
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (Name.. isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL.. isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}

-still untested


-Kurdish_Assass1n
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
Quote:
well, I took all of the messages from your first script, but, there's the problem is that "URL.." has to be in the text, it's not, only "URL" is..here's the script to keep :P
Code:
on *:TEXT:*:#mychan: {
  if ($nick == JohnDoe) {
    if (Attention isin $1-) &amp;&amp; (Everyone isin $1-) {
      .splay alarm.wav
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (Name.. isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL.. isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}

-still untested


YAY!

that one WORKED!!!

ok, so those periods/dots after the "name" and "url" part was the problem. quick question -

i tried to do some experimenting... edited the script so it now looks like:

Code:
    if (Name isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}


now, i tried to announce:

Attention Everyone!
Name: This is a test.
URL: http://www.pleasework.com

in the main channel but this time, the name and url part didn't show up in the new window again. since this time, there are no periods/dots after the name and url part, how can i make it show on the new window?

many many MANY thanks for all the help!

Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
Quote:

ok, so those periods/dots after the "name" and "url" part was the problem. quick question -

yes, that was the problem, but, the new window, what do you mean by that, if someone announces twice, you want it to open a new window, or announce it in the same window?


-Kurdish_Assass1n
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
Quote:
yes, that was the problem, but, the new window, what do you mean by that, if someone announces twice, you want it to open a new window, or announce it in the same window?


what i mean is - the script works if someone announces:

Attention Everyone!
Name..: This is a test.
URL....: http://www.pleasework.com

however, i did some experimenting and REMOVED the ".." after the "name" and "url" part in the script. then, i tried to announce:

Attention Everyone!
Name: This is a test.
URL: http://www.pleasework.com

and it stopped working again.

question is - how can i make the script work again now that it says "name:" instead of "name.." and "url:" instead of "url.."?

thanks! smile

Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
well, for the script, it's this:
Code:
if (Name isin $1-) 

it doesn't matter if you do Name$#%#*$@: This is a test or Name..: this is a test, as long as "Name" is in the text, it should send to the window.
make sure that you copied the script exactly as shown above. (the last script given).

Last edited by Kurdish_Assass1n; 18/06/06 02:19 AM.

-Kurdish_Assass1n
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
ok, i tried to announce:

Attention Everyone!
Name: This is a test.
URL: http://www.pleasework.com

using this script -

Code:
on *:TEXT:*:#mychan: {
  if ($nick == JohnDoe) {
    if (Attention isin $1-) &amp;&amp; (Everyone isin $1-) {
      ;splay alarm.wav
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (Name isin $1-) {
      window -b @JohnDoe
      echo 7 -t @JohnDoe $nick $+ &gt;&gt; $1-
    }
    if (URL isin $1-) {
      window -b @JohnDoe 
      echo 7 -t @JohnDoe 13 $nick $+ &gt;&gt; $1-
      echo 7 -t @JohnDoe 8 $nick $+ &gt;&gt; $str(-=,10)
    }
  }
}


and this time, it didn't work!

any idea why?


EDIT: maybe it's because i'm using NoNameScript and it's conflicting with the new script?

Last edited by r0uJe; 18/06/06 02:33 AM.
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
umm, you do know that on text can never be triggered by yourself, so, is it you saying all of this "Attention Everyone" stuff, or, JohnDoe, even if you are JohnDoe, it won't work.


-Kurdish_Assass1n
Joined: May 2006
Posts: 20
R
r0uJe Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2006
Posts: 20
Quote:
umm, you do know that on text can never be triggered by yourself, so, is it you saying all of this "Attention Everyone" stuff, or, JohnDoe, even if you are JohnDoe, it won't work.


yeah - i have 2 IRC clients open. one nicknamed JaneDoe and the other JohnDoe on #mychan.

anyway, the first script works. i just have to make sure i use "Name.." and "URL.."

thanks for all the help!


smile


Link Copied to Clipboard