41
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 07, 2014, 01:31:02 AM »
Feature request: Create a new G code file from the main menu (menu "File")
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
os.execute('start "Docs" "Notepad.exe C:\\Mach4Hobby\\Docs\\M4Manual.txt" ')
Try that. You may need to provide the fill path to Notepad. But that should not block the script.
Steve
Hiya Steve I found this roaming the web. The process OPENs Notepad fine AND Mach4 still runs OK. But it will not allow you to open the Txt file on load. It keeps telling me windows cannot find it for some reason I do not understand. YET
strProgram = '"Notepad.exe"'
strCmd = 'start "" '..strProgram
os.execute(strCmd)
os.execute('start "Docs" "Notepad.exe" "C:\\Mach4Hobby\\Docs\\M4Manual.txt" ')
HIYA Steve, I noticed that when you cut and paste from the gcode editor it does not always hold the CUT in the buffer and when you leave the Editor to paste it somewhere else the paste is EMPTY. Quirk ?? or made that way ??
Changing the settings in the config does not take effect until "Reset" is pressed. So look at the modes string to be sure what you think is in effect is actually in effect. Or, you can code it in your program.
Steve
function
onCloseEventOccurred(
event)
--exit frame, if it exists
if mainframe then
mainframe:Destroy()
mainframe = nil
end
local clipBoard = wx.wxClipboard.Get()
if clipBoard and clipBoard:Open() then
clipBoard:SetData(wx.wxTextDataObject('hello world'))
clipBoard:Flush()
clipBoard:Close()
end
end
function
main()
mainframe = wx.wxFrame(
wx.NULL, -- no parent
wx.wxID_ANY, -- whatever for wxWindow ID
"Example", -- frame caption
wx.wxDefaultPosition, -- place the frame in default position
wx.wxSize(591, 578),
wx.wxDEFAULT_FRAME_STYLE) -- use default frame styles
..
mainframe:Connect(wx.wxEVT_CLOSE_WINDOW,onCloseEventOccurred)
end