Hello Guest it is March 28, 2024, 03:43:31 PM

Author Topic: How to make a popup when a button is selected?  (Read 8232 times)

0 Members and 1 Guest are viewing this topic.

Offline mike^3

*
  •  116 116
    • View Profile
Re: How to make a popup when a button is selected?
« Reply #10 on: March 22, 2014, 10:46:50 PM »
nope doesnt work... its compile error :(

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: How to make a popup when a button is selected?
« Reply #11 on: March 22, 2014, 10:56:04 PM »
There's a double "" before the Make sure Turret.............

Remove one of the quotes and it should work.

 I copied the code from my Autozero macro and just changed the text. It works in my macro.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline mike^3

*
  •  116 116
    • View Profile
Re: How to make a popup when a button is selected?
« Reply #12 on: March 22, 2014, 11:02:00 PM »
k one sec ;)

Offline mike^3

*
  •  116 116
    • View Profile
Re: How to make a popup when a button is selected?
« Reply #13 on: March 23, 2014, 10:52:13 AM »
Hrmm, still doesnt work...I can get the OK on the box, but not the cancel...when I press of, it just starts homing.

Can we write a script that just ...

Activate output 1
pause for 0.5seconds
Home A axis
wait for homing to end,
then deactivate output 1
change tool changer dro to 1

Can this be done?

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: How to make a popup when a button is selected?
« Reply #14 on: March 23, 2014, 11:39:12 AM »
Try this. I just tested it and it works here. This is all you need, it contains the homing in the message box.


Response = MsgBox ("Warning !!!" & (Chr(13)) & "Make sure Turret UP button is pressed before homing turret!" & (Chr(13)) & "Press OK To Continue" & (Chr(13)) & "Or Press Cancel to Exit ",49,"Press Turret Up Button!!")

   If Response = 1 Then ' If OK
      DoButton(25)
      ElseIf Response = 2 Then ' If Cancel
      Exit Sub
   End If
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline mike^3

*
  •  116 116
    • View Profile
Re: How to make a popup when a button is selected?
« Reply #15 on: March 23, 2014, 04:32:31 PM »
Hey Ger21 would this work for an auto tool home and seat to tool 1?

 Sub Main()

Code "G53 G0 X0 Z0"

ActivateSignal(OUTPUT1)  'Raise Turret
Code "G4 P0.5"
While IsMoving ()       
Wend
DoButton(25)     
While IsMoving ()       
Wend

DeActivateSignal(OUTPUT1)  'Drop Turret

SetCurrentTool(1)
Code "G90"
End Sub