mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Can anyone help me please, I have never made any real scripts before I have made aliases but I cannot figure this out:

How can I make a simple script that lets me make a pushable button on the menu bar at the top that opens a new window

This new window I then want to have an area where I can enter channels or people to send a message to every certain amount of minutes or seconds specified by another area in the popup where you enter the number.

After you select the message you want it to send every time (or once) when this time elapses and press OK it would then be setup to do this until you click on the new button at the top of the screen, making the popup come back and then press a "Stop" button on the popup.

If anyone can help me do this or even make the script if you feel you're up to it and have the free time it would be very much appreciated.


Thank you for reading smile


Here is an example of how it would work if it were made:
(just a drawing I haven't worked out how to make it at all :\)

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
For an dialog you need mdx.dll, you can also do this with @window, but to do it with @window you need tbwin.dll .. and they both can be found at click, look in the DLL section..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Try this script:
http://members.lycos.co.uk/onln/files/AutoText.txt

Because it is difficult to extend mIRC's toolbar (as sparta said, this requires a DLL), my script adds itself as a "Commands" menu entry. If you prefer, you can define a hotkey (F1-12) instead.

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Quote:
Try this script:
http://members.lycos.co.uk/onln/files/AutoText.txt

Because it is difficult to extend mIRC's toolbar (as sparta said, this requires a DLL), my script adds itself as a "Commands" menu entry. If you prefer, you can define a hotkey (F1-12) instead.
That is incredibly awesome! Omg, I wasn't expecting someone to make the whole thing laugh Thank you!!!! grin

Ok this may be too much to ask but is it possible there could be a tick box to make the timer start from now? (sending the text as soon as you click start and then waiting until the delay to send it next) - not too important but just thought it would be cool

seriously thanks a lot this is really great, I tested it and it works perfectly

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
blush anyone know how I could make it random between a certain amount of minutes (and randomly in seconds, not exactly as a new minute starts) for the send of text?
A "randomly between: [5] and [10] minutes" kind of thing?
not urgent don't worry if it would be very complicated.. I looked at the script to make the (min) show and while I understand some of it (pixel coords for the menu for instance) it looks extremely complicated shocked

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
find where the time in seconds is used and replace that with $rand(lower_bound,upper_bound)

For example:
.timer 1 180 echo -a this will trigger in 3 minutes
change it to
.timer 1 $rand(120,240) echo -a this will trigger somewhere between 2 and 4 minutes

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Quote:
find where the time in seconds is used and replace that with $rand(lower_bound,upper_bound)

For example:
.timer 1 180 echo -a this will trigger in 3 minutes
change it to
.timer 1 $rand(120,240) echo -a this will trigger somewhere between 2 and 4 minutes
Cool, that doesn't look too hard. How would I go about changing the popup to make it easy to do either a random-between certain-times timer or an exact one like it is currently set to do? I'm not sure if you looked at the script Online posted (as a text file), but it looks almost exactly like the picture I drew up at the top smile

Anyway, thanks, and thanks to anyone else that helps

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Anyone, please? frown

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Ok here's a rough pic of how I want to make it:

standard mode (like the previous version of the script by Online), sends text exactly on the time in minutes specified


random mode, sends text randomly between the two times in minutes entered:


This is how it is at the moment with the (awesome) script Online made:


So I need to use the $rand thing I guess but I'm unsure how to put that into the popup confused

Joined: Nov 2004
Posts: 332
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
im not very experienced with dialogs but i imagine u store the two times in variables and so you would use $rand(%1,%2)
but im not sure how its done it would help if i could see the code you may have to escape it
as it is likely done with a timer
or well there alot of ways it could be done it would be best if u posted the code


The Kodokan will move you, one way or another.
Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Quote:
im not very experienced with dialogs but i imagine u store the two times in variables and so you would use $rand(%1,%2)
but im not sure how its done it would help if i could see the code you may have to escape it
as it is likely done with a timer
or well there alot of ways it could be done it would be best if u posted the code
It's only on the link posted before, but here it is then smile:

; Auto Text Sender script
;
; Load to the mIRC remote and access through the "Commands" menu.

menu Menubar {
Auto Text Sender { autotext }
}

alias autotext dialog -m $+(autotext., $cid) autotext

dialog autotext {
title Auto Text Sender - $network
size -1 -1 110 96
option dbu
text "Text:", 4, 4 4 28 8
edit "", 6, 34 4 72 44, multi
check "Only once?", 7, 67 51 39 10, left
edit "", 5, 34 66 72 10
text "Send to:", 2, 3 67 24 8
text "Delay (min):", 3, 3 52 30 8
edit "", 1, 34 51 18 10
button "Start", 8, 34 80 34 12
button "Stop", 9, 72 80 34 12
}

On *:dialog:autotext.*:init:0:{
if !$timer($+(AUTOTEXT, $cid)) {
did -b $dname 9
}
else {
did -b $dname 1,5,6,7,8

var %delay = $timer($+(AUTOTEXT, $cid)).delay / 60
var %repetition = $timer($+(AUTOTEXT, $cid)).reps
var %cmd = $timer($+(AUTOTEXT, $cid)).com
var %to = $gettok(%cmd, 2, 32)
var %text = $gettok(%cmd, 3-, 32)

did -a $dname 1 %delay
if %repetition { did -c $dname 7 }
did -a $dname 5 %to
did -a $dname 6 %text
}

}

On *:dialog:autotext.*:sclick:*:{
if $did == 8 {
if $status != connected { return }

var %text = $$did(6)
var %delay = $$did(1) * 60
var %to = $$did(5)
var %repetition = $did(7).state

$+(.timerAUTOTEXT, $cid) %repetition %delay msg %to %text

did -b $dname 1,5,6,7,8
did -e $dname 9
}
if $did == 9 {
$+(.timerAUTOTEXT, $cid) off
did -b $dname 9
did -e $dname 1,5,6,7,8
}
}

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Our forum system lacks a very important feature: it can't sort threads by activity, and so we simply do not notice when people reply to old threads. It's not that we ignored you or something wink

Quote:
...and while I understand some of it (pixel coords for the menu for instance) it looks extremely complicated shocked


Many scripters use a visual editor like Dialog Studio to design the dialog. The on DIALOG event handlers are written manually, but it's not a problem if you study the help file and a couple of tutorials.

I updated the script (at http://members.lycos.co.uk/onln/files/AutoText.txt) with the two features you wanted to be added. The script now uses $rand() to calculate random intervals between every message.

If something doesn't work as expected please send a PM to let me know.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sorry Online. Beat you to it.

Edit:
Quote:

Our forum system lacks a very important feature: it can't sort threads by activity, and so we simply do not notice when people reply to old threads. It's not that we ignored you or something


However, it does show recent messages past 24 hours if that's any consellation. grin

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Quote:

AWESOME thank you Online!!!!!!!!

whee! I tested it too
great scripting it's mostly incomphrenesible to me, would've taken a long long time to make it as good smile

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Good idea smile

xolademoness, you're welcome

Joined: Feb 2005
Posts: 40
Ameglian cow
OP Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
Quote:
Our forum system lacks a very important feature: it can't sort threads by activity, and so we simply do not notice when people reply to old threads. It's not that we ignored you or something wink
Yeah I know what you mean. Coincidentally I sent a message to one of the mods Mental asking if he could help and saying that viewing the threads in order of recent posts instead of first posts (or at least an option to be able to do so..) would be a big improvement to the forums and all I got was a message back saying to wait for hours and not message people about old topics.. lol.

I posted the slightly worried "can anyone help" message on the thread before I realised how the topics were organised. >_< After that I guessed (or hoped anyway) it wasn't that being ignored just not noticed
I'd glanced at the topics before but I just didn't understand where my topic had gone, only later registered with me the silly organisation. lol whatever..

Quote:
Many scripters use a visual editor like Dialog Studio to design the dialog. The on DIALOG event handlers are written manually, but it's not a problem if you study the help file and a couple of tutorials.
Looks good I will download that and use it in future if I need anything like this smile

Quote:
I updated the script (at http://members.lycos.co.uk/onln/files/AutoText.txt) with the two features you wanted to be added. The script now uses $rand() to calculate random intervals between every message

If something doesn't work as expected please send a PM to let me know.
Again, thank you very much! It's great. grin


Link Copied to Clipboard