tell application "System Events"
  if not (exists application process "Microsoft PowerPoint") then
    error "PowerPoint not running"
  end if
end tell


to currentSlide()
  tell application "Microsoft PowerPoint"
    set curSlide to 0
    set theState to (slide state of slide show view of slide show window of active presentation)

    if theState is (slide show state running) or theState is (slide show state paused) then
      set curSlide to (current show position of slide show view of slide show window of active presentation)
    else if (exists active presentation) then
      set curSlide to (slide number of slide range of selection of document window 1)
    end if

    return curSlide
  end tell
end currentSlide

to maxSection()
  tell application "Microsoft PowerPoint"
    set maxSections to (get count of sections of section properties of presentation of document window 1)
    return maxSections
  end tell
end maxSection

to currentSection()
  tell application "Microsoft PowerPoint"
    tell (slide (my currentSlide())) of active presentation
      return section index
    end tell
  end tell
end currentSection

to main()
  tell application "Microsoft PowerPoint"
    set maxSlide to (get count of slides of presentation of document window 1)
    set minSlide to 1

    set totalSlideInCurrentSection to 0
    set hiddenSlide to 0
    set slideIndexInSection to 0
    set slideIndex to 0
    set _currentSlide to my currentSlide()
    set _section to my currentSection()
    set isSlideshow to slide show view of slide show window 1 exists
    set maxSections to (get count of sections of section properties of presentation of document window 1)

    repeat while minSlide ≤ maxSlide
      set selectedSlide to slide minSlide of active presentation

      if _section is section index of selectedSlide then
        set _hidden to hidden of slide show transition of selectedSlide

        if (_hidden is true) then
          set hiddenSlide to (hiddenSlide + 1)
        end if

        if _hidden is false and minSlide ≤ _currentSlide then
          set slideIndexInSection to (slideIndexInSection + 1)
        end if

        set totalSlideInCurrentSection to (totalSlideInCurrentSection + 1)
      end if

      set _hidden to hidden of slide show transition of selectedSlide

      if _hidden is false and minSlide ≤ _currentSlide then
        set slideIndex to (slideIndex + 1)
      end if

      set minSlide to (minSlide + 1)
    end repeat

    if my maxSection() is 0 then
      set _section to 0
    end if

    return isSlideshow & maxSections & _currentSlide & _section & slideIndex & slideIndexInSection & totalSlideInCurrentSection - hiddenSlide & maxSlide - hiddenSlide
  end tell

end main

my main()