mIRC Homepage

HELP a simple message after a specified time scrpt

Posted By: xolademoness

HELP a simple message after a specified time scrpt - 17/02/05 11:34 PM

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 :\)
Posted By: sparta

Re: HELP a simple message after a specified time scrpt - 18/02/05 12:51 AM

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..
Posted By: Online

Re: HELP a simple message after a specified time scrpt - 18/02/05 01:00 AM

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.
Posted By: xolademoness

Re: HELP a simple message after a specified time scrpt - 21/02/05 01:32 AM

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
Posted By: xolademoness

Re: HELP a simple message after a specified time scrpt - 21/02/05 02:15 AM

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
Posted By: Kelder

Re: HELP a simple message after a specified time scrpt - 21/02/05 07:23 PM

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
Posted By: xolademoness

Re: HELP a simple message after a specified time scrpt - 22/02/05 11:41 AM

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
Posted By: xolademoness

Re: HELP a simple message after a specified time s - 23/02/05 05:31 PM

Anyone, please? frown
Posted By: xolademoness

Re: HELP a simple message after a specified time s - 23/02/05 09:29 PM

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
Posted By: ricky_knuckles

Re: HELP a simple message after a specified time s - 23/02/05 09:36 PM

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
Posted By: xolademoness

Re: HELP a simple message after a specified time s - 23/02/05 09:49 PM

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
}
}
Posted By: SladeKraven

Re: HELP a simple message after a specified time s - 23/02/05 09:55 PM

Online has done it for you.
http://members.lycos.co.uk/onln/files/AutoText.txt
Posted By: Online

Re: HELP a simple message after a specified time s - 23/02/05 10:00 PM

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.
Posted By: SladeKraven

Re: HELP a simple message after a specified time s - 23/02/05 10:01 PM

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
Posted By: xolademoness

Re: HELP a simple message after a specified time s - 23/02/05 10:08 PM

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
Posted By: Online

Re: HELP a simple message after a specified time s - 23/02/05 10:15 PM

Good idea smile

xolademoness, you're welcome
Posted By: xolademoness

Re: HELP a simple message after a specified time s - 23/02/05 10:15 PM

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
© 2020 mIRC Discussion Forums