mIRC Home    About    Download    Register    News    Help

Print Thread
#257136 16/03/16 03:27 AM
Joined: May 2010
Posts: 47
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 47
I have a clipboard script, but it seems to have stopped working properly recently, and I am unsure why.

Code:
chancopy { 
  var %l = 1, %s = $line($active, 0)
  clipboard
  while (%l <= %s) { 
    clipboard -an $strip($line($active, %l))
    inc %l 
  }
}


It's randomly skipping lines.

Last edited by Mythos; 16/03/16 03:28 AM.
Mythos #257138 16/03/16 05:50 AM
Joined: Dec 2015
Posts: 147
D
Vogon poet
Offline
Vogon poet
D
Joined: Dec 2015
Posts: 147
When you say it's skipping lines, what do you exactly mean? Empty lines? $strip could cause a situation to occur where you'd end up with an empty line. As an example: line that only has control codes in it.

Other than that, I see no reason why it would "skip" any lines, unless it's a bug in mIRC.

Here's an alternative, that will work quite a bit faster when copying large buffers:
Code:
alias chancopy clipboard | filter -wk $active chancopyx

alias -l chancopyx clipboard -an $strip($1)

Dazuz #257139 16/03/16 07:56 AM
Joined: May 2010
Posts: 47
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 47
I mean it completely leaves out posts. I'll look at the buffer I copied from and the post I made in notepad and it's completely lacking half of what was said.

I'm trying your code.

Edit: This one is doing it, too. I wonder if I have something it's clashing with, or is my clipboard somehow broken?

This is what I copied as a test.

Code:
[2:59am] <Soul> 1
[2:59am] <Soul> 2
[2:59am] <Soul> 3
[2:59am] <Soul> 4
[2:59am] <Soul> 5
[2:59am] <Soul> 6
[2:59am] <Soul> 7
[2:59am] <Soul> 8
[2:59am] <Soul> 9
[2:59am] <Soul> 10
[2:59am] <Soul> 11
[2:59am] <Soul> 12
[2:59am] <Soul> 13


This is what the script puts in my "post"

Code:
[2:59am] <Soul> 1
[2:59am] <Soul> 3
[2:59am] <Soul> 4
[2:59am] <Soul> 5
[2:59am] <Soul> 6
[2:59am] <Soul> 7
[2:59am] <Soul> 8
[2:59am] <Soul> 11
[2:59am] <Soul> 12
[2:59am] <Soul> 13


Edit 2: This is using 7.43. I've also tested it with the last two beta iterations. Same thing is happening. I don't have an older mirc on my PC to test this with.

Edit 3: I'll also state that I unloaded all other aliases and scripts to test this with, and the issue still happens. It's not clashing as far as I know. I'm also using Windows 10. I don't know if that means anything. The script didn't do this before as far as I know.

Edit 4: Sometimes it works properly. Sometimes it doesn't.
I have no loss of text if I do normal highlight copying. Just with this script.

Last edited by Mythos; 16/03/16 09:08 AM.
Mythos #257140 16/03/16 09:50 AM
Joined: May 2010
Posts: 47
M
Mythos Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: May 2010
Posts: 47
I've learned that this is an issue with mirc accessing the clipboard too fast if another program does something with the clipboard.

The problem for me, obviously, is I have no idea what program could be doing that.


Link Copied to Clipboard