TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: CatDance on September 13, 2021, 02:12:03 AM

Title: Getfiled dialog box problem
Post by: CatDance on September 13, 2021, 02:12:03 AM
when dialog box is called using below ...

Code - Auto/Visual Lisp: [Select]
  1. (setq pGDF (getfiled "Select a TRS file to Load A Saved Game" n/Path "txt" 8))
  2.  
  3.  

(1)  How to make it stay focus in the folder (of filenames) and NOT at the key-in of filename.
Becos when I click a file (other than the 1st filename) it always display the 1st filename at the key-in filename box.
Title: Re: Getfiled dialog box problem
Post by: tombu on September 13, 2021, 10:06:13 AM
Why is it displaying "lsp" files when "txt" was specified as the extension?
Title: Re: Getfiled dialog box problem
Post by: Crank on September 13, 2021, 01:20:18 PM
This is a bug that exists since Windows7. You can use DosLib in stead:
Code: [Select]
(dos_getfiled "Select a TRS file to Load A Saved Game" n/Path "Saved game files (*.txt)|*.txt")or:
Code: [Select]
(dos_getfilenav "Select a TRS file to Load A Saved Game" n/Path "txt" 8)
Title: Re: Getfiled dialog box problem
Post by: CatDance on September 13, 2021, 03:48:11 PM
Why is it displaying "lsp" files when "txt" was specified as the extension?

just an example to show where the focus area
Title: Re: Getfiled dialog box problem
Post by: CatDance on September 13, 2021, 03:51:13 PM
This is a bug that exists since Windows7. You can use DosLib in stead:
Code: [Select]
(dos_getfiled "Select a TRS file to Load A Saved Game" n/Path "Saved game files (*.txt)|*.txt")or:
Code: [Select]
(dos_getfilenav "Select a TRS file to Load A Saved Game" n/Path "txt" 8)

I try to write a dialog box for the getfiled.
I have not written a line of lisp for about 7 years. Now my head is almost empty (forgotten most of it). Have a difficult time writing dialog box now.