mIRC Home    About    Download    Register    News    Help

Print Thread
#226728 13/10/10 11:54 AM
Joined: Sep 2010
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2010
Posts: 6
using /window to create a listbox.

When copying a line of text to the clipboard, mIRC is appending a $crlf to the text, even though I do not have the n flag added to /clipboard.

command is simply: /clipboard %variable

%variable is set by stripping codes for colors/bold/etc. there is no $crlf in %variable (that I can possibly see).

So is there simply a way to remove it from the copied text?

I have tried $remove using $chr(10), $chr(13), $chr($crlf), etc.

Nothing works. I get the text that I want copied to the clipboard fine, its just the annoying $crlf appended to it that I need removed.

renegad3 #226729 13/10/10 12:00 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
What makes you think a $crlf is appended?
Can you post a script replicating the behaviour?

5618 #226730 13/10/10 12:07 PM
Joined: Sep 2010
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2010
Posts: 6
Because when I paste the contents of the clipboard, there is an extra blank line added to it. If I hit delete twice it returns to just the text that should be selected.

renegad3 #226734 13/10/10 02:21 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
It seems to me that windows likes to add a space after the text you want to copy when you highlight it. It automatically makes a space and I have to take care to only get the text. Are you sure you aren't just copying this space?

I don't think mIRC is putting the space in there.

renegad3 #226736 13/10/10 04:01 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Some possibilities:

If you click and hold the mouse at the start of a line and go down to the start of the next line so only the one line is highlighted, you're actually also highlighting the $crlf. If you were in the scripts editor and did something like putting the cursor at the beginning of the line and then hold Shift and click End so that it highlights the line, you'll notice that it has a "space" highlighted at the end of the line. That "space" is the $crlf.

In either situation, you can verify that you're copying that character yourself (not something mIRC's doing on its own) by highlighting the line starting at the END of the line and going to the beginning instead of the normal way of starting at the beginning and going to the end. You'll find that it doesn't copy that extra character that way. Once you verify the cause is how you're highlighting the text, you can just be careful how you highlight... if you use the mouse over the text, make sure you stay on the same line. If you're using Shift-End, make sure to left arrow once while still holding Shift after you hit End.

If these aren't the reason, then you'll need to show the script you're using AND the data that you're trying to copy. Also, explain how you're copying the data. More details are needed to give you a better answer.


Invision Support
#Invision on irc.irchighway.net
renegad3 #226772 14/10/10 04:06 PM
Joined: Sep 2010
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2010
Posts: 6
I have found the culprit.

mIRC was indeed adding it on its own. I forgot that I had a loop to check the number of lines highlighted (if it were more than one).

Since what I was copying, required 2 tokens from the line, it wasnt receiving the second one, and for whatever reason, it was making it $crlf.

Once I found the loop and removed it from within, it worked as exactly as intended/expected.

Thank you all for the help/suggestions...

Any idea on my other question/post ?

Is it possible to make a custom window defined as a listbox scroll up automatically as new items are populated?

For example, the window is 15 lines of visible text, but it gets populated with 30 lines. It will not scroll as a normal text window. The new lines are populated, but I have to manually scroll to see them.


Link Copied to Clipboard