May 21, 2024, 06:47:35 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Multiple lines to the clipboard

Started by Andy, March 25, 2016, 06:50:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

Yes me again (groan lol),

I have an idea that could be a simple tool but handy for all of us.

But to do that I need to know how to do the following:

I'm reading a file, and there will be any number of lines to it - that's not the problem / question.

If I have 10 lines say, read in one at a time how can I send these lines to the clipboard so I can paste them into another program like notepad / word etc?

Anyone know how I could do this?

Thanks,
Andy.
:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Bill-Bo

Andy,

I am curious, as you are not specific. What kind of files are you reading, and why can't load them in Notepad / editor, anywy?

Bill

Andy

Bill,

I'm reading one of my IWB source files.

I want a way to copy a sub routine from the code so I can paste it into another IWB file.

I can send the sub to a text file and copy it from there but thought it would be handy send it direct to the clipboard and paste from there.

Some of my subs are large, and to manually copy and paste becomes a bind.

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

why does CTL-c/v not work for you especially after you fold the subroutine?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

Thought I had already tried that, I am sure it did not work, but will try it again and let you know.

Thanks.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Neat idea Andy. Thanks for sharing.
On my computers the CTL-c/v method works fine. I use it all the time, so can't really understand why it does not work for you.

But your post remind me of an idea I started working on a couple of years ago, using MiniBASIC. But then Paul was arrested, and the project was more or less forgotten.... till now.
I wanted to make a program that could browse through all files in the directories where I had saved my own code, and put the functions I wanted to preserve in a snippet collection.
Several methods were tried, but the easiest way was  to put kind of a marker in the line above the functions I wanted to save. I ended up with using the characters "'**" as a  start marker, and copy all lines over to the new  file until the end of the function was found. This was the word "ENDF" IN MiniBASIC, which equals "ENDSUB" in IWB.

The output file made when testing the initial idea is attached below. I planned to have several markers, so that the functions could be collected in "groups". But the project was never finished. Maybe I'll convert it  to IWB one day...?

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

Egil,

Thanks for the thumbs up!

The Ctrl -c/v simply doesn't work for me (don't know why), I've tried all variations I can think of but still nothing.

I think my clipboard offering has good potential, as does your idea.

Maybe an add-on for the IDE search in files option?

What do you think?

The program I've written could easily be amended for other languages where the commands are different.

If I'm the only one that ends up using it, then at least it will save me a lot of time.

Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

QuoteMaybe an add-on for the IDE search in files option?

What do you think?

I thing that is a very good idea!

We are some guys here now, watching a cycling race in Belgium while testing the quality of the local beer...  ::) ::)
One of the guys said he suddenly had the same problem (ctrl-c/v not working) with his work laptop a couple of years ago. We called his company IT guru right now, who say you have to update the keyboard driver. And a Google search produced a page indicating the same, and how to fix it:
http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/ctrl-c-and-ctrl-v-not-working/aa6719c6-9787-4e99-9c57-7ea89c5dbaeb?auth=1

Maybe that  will also work for you.

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy


I don't have any trouble using ctrl c / v in any program, and it works just fine in the IWB editor.

Could some please explain in very simple terms how you copy a whole sub routine without having to highlight all of the code in that sub.

If I highlight the first line of the sub and paste - that's all I get (the first line of course).

If I collapse the sub so I get the + sign next to the first line of the sub and paste that, again I only get the first line copied.

Am I missing something here...?

Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

fold the code
hilite the sub line and drag the mouse to the begining of the next line following the SUB line which copies all the subroutines lines even though you can't see them
hit CTL-C
goto where you want to paste it
hit CTL-V
it paste the whole sub
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

Thanks for my idiots guide (exactly what I asked for) on how to copying for example a sub routine.

However, I must be a bigger idiot than I thought I was, as I cannot get it to work, I've followed your instructions step by step but no joy.

In the mean time I've done my final CopyToClipboard program and I've posted the new update on the user offerings board which also now includes the DO / UNTIL function.

Thanks Larry anyway (I will keep trying - It's obviously me getting the copying method wrong!)

Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

okay
try this
make sure there is a blank line before your subroutine and two blank lines after your subroutine
fold your subroutine
now select the line before the SUB, the SUB, and the line after the SUB line.
hit CTRL-C and then tyr to CTRL-V it somewhere else.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry!

Managed to do the copy.

Andy,
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.