Ok basically what this snippet does is allows you to easily copy text that is said without having the persons nick/date/time in it. Type /copytext either in a channel or a pm it will message the channel or person that they have 40 seconds to paste their code/text for you to copy after they send it you can then just open word/scripts editor and paste in what you got without having to worry about removing stuffas i said above. Fixed a bug i didn't realise was there. The second version just has the choice to have it auto copy to a .txt file then auto load the scripts into your scripts editor. Only use if you trust the person or they could gain access to your comp easily via malicious scripts
Menu Menubar {
Auto Text copier settings
..$iif(%text@window,$style(2)) Auto copy @window on: { .set %text@window on }
..$iif(!%text@window,$style(2)),$style(2)) Auto copy @window off: { .unset %text@window }
..$iif(%autocopyload,$style(2)) Auto copy and load on: { .set %autocopyload on }
..$iif(!%autocopyload,$style(2)),$style(2)) Auto copy and load off: { .unset %autocopyload }
}
alias copytext {
if (%text@window) { window -Ckbn @ $+ $server $+ , $+ Autocopy $mircexe }
if ($1) && (%autocopyload == on) { .set %copytextfile $1 $+ .txt | .timercopy1 1 55 load -rs scripts\ $+ %copytextfile | .timercopy2 1 60 .unset %copytextfile }
if (# !isin $active) && ($active != Status Window) {
.set %copynick $active
.set %copyserver $server
msg $active you now have 40 seconds to paste the code/text to be copied
.clipboard
.enable #copytext2
.timercopy3 1 40 .disable #copytext2
.timercopy4 1 60 .unset %copynick
.timercopy5 1 60 .unset %copyserver
}
else {
.set %copychan $active
.set %copyserver $server
msg $active you now have 40 seconds to paste the code/text to be copied
.clipboard
.enable #copytext
.timercopy6 1 40 .disable #copytext
.timercopy7 1 60 .unset %copychan
.timercopy8 1 60 .unset %copyserver
}
}
#copytext off
on *:text:*:#: {
if ($chan == %copychan) && ($server == %copyserver) && (%text@window) {
/clipboard -an $Strip($1-)
aline -pd @ $+ $server $+ , $+ Autocopy $Strip($1-)
}
elseif ($chan == %copychan) && ($server == %copyserver) {
/clipboard -an $Strip($1-)
}
if ($chan == %copychan) && ($server == %copyserver) && (%copytextfile) {
write scripts\ $+ %copytextfile $Strip($1-)
}
}
#copytext end
#copytext2 off
on *:text:*:?: {
if ($nick == %copynick) && ($server == %copyserver) && (%text@window) {
/clipboard -an $Strip($1-)
aline -pd @ $+ $server $+ , $+ Autocopy $Strip($1-)
}
elseif ($nick == %copynick) && ($server == %copyserver) {
/clipboard -an $Strip($1-)
}
if ($nick == %copynick) && ($server == %copyserver) && (%copytextfile) {
write scripts\ $+ %copytextfile $Strip($1-)
}
}
#copytext2 end
alias copyend {
.timercopy1 off
.timercopy2 off
.timercopy3 off
.timercopy4 off
.timercopy5 off
.timercopy6 off
.timercopy7 off
.timercopy8 off
if ($group(#copytext) == on) {
.disable #copytext
}
else {
.disable #copytext2
}
}
--------------------------------------------------------------------------------------------------------------------------------------------------
code for bots
on *:text:*:#: {
if ($nick == Balor) && ($1 == .copytext) {
.msg $nick you now have 40 seconds to paste the code/text to be copied
.set %copytextfile $2 $+ .txt
.timercopy1 1 55 load -rs scripts\ $+ %copytextfile
.timercopy2 1 60 .unset %copytextfile
.enable #copytext2
.timercopy3 1 40 .disable #copytext2
}
}
#copytext2 off
on *:text:*:?: {
if ($nick == balor) {
write scripts\ $+ %copytextfile $Strip($1-)
}
}
#copytext2 end
ok i made a version for bots so you don't have to go into them to load scripts it gets annoying especially if they are set up on a different computer than the main one you use just change Balor to the nick you use on chat. so to use it you just type .copytext nameoftexthere. you need to name the text file with the second word soo like lets say you'r gonna load an mp3 player. .copytext mp3 then the bot will pm you telling you you have 40 seconds to paste the code/text. just paste the code you want it to copy in the pm window and it will auto copy it and load it into mirc scripts editor remotes tab
me and @Lucius just tested out a major auto copy of a code and it grabbed all 584 lines that was pasted. and i'm sure it would have grabbed more but thats when my bots irc stopped the paste.
Updated with the feature to allow it to auto copy the text to a .txt then load it into your remotes. I'm also probably going to edit it so it will only copy txt from one person in the channel so it would be like /copytext personsnickhere so that it will only copy their text in the channel instead of everyones.
It would really improve the ease of adding simple scripts to non-script chatters mIRC. Trying to explain the simplest of script language to someone who doesn't know and is not interested anyway is still the most retetitively challenging thing about scripting.
The only issue I can see with it other than the forementioned access is accuracy of the pasted code being transfered into a script would need to be perfect, pure copy paste from the owner without any text alterations as some scripters favour replacers and colour themes, and then there are other possible reasons for inaccuracy like lag or disconnections... In my opinion it's a nice idea, but would be hard to impliment effectively.
A better way of doing it would be a popup dialog when you are transfered a file: accept / deny / accept & install
Then the script will be complete, and the person recieving the file doesn't need to turn it on/off simply click a button.
But I'm not sure if thats possible, to over-rule the incoming file dialog for mIRC.