Author Topic: REFF ALL HOME 2 SCRIPT  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

Offline birillo1959

  • Active Member
  • Posts: 77
    • View Profile
REFF ALL HOME 2 SCRIPT
« on: December 23, 2018, 07:18:56 AM »
Good morning
I have the following script for "REFF ALL HOME" modified a window two buttons "NORMAL and FAST" (I had the TPS user had me) the normal part works fine.
what I would like to change is the fast part:
1) the "Z" rises to the origin
2) "X and Y" at the same time
I state that I have no skills with VB, I thank those who can help me
GOOD HOLIDAYS TO EVERYONE!

Sub Main
 Begin Dialog SelectCentering 350,145,125,96,"REFF ALL HOME"
   OKButton 20,68,40,14
   CancelButton 70,68,40,14
   GroupBox 30,5,72,52,"REFF ALL HOME",.GroupBox1
   OptionGroup .OptionGroup1
   OptionButton 46,24,54,8," NORMALE",.OptionButton1
   OptionButton 46,40,54,8," VELOCE"  ,.OptionButton2
  End Dialog

  Dim Dlg1 As SelectCentering
  Button = Dialog (Dlg1)
 
  If Button = 0 Then Exit Sub
  Selected  = Dlg1.OptionGroup1

  'NORMALE is selected ********************************************************************
  If Selected = 0 Then '*****************************************************************

Speak ("  zero   macchina") 'Avviso Vocale
   Message "************   ZERO MACCHINA ************"
   Sleep (1000) ' pausa di 1 secondi
   
   DoButton(24)
   RefCombination(3)
   'DoButton(23)
   'DoButton(22)
   'DoButton(25)
   While IsMoving()
   Sleep(100)
   Wend
   SetParam("XRefPer", GetParam("XRefPer")/15)
   SetParam("YRefPer", GetParam("YRefPer")/15)
   SetParam("ZRefPer", GetParam("ZRefPer")/15)
   'SetParam("ARefPer", GetParam("ARefPer")/15)
   DoButton(24)
   RefCombination(3)
   'DoButton(23)
   'DoButton(22)
   'DoButton(25)
   While IsMoving()
   Sleep(100)
   Wend
   SetParam("XRefPer", GetParam("XRefPer")*15)
   SetParam("YRefPer", GetParam("YRefPer")*15)
   SetParam("ZRefPer", GetParam("ZRefPer")*15)
   'SetParam("ARefPer", GetParam("ARefPer")*15)
   Speak ("zero macchina completato") 'Avviso Vocale


 
  End If '********************************************************************************
 
  'VELOCE is selected ***********************************************************************
  If Selected = 1 Then '******************************************************************
 
     Speak ("  zero   macchina  veloce") 'Avviso Vocale
Message "***   ZERO MACCHINA VELOCE   ***"
   Sleep (1000) ' pausa di 1 secondi
   
   RefCombination(7)
   'RefCombination(15)
   
   Sleep(300)
   'While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true) Or (GetOemLed(810) = true))
   While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true))
   Sleep(50)
   Wend
   
   SetParam("XRefPer", GetParam("XRefPer")/15)
   SetParam("YRefPer", GetParam("YRefPer")/15)
   SetParam("ZRefPer", GetParam("ZRefPer")/15)
   'SetParam("ARefPer", GetParam("ARefPer")/15)
   
   RefCombination(7)
   'RefCombination(15)
   
   Sleep(300)
   'While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true) Or (GetOemLed(809) = true))
   While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true))
   Sleep(50)
   Wend
   
   SetParam("XRefPer", GetParam("XRefPer")*15)
   SetParam("YRefPer", GetParam("YRefPer")*15)
   SetParam("ZRefPer", GetParam("ZRefPer")*15)
   'SetParam("ARefPer", GetParam("ARefPer")*15)
   
   Speak ("ZERO MACCHINA VELOCE COMPLETATO") 'Avviso Vocale