Tool Tiles

From Macros Wiki
Jump to: navigation, search

! look at tool tiles 1 to 10 and find out if there
! is a tool defined and if that tool is selected.
! then deselect all tools and select the first
! of these tools that is defined, if there is one.
! ------------------------------------------------

get_tool_list_shown ishown  ! check to see if tool tiles list is shown
if ishown<>1 then show_tool_list
 
msg$ = "First 10 tools" + crlf$
 
itool = 0
 
for i=1 to 10  ! check first 10 tools
a$ = "Tool %i"


get_tool_status i, istatus
if istatus=0 then a$=a$ + " Not Defined"


if istatus=1 then get_tool_selected i, isel
if istatus=1 then if isel=0 then a$=a$ + " Not Selected"
if istatus=1 then if isel=1 then a$=a$ + " Is Selected"


if istatus=1 then if itool=0 then itool=i


eval_text a$
msg$ = msg$ + crlf$ + a$
next i
 
message msg$
 
deselect_all_tools
if itool=0 then stop "No tools found"
 
select_tool itool
redraw_tool_list
 
message "Select the first tool"