while .......... :
  current_pose = dType.GetPose(api)
  dType.SetPTPCmdEx(api, 1, current_pose[0], current_pose[1], current_pose[2], 0, 1)
  dType.dSleep(1000)
  current_pose = dType.GetPose(api)
  dType.SetPTPCmdEx(api, 2, 270,  0,  20, current_pose[3], 1)
  dType.SetEndEffectorGripperEx(api, 1, 0)
  if (dType.GetIODI(api, 15)[0]).......1:
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, .....,  0,  (-.....), current_pose[3], 1)
    dType.dSleep(......)
    dType.SetEndEffectorGripperEx(api, 1, 1)
    dType.dSleep(1000)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, ......,  0,  ....., current_pose[3], 1)
    dType.dSleep(500)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, .....,  ........,  ........., current_pose[3], 1)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  125,  15, current_pose[3], 1)
    dType.SetEndEffectorGripperEx(api, 1, 0)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  125,  50, current_pose[3], 1)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  0,  20, current_pose[3], 1)
  if (dType.GetIODI(api, 19)[0]) ....... 1:
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  0,  (-25), current_pose[3], 1)
    dType.dSleep(1000)
    dType.SetEndEffectorGripperEx(api, 1, 1)
    dType.dSleep(1000)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  0,  50, current_pose[3], 1)
    dType.dSleep(500)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  (-115),  50, current_pose[3], 1)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  (-115),  15, current_pose[3], 1)
    dType.SetEndEffectorGripperEx(api, 1, 0)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  (-115),  50, current_pose[3], 1)
    current_pose = dType.GetPose(api)
    dType.SetPTPCmdEx(api, 2, 270,  0,  20, current_pose[3], 1)
