How to get the current running mlx filename?
Ältere Kommentare anzeigen
Hi, I'm trying to obtain a livescript's filename during its execution...
I've tried using mfilename as it works for regular scripts but when I use it with a .mlx it outputs : "LiveEditorEvaluationHelperEXXXXXXXXXX" with X being a series of digits.
I've also tried using fileparts but it only works with an open file, and I don't necessarily want to open my scripts before running them.
Would anyone know a work-around or a different way of obtaining a livescript's name during its execution?
1 Kommentar
Rik
am 15 Okt. 2024
Unfortunately, as fas as I can tell, there is no general way.
You can use the editor to report the currently opened file, but that only works if the currently running live script is indeed the the active file in the editor.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Live Scripts and Functions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!