Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I think the title says it all - is it possible to programmatically copy/paste some text to/from the windows clipboard using MapBasic?

I have found this discussion but it only discusses copying and as it's two years and 1.5 versions ago I'm wondering if there's a better/more native option.

share|improve this question
    
What is the text you are trying to copy? For instance is it a attribute of an object or an object from a layout? –  James S Jun 14 '11 at 12:58
    
The result of WindowInfo(FrontWindow(), WIN_INFO_CLONEWINDOW). I want to have two instances of MapInfo open and easily copy a layout window between them. –  Mr_Chimp Jun 14 '11 at 13:36
add comment

1 Answer

up vote 2 down vote accepted

To copy the objects from the layout onto the clipboard you can do the following:

dim strLayWinName As String
strLayWinName = WindowInfo(FrontWindow(), 10) ' assuming layout window is front window
Select * From strLayWinNAme
Run Menu Command 203

You will then need to work out how to switch instances of MapInfo (or just open a new one). Then you need to set your layout window as the Front Window. Then run:

Run Menu Command 204
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.