Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Screen capture in X


Henk
 Share

Recommended Posts

THIS ALWAYS WORKS IN wINDOWS (from

Windozer help )

~~~~~~~~~~`

To copy the window or screen contents

To make a copy of the active window, press ALT+PRINT SCREEN.

To copy the entire screen as it appears on your monitor, press PRINT SCREEN.

Note

 

To paste the image into a document, click the Edit menu in the document window, and then click Paste.

Link to comment
Share on other sites

Thanks, but i'm looking for a lazy, fast solution in X, like an VBScript.

 

In V9 i do "hardcopy" (assigned to F11), and instead off 'Do it' i do "clipboard" (assigned to F12. Then in my setup sheet Ctrl-V, and thats all.

Link to comment
Share on other sites

Henk,

 

The script itself should work in X but you will have to edit the stuff that points it to certain .mc9 things to the proper location in X.

 

A little experimenting on your part "should" get this to work for you.

Link to comment
Share on other sites

Thanks John,

 

VBScripts are new for me.

Those 2 scripts run well in V9, but I can't get then run in X confused.gif

 

Maybe some one can have a look on them

 

'////////////////////////////////////////////////////////////////////////////////

'//

'// Author: Crazy^Millman with help from Matt aka Rekd

'// Date: 12/10/2004

'// File Name: CAPTURE1.vbs

'//

'// Description: Turn the Background White, Use Clipboard,

'// Then turn Background Back to Black

'//

'// Comments: Short Cut to F11 key.

'//

'////////////////////////////////////////////////////////////////////////////////

Const CLIP_BOARD = "clipbrd"

' -- Start Script

Call Main()

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

 

' -- Invoke color selector and preselect light blue

Call SetBackGroundColor(mcCOLOR_WHITE)

 

' -- Force a repaint otherwise we wont see the change, handy for exporting images!

Call RepaintScreen(True)

 

Call RunMastercamCommand(CLIP_BOARD)

Call SetBackGroundColor(mcCOLOR_BLACK)

Call RepaintScreen(True)

End Sub

 

 

 

'////////////////////////////////////////////////////////////////////////////////

'//

'// Author: Crazy^Millman, Matt aka Rekd and Bullines

'// Date: 12/10/2004

'// File Name: CAPTURE2.vbs

'//

'// Description: Turn the Background White, Use Clipboard,

'// Then turn Background Back to Black

'//

'// Comments: Short Cut to F11 key.

'//

'////////////////////////////////////////////////////////////////////////////////

Const CLIP_BOARD = "clipbrd"

' -- Start Script

Call Main()

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

' -- Invoke color selector and preselect light blue

Call SetBackGroundColor(mcCOLOR_WHITE)

' swap the colour of any white entities to black

Call SwapEntityColours(mcCOLOR_WHITE, mcCOLOR_BLACK)

' -- Force a repaint otherwise we wont see the change, handy for exporting images!

Call RepaintScreen(True)

Call RunMastercamCommand(CLIP_BOARD)

Call SetBackGroundColor(mcCOLOR_BLACK)

' swap the colour of any white entities to black

Call SwapEntityColours(mcCOLOR_BLACK, mcCOLOR_WHITE)

Call RepaintScreen(True)

End Sub

' Purpose: Swap the colours of entities.

' I: the colour to look for

' I: the colour to change to

Sub SwapEntityColours(iBeforeColour, iAfterColour)

Dim bSuccf ' success flag

Dim iCurrColour ' colour of the current entity

' Start searching the database

bSuccf = StartDBSearch(mc_alive, mc_arctype Or mc_pointtype Or mc_linetype Or mc_recttype)

' Loop through the database of entities and retrieve the colour of the current entity.

' If the colour is the same as the one we're searching for (iBeforeColour), then

' set that entity's colour to the new colour (iAfterColour).

Do While bSuccf

' Get the current entity's colour

iCurrColour = GetEntityColor()

' swap colours

If (iCurrColour = iBeforeColour) Then Call SetEntityColor(iAfterColour)

' Get the next entity

bSuccf = NextDBSearch()

Loop

End Sub

 

 

Thanks

Link to comment
Share on other sites

Hi,

 

I've a small chook called XSnapShot.

You can download it here .

I will add it to the X+ tools in the next version.

 

It captures the mcamx grafix screen even if you have multiple views.

It can set the background to white during capture and restore it afterworks.

Also it's possible to save the captured image in the excellent png file format.

Visible toolbars will be hided and restored during capturing.

 

Currently I have only a german version. Other languages will be supported with the next X+ version.

 

Installation:

Unzip the files to the chook folder.

Execute with Alt+C or get the button from X+ categorie from toolbar configurations.

 

Enjoy wink.gif

Link to comment
Share on other sites

Just and FYI you can add the camera for the capture to clipboard to your right click opition if you would like but has no background color change. Go to the cutomize then right click bring up the Screen and you will see the camera top row very right pull that to where you want it on the right click and done.

 

HTH

Link to comment
Share on other sites

Ok I played with this and you can access anything in the toolbars using the

code:

Call RunMastercamCommand  

The trick is to see what it is defined as now. Clipbrd changed to ToClipboard so n ithe Vb script you change and it runs. Sample script:

code:

'////////////////////////////////////////////////////////////////////////////////

'//

'// Author: Crazy^Millman help from Matt aka Rekd

'// Date: 3/22/06

'// File Name: CAPTURE FOR SETUP SHEETS version X

'//

'// Description: Changes the background to white, opens up clipboard,

'// Then changes background back to black

'//

'// Comments: Save about 20 mouse clicks

'//

'////////////////////////////////////////////////////////////////////////////////

 

Const CLIP_BOARD = ("ToClipboard")

' -- Start Script

Call Main()

 

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

 

 

' -- Invoke color selector and preselect white

Call SetBackGroundColor(mcCOLOR_WHITE)

 

' -- Force a repaint otherwise we wont see the change, handy for exporting images!

Call RepaintScreen(True)

 

' -- Calls command defined above to do Clipboard.

Call RunMastercamCommand(CLIP_BOARD)

 

' Call SetBackGroundColor(mcCOLOR_BLACK)

 

' Call RepaintScreen(True)

 

End Sub

The only problem I have found which to me is a big one is when you use it from Vb side of Matercam it does not stop the script it completes the rest of the script changing the background back to Black. So if you wanted to make short cut keys you would need 2 scripts one that does making it white calls clipboard do it then hit another key turning it back to black. Now if you want to use your enity color swap problay going to have to do the same thing till I or someone who really knows Vb can give me a condition statement that will allow you to complete the clipboard command before finishing the rest of the script. I am thinking it has something to do with the loop or if then scripting but not sure.

 

HTH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...