Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Fred_evans on May 28, 2019, 03:24:14 AM

Title: vba and vb-differences
Post by: Fred_evans on May 28, 2019, 03:24:14 AM
hello all ,
It is cold in Johannesburg at the moment must be at least 18 degrees with a midday high of 24 to 26. Brrrrrr
Concurrently with many other projects i am trying to learn VBA.
Mach scripts are written in VB.
are there many significant differences?
Like what does doOEMbutton(169) translate to in plain english
Best regards

fred evans

Title: Re: vba and vb-differences
Post by: joeaverage on May 28, 2019, 03:52:51 AM
Hi,
do yourself a favor, learn Lua instead.

Craig
Title: Re: vba and vb-differences
Post by: Tweakie.CNC on May 28, 2019, 04:16:50 AM
Hi Fred,

As Craig suggests best to learn Lua and look toward the future.

The Mach3 scripts are written in Cypress Enable which is a subset of Visual Basic. It is almost identical to VB but, as you are aware, there are some important differences.

DoOemButton(169) is the equivalent of pressing an on-screen button which will close the current file.

You will find the OemButton codes and Cypress Enable documentation in the Members Documents section of the forum.

Tweakie.
Title: Re: vba and vb-differences
Post by: Fred_evans on May 28, 2019, 06:04:31 AM
thank you chaps--
I dont know anything about lua but I will look it up. Unfortunenately I am past my sell by date
on learning new software -so i will probably give this issue a miss-
many thanks
fred evans
Title: Re: vba and vb-differences
Post by: Tweakie.CNC on May 28, 2019, 06:25:45 AM
 :)
Title: Re: vba and vb-differences
Post by: Overloaded on May 28, 2019, 08:04:44 AM
Unfortunenately I am past my sell by date on learning new software ................

 ;D  ;D
I feel similarly.
But I prefer to consider it going through multiple substantial price reductions ... but still on the shelf.  ;D

 :)
Russ
Title: Re: vba and vb-differences
Post by: Fred_evans on May 28, 2019, 10:44:51 AM
russ- thanks for the reply

at my age (77) I am still running my company because inflation has eaten all my
savings so i think I will soon be "redundant stock" and put in the scrap bin. But thank
almighty God I am still healthy and strong and i actually enjoy the work once I have got
all the creaks and groans sorted out ( usually at about 9.00 am) then I am OK!!
Best regards

fred
Title: Re: vba and vb-differences
Post by: TPS on May 28, 2019, 11:58:17 AM
back to the Basic question.

if you have a look to this: http://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf
Manual you will see that VBA and cypress VB script are very simular.

in this Manual: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=2ahUKEwjC4uDXyr7iAhVb8aYKHdLyA6gQFjACegQIAxAC&url=https%3A%2F%2Fforum.strojirenstvi.cz%2Fdownload%2Ffile.php%3Fid%3D56730&usg=AOvVaw2suuC-ECkZF7kK6JRlQfjA

you will find all Mach3 specific functions. there are also examples for the most needed things in there.

Title: Re: vba and vb-differences
Post by: Fred_evans on May 28, 2019, 07:04:58 PM
thank you TPS
best regards

fred
Title: Re: vba and vb-differences
Post by: ger21 on May 28, 2019, 09:38:04 PM
For practical purposes, Cypress Enable, VB, and VBA are all nearly identical.

The main differences will be the functions specific to the application you are writing for, Mach3 in this case.
Title: Re: vba and vb-differences
Post by: Fred_evans on August 19, 2019, 02:40:57 AM
Thanks to everyone--
good responses and i am now much wiser
regards fred