TSE: Linux: Pressing <TAB> in File Open gives consistently always 'Path not found'

5 views
Skip to first unread message

knud van eeden

unread,
May 29, 2024, 6:23:03 PMMay 29
to SemWare TSE Pro Text Editor
So I created in a few minutes a quick TSE macro to capture all the files in the directory.

The idea was to create and running 2 macros successively:

1. Capture all filenames in the current folder:

 PROC Main()
  ExecMacro( Format( "capture", " ", "for file in *; do echo ", '"$(pwd)/$file"', "; done" ) )
 END

2. Then select by moving your cursor to the full filename of choice and selecting that current line, then copy that line (=GetText()) to the Microsoft Windows clipboard or similarly to the TSE clipboard and then pasting it in the e.g. open file dialog box.

 PROC Main()
  CopyToClipboard( Trim( GetText( 1, 255 ) ) )
 END

3. But issue shows then to be that I can *not* paste in the dialog box, not from the TSE clipboard (e.g. using <Grey*> and not from the Windows clipboard (e.g. using <SHIFT><Ins> or <CTRL><V>).

Or can I somehow paste in a way that is not known yet?

4. Note: A rather convoluted I could think of as workaround if pasting is impossible at this moment is to add that line to the TSE 'History()' and then use that to transfer the full filename into the dialog box, as one seems to be able to select the old filenames from history.

Thanks
with friendly greetings
Knud van Eeden


On Wednesday, May 29, 2024 at 07:30:18 PM GMT+2, knud van eeden <knud_va...@yahoo.com> wrote:


> The workaround which Semware proposed was thus to use e.g. Capture() which fetches the output
> of the Linux 'ls' (=LiSt) command and present that output (after formatting) to the user instead to choose from.
> That would in general a general workaround which lets it work on any Linux system, be it WSL or not-WSL (=native).

Ideas:

So some testing about this, capturing this expression gives the full filepaths in the current directory:

This lists all files in the current directory with their full paths:

 for file in *; do echo "$(pwd)/$file"; done

Steps to reproduce:

1. Run TSE Linux version 4.50 RC24

2. menu 'Util' > 'Capture OS Output <AltShift F9>'

3. Fill in the box:

for file in *; do echo "$(pwd)/$file"; done

4. You will capture an output of all full filenames in that directory

5. For example:

/mnt/c/TEMP/DDDLINUX24/tse/23034
/mnt/c/TEMP/DDDLINUX24/tse/colors.ini
/mnt/c/TEMP/DDDLINUX24/tse/compile.dat
/mnt/c/TEMP/DDDLINUX24/tse/doc
/mnt/c/TEMP/DDDLINUX24/tse/e
/mnt/c/TEMP/DDDLINUX24/tse/f.dat
/mnt/c/TEMP/DDDLINUX24/tse/help
/mnt/c/TEMP/DDDLINUX24/tse/mac
/mnt/c/TEMP/DDDLINUX24/tse/potpourr.dat
/mnt/c/TEMP/DDDLINUX24/tse/read.me
/mnt/c/TEMP/DDDLINUX24/tse/read.me.linux
/mnt/c/TEMP/DDDLINUX24/tse/sc32
/mnt/c/TEMP/DDDLINUX24/tse/synhi
/mnt/c/TEMP/DDDLINUX24/tse/template.dat
/mnt/c/TEMP/DDDLINUX24/tse/tse.ini
/mnt/c/TEMP/DDDLINUX24/tse/tsefiles.dat
/mnt/c/TEMP/DDDLINUX24/tse/tsehist.dat
/mnt/c/TEMP/DDDLINUX24/tse/tsestate.dat
/mnt/c/TEMP/DDDLINUX24/tse/tsesynhi.dat
/mnt/c/TEMP/DDDLINUX24/tse/tsort.com
/mnt/c/TEMP/DDDLINUX24/tse/ui

6. Thus having such an output implemented so that the customer can select the full filename from that list 
   would already be a big step forwards.


with friendly greetings
Knud van Eeden

Inline image

knud van eeden

unread,
May 29, 2024, 6:35:02 PMMay 29
to SemWare TSE Pro Text Editor
That workaround actually works:

First get the list of files:

 PROC Main()
  ExecMacro( Format( "capture", " ", "for file in *; do echo ", '"$(pwd)/$file"', "; done" ) )
 END

Then add the chosen filename to the TSE history

 PROC Main()
  // CopyToClipboard( Trim( GetText( 1, 255 ) ) )
  AddHistoryStr( Trim( GetText( 1, 255 ) ), _EDIT_HISTORY_ )
 END

3. Then select the chosen filename from the TSE history
(by using the CursorDown() key and <ENTER>)


knud van eeden

unread,
May 29, 2024, 7:20:13 PMMay 29
to SemWare TSE Pro Text Editor
So this rather crude workaround (similar could maybe be implemented natively into TSE for Linux) 
will at least avoid having to manually type all kind of long filenames all the time:

1. First run the capture macro and supply the directory to get all the full filenames:

 PROC Main()
  STRING s1[255] = "/mnt/c/TEMP/DDDLINUX24/tse/"
  IF ( NOT ( Ask( "directory to capture all its files = ", s1, _EDIT_HISTORY_ ) ) AND ( Length( s1 ) > 0 ) ) RETURN() ENDIF
  ExecMacro( Format( "capture", " ", "cd", " ", s1, " ", "&&", " ", "for file in *; do echo ", '"$(pwd)/$file"', "; done" ) )
 END

2. Then move the cursor in the list of full filenames of that directory to select the current line as filename and add it to the history

 PROC Main()
  // CopyToClipboard( Trim( GetText( 1, 255 ) ) )
  // CopyToWinClip( Trim( GetText( 1, 255 ) ) )
  AddHistoryStr( Trim( GetText( 1, 255 ) ), _EDIT_HISTORY_ )
 END

3. Then select the file from TSE history using the CursorDown key and pressing <ENTER> to select the filename.



Reply all
Reply to author
Forward
0 new messages