I am using vba to give the printscreen output of mastercam to an excel file
but still i am not having success
i tried send keys
it dont work either
any one done
or there be any mastercam viewver ocx
anyone know anything in this regard...
I am using vba to give the printscreen output of mastercam to an excel file
but still i am not having success
i tried send keys
it dont work either
any one done
or there be any mastercam viewver ocx
anyone know anything in this regard...
Not sure if this is of any use......
VisualBasic book lists PrintScreen as Chr$(42). Hex value 'H2A'
http://www.diycalculator.com/imgs/codes-05.gif
see the table
std ascii
i used
msgbox char$(42)
it shows "*"
which is given in table
so...
Copy of page, information taken from....Maybe incorrect????
i used
msgbox char$(42)
it shows "*"
where u got that information you provided
MSDN or WEB
The Book 'Visual Basic Answers!' ISBN 0-07-211895-4.
Here is some code that will capture your screen. Too advanced for me to explain the detail. You will need to paste your 'capture' to your program.
This works with VB6, unsure if about VBA.
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_SNAPSHOT = &H2C
-------------------------------------------------
Private Sub Command1_Click()
keybd_event VK_SNAPSHOT, 0, 0, 0
End Sub
Checked code within Excel and captures screen OK, so looks like it works under VBA.
when i pasted this code in vb6
it worked correctly
( I have used it before too)
but when i put in script it show this error
check this out
attached file
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_SNAPSHOT = &H2C
'///////////////// My Global Variables //////////
' -- Start Script
Call Main()
' ////////////////////
' Sub Declaration
' ////////////////////
Sub Main()
keybd_event VK_SNAPSHOT, 0, 0, 0
End Sub
even this dont work
http://word.mvps.org/faqs/MacrosVBA/PrtSc.htm
Can only suggest that MasterCam script is different to VBA.
Are we looking to do some thing like this:
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Cadcam
Software and hardware sales, contract Programming and Consultant , Cad-Cam Instructor .
yes this is all i want automatically
what version are you running. this was created using a free adon that out puts to HTML or Excel as shown.
X+ setup sheet.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Cadcam
Software and hardware sales, contract Programming and Consultant , Cad-Cam Instructor .
i am using mastercam 9
well one thing that mick george gave me is this
it worked for me very right
but for more i would like to know about the X+
' -- Start Script
Call Main()
' ////////////////////
' Sub Declaration
' ////////////////////
Sub Main()
' -- Add code here...
On Error Resume Next
Dim WB
Set WB = CreateObject("Word.Basic")
If Err Then
ShowString "Unable to find Word basic, print screen aborted!"
Exit Sub
End If
WB.SendKeys "{prtsc}"
ShowString "Image has been captured.”
End Sub
i could not fine x+ for mcam9
can anybody suggest me
and more i would like to have a soft which can do bulk file mgmt
coz i have lots of files to work with
thanks...