Machsupport Forum

Mach Discussion => Mach Screens => Topic started by: Greolt on July 26, 2008, 07:31:45 AM

Title: Call for G-code display window
Post by: Greolt on July 26, 2008, 07:31:45 AM
Scott,  I am sure you will be able to help with this one.  ;D

Latest versions of Mach have a htm file with the Gcode explanations.  I find I look at it often.

This is the code behind the button,      HtmlDialog( GetMainFolder()+"Mach3MillGcode.htm" )

It opens in what looks like a restricted Internet Explorer window.  It is painfully small and not resizable.

My preferred browser is Firefox.  Is there a call that will open it in my choice of browser window?

Greg
Title: Re: Call for G-code display window
Post by: zealous on July 28, 2008, 01:12:34 PM
Acualy you can have anything open up in anything by adding the path:


IE:
Code: [Select]
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE "+ "C:\Mach3\Mach3MillGcode.htm", vbNormalFocus
FireFox:
Code: [Select]
Shell "C:\Program Files\Mozilla Firefox\firefox.exe "+ "C:\Mach3\Mach3MillGcode.htm", vbNormalFocus
!please take note to have a "Space after the location of the program you want to open the object with!
Title: Re: Call for G-code display window
Post by: Greolt on July 28, 2008, 05:54:26 PM
Thanks for that Jason. Your the man!!!! ;D

That's just what I wanted.

While I am at it, can I change the "edit code" program from the Notepad default?

Greg
Title: Re: Call for G-code display window
Post by: ger21 on July 28, 2008, 11:17:51 PM
Thanks for that Jason. Your the man!!!! ;D

That's just what I wanted.

While I am at it, can I change the "edit code" program from the Notepad default?

Greg
C'mon Greg, that's an easy one. General Config, top center, slightly to the left.  :)
Title: Re: Call for G-code display window
Post by: zealous on July 28, 2008, 11:19:45 PM
Hey Greg,

Under "General Configuration" in Mach you can set the Gcode editor.

Or

If you need total control on what program to open the currentl loaded file in use something like this on the Edit button:

Code: [Select]
DoOEMbutton(168)'**Close the FIle first**

If(FileName="No File Loaded.")Then'**Check to see a file is loaded**

Print"LOAD A FILE FIRST"

Else

Shell "notepad "+ FileName, vbNormalFocus ' **YOU CAN DO THIS FOR NOTEPAD**

'Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE "+FileName, vbNormalFocus'**Or open in what you want**

End If
Title: Re: Call for G-code display window
Post by: zealous on July 28, 2008, 11:21:06 PM
Hey Gerry,
Thats funny we posted at the same time  ;D
Title: Re: Call for G-code display window
Post by: Greolt on July 28, 2008, 11:37:26 PM

C'mon Greg, that's an easy one. General Config, top center, slightly to the left.  :)


OK OK I feel suitably chastised........I thought I had seen it somewhere.  ;D

Jason,  thanks.

In this case I was not looking for that much control.  Just a better editor than Notepad.

Greg