Hello Guest it is April 19, 2024, 04:52:10 PM

Author Topic: DoButton syntax  (Read 8170 times)

0 Members and 1 Guest are viewing this topic.

DoButton syntax
« on: June 04, 2007, 01:25:36 PM »
On the Program Run screen, the button script for the "Ref All Home" button has a syntax of  'DoButton (22)' etc...

Where can I find a list of all the 'DoButtons' ?

Thanks

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: DoButton syntax
« Reply #1 on: June 04, 2007, 02:31:07 PM »
Check the Wiki is has the total list you just grab the OEM number, but here is a list that I have aready, sorry about all the code inbetween, I'm to lazy to remove i and just have the button code  ;D but if you look at the list you'll see the name of the function and the DOOEMButton(*********)
Remeber there is two ways of doing buttons DoOEMButton or DOButton so if the number you found in the wikki isn't working than try the other sntax to call on a button.

I'd do your robot with a Flash screen, there is alot more you can do...let me know if you need any help.

http://www.artsoftcontrols.com/MachCustomizeWiki/index.php?title=Main_Page



Decleare Audio(has to be along side each code) Example:

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

sndPlaySound "Bitmaps\Machwave\MaleVoice\LoadGCode.wav", &H1

DoOEMButton (216)

--------------------------Start of Code-------------------------------------------------------


-----------------------------------------------------------------------------Estop:

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\ResetSwitch.wav", &H1
   
    DoButton (21)
     

-------------------------------------------------------------------------OFFLINE ON LINE:

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(178)
sndPlaySound "C:\WINDOWS\Media\Machwave\Online.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(178)
sndPlaySound "C:\WINDOWS\Media\Machwave\Offline.wav", &H1
End If

------------------------------------------------------------------------REFER HOME

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
DoButton( 24 )
    sndPlaySound "C:\WINDOWS\Media\Machwave\Homing.wav", &H1
DoButton( 23 )
    sndPlaySound "C:\WINDOWS\Media\Machwave\Homing.wav", &H1
DoButton( 22 )
    sndPlaySound "C:\WINDOWS\Media\Machwave\Homing.wav", &H1
DoButton( 25 )


-------------------------------------------------------------------------LOAD GCODE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\LoadGCode", &H1
   
    DoOEMButton (216)

---------------------------------------------------------------------------------Close GCODE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\CloseGCode", &H1
   
    DoOEMButton (169)


-----------------------------------------------------------------------------------Edit GCODE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\EditGcode.wav", &H1
   
    DoOEMButton (115)


--------------------------------------------------------------------------------START PROGRAM

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\Play.wav", &H1
   
    DoButton (0)

--------------------------------------------------------------------------------STOP PROGRAM

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\Stop.wav", &H1
   
    DoButton (3)

---------------------------------------------------------------------------------REWIND

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\MEDIA\Machwave\Rew.wav", &H1

DoButton (2)

--------------------------------------------------------------------------------HOLD PROGRAM

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\MEDIA\Machwave\Hold.wav", &H1
DoButton (1) 


------------------------------------------------------------------------------REGEN

value = GetParam("Boundry")
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If  value = 1 Then
'SetButtonText " Job "
SetParam "Boundry" , 0
 sndPlaySound "C:\WINDOWS\Media\Machwave\JobDisplay.wav", &H1
 Else
SetParam "Boundry" , 1
'SetButtonText "Machine"
sndPlaySound "C:\WINDOWS\Media\Machwave\TableDisplay", &H1
End If
   

-----------------------------------------------------------------------------------CHANGE PAGE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\ClicksoundScreen 2.wav", &H1
DoOEMButton (1)

----------------------------------------------------------------------------------ZERO ALL AXIS

   
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\ZeroAllAxis.wav", &H1
   
DoButton (8)
DoButton (9)
DoButton (10)


-------------------------------------------------------------------MACHINE/SOFTWEAR POSITIONING

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(256)
sndPlaySound "C:\WINDOWS\Media\Machwave\MachineCoordinetsOn.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(256)
sndPlaySound "C:\WINDOWS\Media\Machwave\MachineCoordinetsOff.wav", &H1
End If


------------------------------------------------------------------------------JOG MODE

DoOEMButton (245)


-----------------------------------------------------------------LAUCH PROGRA< (ONSCREEN KEYBOARD)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\LaunchKeyboard.wav", &H1
   
Dim stAppName As String

    Dim filePath As String

 

    stAppName = "C:\Program Files\Click-N-Type\Click-N-Type.exe"

    Call Shell(stAppName,1)

---------------------------------------------------------------------------------JOG ON/OFF

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(103)
sndPlaySound "C:\WINDOWS\Media\Machwave\JogModeOff.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(103)
sndPlaySound "C:\WINDOWS\Media\Machwave\JogModeOn.wav", &H1
End If


----------------------------------------------------------------------------------INCREASE FEED

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\FeedMore.wav", &H1
DoOEMButton (108)

------------------------------------------------------------------------------------DECREASE FEED

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\FeedLess.wav", &H1
DoOEMButton (109)
 

-------------------------------------------------------------------------------------SOFTLIMITS

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(119)
sndPlaySound "C:\WINDOWS\Media\Machwave\SoftwearLimitsOff.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(119)
sndPlaySound "C:\WINDOWS\Media\Machwave\SoftwearLimitsOn.wav", &H1
End If


------------------------------------------------------------------------------RAPID ACTIVE/DEACTIVE

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(287)
sndPlaySound "C:\WINDOWS\Media\Machwave\RapidActive.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(287)
sndPlaySound "C:\WINDOWS\Media\Machwave\RapidDeactivated.wav", &H1
End If


------------------------------------------------------------------------------AUTO LIMIT OVERRIDE

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(149)
sndPlaySound "C:\WINDOWS\Media\Machwave\AutoLimitOverRide.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(149)
sndPlaySound "C:\WINDOWS\Media\Machwave\AutoLimitOverRideOff.wav", &H1
End If
   

---------------------------------------------------------------------------------TOOLCHANGER ON/OFF

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(168)
sndPlaySound "C:\WINDOWS\Media\Machwave\ToolChangedeActive.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(168)
sndPlaySound "C:\WINDOWS\Media\Machwave\ToolChangeActive.wav", &H1
End If
     
--------------------------------------------------------------------------------MANUAL OVERRIDE

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(150)
sndPlaySound "C:\WINDOWS\Media\Machwave\ManualOverRide.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(150)
sndPlaySound "C:\WINDOWS\Media\Machwave\ManualOverRideOff.wav", &H1
End If


-Check out http://AlphagraphicDesigns.com
for more Graphics and screens
« Last Edit: June 04, 2007, 02:36:29 PM by zealous »