Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Repmo on December 03, 2008, 08:18:16 PM

Title: Mach3 ShutDown
Post by: Repmo on December 03, 2008, 08:18:16 PM
I Use mach 3 with touch screen and the X was hard to push,

HOW CAN I SHUTDOWN mach 3 with VB buttons ??

I want same as if I push alt+f4

tanks
Fred

Title: Re: Mach3 ShutDown
Post by: Repmo on December 05, 2008, 06:36:12 PM
OEM 706,

tanks Brian

Fred

Title: Re: Mach3 ShutDown
Post by: Repmo on December 17, 2008, 06:00:05 PM
the OEM code 706  turn off mach3 without saving readout, 

Do you know how can I saving my Zeros  before  DOOEMBUTTON (706)

Title: Re: Mach3 ShutDown
Post by: Repmo on January 02, 2009, 05:56:05 PM
Up :)

How can I save DRO and LED before quit mach 3, with   DOOEMBUTTON (706)    I can quit mach3  but the readout and other DRO was not saved.... 

I had try    SaveWizard ()    but not seem to work....

help me :)

Fred



Title: Re: Mach3 ShutDown
Post by: cncstep on April 13, 2009, 11:25:09 AM
I Use mach 3 with touch screen and the X was hard to push,

HOW CAN I SHUTDOWN mach 3 with VB buttons ??

I want same as if I push alt+f4

tanks
Fred



It is possible to make so:

dim z as integer
z=shell("shutdown.exe -s -t 5",1)

I in such a way switch off a computer after the ending of work when I leave it for the night to work. Has made command M999 and has registered it in it :)
Title: Re: Mach3 ShutDown
Post by: Repmo on April 17, 2009, 07:48:45 AM
I Use mach 3 with touch screen and the X was hard to push,

HOW CAN I SHUTDOWN mach 3 with VB buttons ??

I want same as if I push alt+f4

tanks
Fred



It is possible to make so:

dim z as integer
z=shell("shutdown.exe -s -t 5",1)

I in such a way switch off a computer after the ending of work when I leave it for the night to work. Has made command M999 and has registered it in it :)


it work good ??  My problem with OEMcode 705 and 706  turn off computer but when I return in mach3, the zero of my last session was loose....

Title: Re: Mach3 ShutDown
Post by: cncstep on April 18, 2009, 02:11:58 AM
it work good ??  My problem with OEMcode 705 and 706  turn off computer but when I return in mach3, the zero of my last session was loose....

I have understood your problem :) yes in this variant of coordinate are not kept.

If to make this code
SendKeys " % {F4} "

That mach3 will be cut down as if on command Alt+F4, but it deduces a window of confirmation in which it is necessary to press the button yes. But during this moment the program does not give in to a script and it is impossible to press this button..

There is one exit will write the second separate program which to catch this window and to press the button yes.

Sergey
Title: Re: Mach3 ShutDown
Post by: robinho.sl on June 15, 2009, 06:48:37 PM
o/

tks a lot!!

I was searching for this!!

But this code didn't work like i'd want.
So i tried (is it try on past?) others combinations with "SendKeys" and i found this:

SendKeys "%+{F4}"

without blanks.

Its works!!!!  o/
Title: Re: Mach3 ShutDown
Post by: giannis121 on August 24, 2009, 05:03:10 AM
Have you noticed that this command does not work on "image button"?
Works only with "button".
Why is that? Can be solved?
Title: Re: Mach3 ShutDown
Post by: poppabear on August 24, 2009, 08:33:26 AM
The cheap way to do it on image buttons is this, put the code:
SendKeys "%+{F4}"
into a macro call it "m888" and save it to your profiles macro folder.
in the image button, tick the VB box, and put this code:

Code "m888"

then when you push the button it runs that macro, which then runs the shutdown code.

scott
Title: Re: Mach3 ShutDown
Post by: giannis121 on August 24, 2009, 08:57:53 AM

Cooooool
Title: Re: Mach3 ShutDown
Post by: robinho.sl on August 24, 2009, 08:33:37 PM
if you want, you can put more one line to performa a shutdown without confirmation:

SendKeys "%+{F4}"
SendKeys "ENTER"


The "ENTER" will confirm the exit without a user's confirmation. (I always hated the close confirmation)

Using the config of windows its possible remove the title bar and close buttons, using only our close button. Also is possible run on fullscreen hidding all windows plataform. If is interesting for you, i can upload the ConfigFiles and help to do this...

Regards,
Róbson Machado Rosa
Brazil
Title: Re: Mach3 ShutDown
Post by: giannis121 on August 25, 2009, 01:27:06 AM
Personaly, i am interested.
Thanks!
Title: Re: Mach3 ShutDown
Post by: robinho.sl on September 24, 2009, 02:44:57 AM
wow!! i'm so sorry...

i did this request a long time ago.. but i forgot to publish.

I dont have the files now, but tomorrow i will post the files. I make a tutorial too. ^^

i see that you are on line now... xD

its good
Title: Re: Mach3 ShutDown
Post by: jorber on October 01, 2010, 03:06:47 PM
wow!! i'm so sorry...

i did this request a long time ago.. but i forgot to publish.

I dont have the files now, but tomorrow i will post the files. I make a tutorial too. ^^

i see that you are on line now... xD

its good
please publish the tutorial to do that, thanks
Title: Re: Mach3 ShutDown
Post by: dizzyy on June 05, 2011, 05:30:48 PM
good day
Help with this idea

need to add the button and led
and at the end of the program comes across Mohmand M999, and the script checks razhatie button, and depending on the state gives the go-ahead to turn off or not

Help, I'm in the scripts complete zero
Title: Re: Mach3 ShutDown
Post by: zafarsalam on July 01, 2011, 07:02:48 AM
wow!! i'm so sorry...

i did this request a long time ago.. but i forgot to publish.

I dont have the files now, but tomorrow i will post the files. I make a tutorial too. ^^

i see that you are on line now... xD

its good
please publish the tutorial to do that, thanks

I use this Autohotkey script to hide the title bar in Mach. You'll have to install Autohotkey from www.autohotkey.com first.

Run, c:\mach3\mach3.exe /p mach3mill , c:\mach3
Loop
   sleep, 20
   Until winexist("Mach3 CNC")
WinActivate
WinSet, Style, -0x800000
WinMove, , , -4, -4, 1034, 771
Title: Re: Mach3 ShutDown
Post by: mwshakoor on August 14, 2016, 06:01:39 AM
You can use this macro to shutdown mach3

'Code Start
SendKeys ("%+{F4}" )    'Alt+F4
Sleep (20)      'Wait 20milliseconds
SendKeys ("Y" )      'Y = Yes
'Code End

make macro file i.e m1011.m1s
the you can either quit mach3 using MDI line or by adding button to your screen.

Title: Re: Mach3 ShutDown
Post by: mwshakoor on August 14, 2016, 07:24:35 AM
for windows 7 use

Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "%+{F4}"
Sleep (20)      'Wait 20milliseconds
WshShell.SendKeys ("Y" )      'Y = Yes