Hello Guest it is March 29, 2024, 03:02:25 AM

Author Topic: do user button  (Read 2138 times)

0 Members and 1 Guest are viewing this topic.

do user button
« on: June 13, 2017, 07:12:18 AM »


I set on screen a button with a vb script, this is a user button, I need call this button from macropump,I already tried calling as  ex: "douserbutton(1500) but dont work, Does anyone know how I can do this?


tanks

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: do user button
« Reply #1 on: June 13, 2017, 08:39:08 AM »
I think the correct syntax is DoButton(1500) however...

Quote:

The use of DoButton is no longer recommended practice and this function exists only to support preexisting legacy scripts. This function is deprecated, and its use is strongly discouraged.   
 
Legacy script note: Over time, there have been two different Button numbering schemes used with Mach; the “Button number” series and the “OEMButton number” series. This function uses the “Button number” series.   
 
Within the “Button number” range, valid ButtonNums were from 0 to 31, which, at one time, corresponded to OEM LED numbers 1000 10 1031. 
 
The numerical correspondence between the numbering series is not guaranteed for future releases of Mach.
 
Use the DoOEMButton function instead of this function.

Tweakie.
PEACE
Re: do user button
« Reply #2 on: June 13, 2017, 08:52:25 AM »


thanks for the answer,


I also tested with the dobutton(1500) and it does not work, Is a button with a VB script, it is set to like function "User defined:1500", so, this is a user button right??

I know there is some silliness between DoButton and DoOemButton.

I do not know if I can call this button directly from a VB script like macropump ou M.m1s macros??

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: do user button
« Reply #3 on: June 21, 2017, 08:29:33 AM »
hi,
i am not 100% sure, but i think you can not run a oembutton from vb script.

a Workaround would be to use doOEMButton(301) witch runs the macro witch is set by SetTRiggerMacro,
and then you can run the macro from different "places".
Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.