|
Post by George on Dec 12, 2022 16:56:14 GMT -5
I'll have a peek if I can ever figure out just what I'm supposed to be looking for.
This whole area of "what's the default path" for a lot of functions is very clouded. And when you start throwing in DIRs and CD's etc., along with single line FLISTS where you would like some intelligent "change the default to match the FLIST" function just muddies the already murky waters.
Now throw in a scene where there may be multiple tabs open, from a variety of folder locations, and where a switch back to FM may have been done doing God only knows what changes to the FM display, and maybe you can see my problem.
I really don't have a clue what the underlying problem is, what to look at, or how to proceed.
George
|
|
|
Post by George on Dec 13, 2022 10:02:38 GMT -5
Robert: I did some tests to confirm my memory. The rules, as they have been for many, many years. - FM has a default and it is ALWAYS the folder selected for the FilePath display, REGARDLESS of which display is being shown.
- Edit sessions with a real file loaded - the default folder is the path from which the file was loaded.
- Edit sessions like CLIP /New etc. - use the FM default
And the FM default path is NOT the system Current Path, they have nothing to do with each other.
Your test of Get_Curr_Path$ is fine, but it does NOT FETCH the FM default path, it fetches the DOS current path.
That's it - period.
So when you went back to FM, selected the _Macros FLIST and then chose New, the default FM folder has NOT changed.
Because you can set FM to any other display than FilePath (FLIST, OPEN etc.), and the default path does not change.
Alter it with DIR from Edit or DIR on an FM file line and it DOES change because that's just like overtyping the FM FilePath entry field.
Your problem is that you want a single line FLIST, that specifies a folder, to be treated automatically as a DIR command to that folder. In your case it makes sense, but how do we know it would 'make sense' to other users whose work habits differ. e.g when I want to create a new macro, I select a reasonable sample macro from my FM Favorites list and immediately do a SAVEAS, which of course now saves it in the Macros folder.
I'd be very leery of changing things in this area to satisfy what may be a single specific style of work.
George
|
|
|
Post by George on Dec 13, 2022 12:26:42 GMT -5
Adding RMB support is a problem as RMB is already used in FM.
George
|
|
|
Post by George on Dec 13, 2022 14:32:51 GMT -5
Set your RMB to (Null) or nothing shows, trust me, it give a RMB context menu. -- Where have you been?
George
|
|
|
Post by George on Dec 13, 2022 14:54:29 GMT -5
Set it to (Null).
|
|
|
Post by mueh on Dec 14, 2022 1:34:46 GMT -5
Robert: Have you turned on Position Cursor on mouse click ? box before (Null) LMB on Directory (in Flist) switches to FilePath and FMGet_FilePath$ value is set . DIR line cmd which is only valid on File to switch to Filepath with directory of that file . Does this help ? JFYI: Get_Curr_Path$ same as thinbasic Dir_GetCurrent returns DOS BOX Current Directory %CD% if you start SPFLite without a file active . It is set by SPFLite to path of Last file Opened during Restart or File Open . I think it's not used for other actions . It can be set by thinbasic DIR function's in SPFLite macros . What you can't do in SPFLite Edit Macro is to change FMGet_FilePath$ . ( f.e to Last Opened file Path ) It can only be done by "Command Injection" with thinbasic Sendstring Pgm . (forgive me George that i'm doing that) Here an example from macro where inl is Path .
ecmd = " ""{BS}"+inl+"{ESC}{BS}*.*{ESC}{ENT}{Home}SWAP PRIOR{ENT}""" ' Path/Name and Patterns for 2.4 and up with swap back
SPF_EXEC("cmd /C MUE2T.exe "+hWnd+ecmd) ' executed after next line
SPF_Post_Do("(Home)(EraseEOL)[rc Filepath](Enter)") ' select FilePath
|
|
|
Post by George on Dec 14, 2022 11:34:38 GMT -5
Hmmm, never noticed there was no SET for the FM FilePath and Mask fields.
I can probably create these simply. FMSet_FilePath and FMSet_FilePattern
MUEH: Thanks for spotting the Set-cursor-position toggle. Makes sense, hard to mouse click anywhere if you don't position there first.
George
|
|
|
Post by George on Dec 14, 2022 14:05:00 GMT -5
No, not nuts. We've just created a very complex little beastie with all kinds of wrinkles. Many of which even WE aren't aware of.
George
|
|
|
Post by George on Dec 14, 2022 18:00:41 GMT -5
Robert: I looked and it seems the Doc. could do better (not that anyone will ever see it). In working with FM the Right-Click context menu section should state that it's only available if it hasn't been changed in KEYMAP and still has the 'Set cursor position' attribute.
Who knew?
George
|
|
|
Post by George on Dec 15, 2022 10:00:20 GMT -5
Robert: As you are well aware, almost anything is POSSIBLE. But having RMB available on ONE item in the Header lines for a single custom command, with no hint or labelling, just an 'if you're in the know, you can do this' is wrong. So - no.
George
|
|
|
Post by George on Dec 15, 2022 12:50:03 GMT -5
Robert: I agree, I use RMB for whatever suits my current editing task. Don't like Context Menus within SPFLite anyway, but someone asked and it was an interesting learning exercise.
George
|
|