Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jimpinder on May 05, 2008, 04:05:18 AM

Title: Urgent Help needed with Screen4
Post by: jimpinder on May 05, 2008, 04:05:18 AM
I am writing a script for Mach to use with touch tools for positioning.

The script is finished and works - but I am now trying to link in to a page on one of the screen sets - to use push buttons to start the various routines.

If I "open" a button, I get a choice of 4 options
1. System function
2. OEM code function
3. GCode Function
4. VB Script edited in Mach 3.

What is the best way to link my script to the button ???
My instinct tells me this is a VB script - therefore I tend towards option 4 - BUT I can neither find which file such a script should be in, or how to name the script once it is there.

The other option seems to be give the script a Macro number M*** and put it as a GCode function - will this work - I don't know _ I have just though of it and will try it.

Can anyone tell me the right answer ????

The other question was - can you edit the background screen on say the Mach Blue set to incorporate another button - I can put another button on to access my new screen, but it comes out as a white square amongst the blue ovals.
Title: Re: Urgent Help needed with Screen4
Post by: M250cnc on May 05, 2008, 04:41:53 AM
Jim

I didn't believe that anyone could be as dumb as me.  ;D ;D ;D

I went through the same agony till i realised that with Mach open

Click "Operator" top menu

Click "Edit button script"

Most if not all buttons that can be edited flash on and off

Click the button that you want and add the script

Screen4 has nothing to do with it

Can't help with the last bit

Phil_H
Title: Re: Urgent Help needed with Screen4
Post by: jimpinder on May 05, 2008, 06:03:37 AM
Phil -

Thanks - Of course - you're in Screen4 doing the screen - you don't think of going back into Mach to script the button.

Jim.
Title: Re: Urgent Help needed with Screen4
Post by: Hood on May 05, 2008, 07:06:16 AM
In the old screen designer you used to do the code there but in screen4 its done in Mach as Phil has said. Its caught me out a few times as well as I started off with the screen designer. I think however screen4 is much better and its also much better being able to alter the VB from Mach as often you find things need tweaked and it saves having to go back to the screen editer to do tht.
Hood
Title: Re: Urgent Help needed with Screen4
Post by: Greolt on May 05, 2008, 04:27:24 PM
I have buttons which run scripts and are the same button on several Mach pages.

This can be a pain as if you alter one script you must remember to alter every occasion of it.

So I simply have all the same buttons call M675 (or whatever) and have the one macro in the macro folder.

This can still be edited with the VB editor from within Mach. 

But now when I alter the script it does so for all the relevant buttons at once.

Greg
Title: Re: Urgent Help needed with Screen4
Post by: jimpinder on May 06, 2008, 06:35:09 AM
Thanks for all the replies lads, I got the screen done.

Still don't know how to do the overlay for the blue screen, unless it was done with some other artwork program - but the main thing is the buttons. The tutorial I saw obviously referred to one of the earlier programs.
Title: Re: Urgent Help needed with Screen4
Post by: poppabear on May 06, 2008, 10:02:40 AM
yes, you can edit in a button, open up the screen in Screen 3 or 4, look at the button you want yours to look like, note its path, then add a Bitmap button and look at the image box, navigate to where the bitmap you found above it click on it and that is it.

scott
Title: Re: Urgent Help needed with Screen4
Post by: jimpinder on May 06, 2008, 12:54:11 PM
Thanks Scott - I'll have a look at that