Phantom Documentation

[Help Home] [Phantom Home]
ToolBarFunctions

The following functions are for use with the ListView type class.

            GetCount
            GetRows
            PressButton


Example Code

# Include Phantom Target Declarations
use "PhantomTarget.dec";
System("PhantomTarget.exe");

window Event = MainWin("Phantom Target Event", "#32770");

# Enable Messages
PhantomTarget.TypeKeys("<ALT-o>mi");

# Display count for buttons and rows
int iCount = PhantomTarget.AfxControlBar701.ToolbarWindow321.GetCount();
disp(iCount);
disp(PhantomTarget.AfxControlBar701.ToolbarWindow321.GetRows());

# Cycle through buttons and press each one
for(int ctr = 0; ctr < iCount; ctr++){
  PhantomTarget.AfxControlBar701.ToolbarWindow321.PressButton(ctr);
  Sleep(0.25);

  # If the event occurred, clear the event (indicates
  # button was active)
  if(Exists(Event)){
    Event.Close();
    disp("Event detected for toolbar " + string(ctr));
  }else{
    disp("No event for toolbar " + string(ctr));
  }
}

# Exit out
PhantomTarget.Close();



See Also: ToolBar Class



Copyright 2000-2011 Phantom Automated Solutions