Escaped quotes inside the action_tile is what I was focusing on.
Personally I would keep as separate slides, and in a dedicated directory.
Have you considered what it would take to expand/reduce the available
list of blocks as the utility as what you show is static.
How many times will you be updating the utility and deploying?
How about this strategy [assuming slide names are the same as block names]:
Create a "dashboard" section (below the start_dialog)
- Check registry for path to slide library directory.
-- If not there, prompt user for location (use browse for folder).
-- Record path to registry [profiles/dialog section -or- HKCU/software section].
- Use vl-directory-files to gather all of the slide names.
-- Strip off file extension.
-- Sort the list.
-- Check for existing blocks of same name [findfile].
--- If no matching names, remove slide name from list.
- Write temporary dialog.
- Display dialog.
-- Set initial values to both the list box and image tile.
-- Fetch list box position and save as session gremlin.
- Check if start_dialog/done_dialog is 1 and enter main program.
Replace what you have for the list box action_tile with this:
(action_tile "lst" "(slide (nth (atoi $value) lst))")
...temporarily change "slide" with "alert" to see the results.
I envision a 30% total character count reduction in your code
if you employ the line above as is, with no changes.
(start_list key)(foreach itm lst (add_list itm))(end_list)
replace with (start_list "lst")(mapcar 'add_list lst)(end_list)
You do not have multiple list boxes to populate.
You use ok_cancel however there is no OK button in your dcl.
(action_tile "accept" "(setq SessionGremlin (get_tile \"lst\"))(done_dialog 1)")
You do not need to remember the file name for next time. Just the
position of the list box. [also part of the 30% character count reduction]
To repeat, add a checkbox to the dialog?
Allow the user to be able to change the directory of the slide library.
(slide_image 1 1 (- (dimx_tile key) 2) (- (dimy_tile key) 2) file)
Your reply mentioned SLB. The variable "file" is not in that format.
???
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.