FilePath$ = #DQUOTE$+ OpenFileRequester("","","",0) +#DQUOTE$
; Enclosed in #DQUOTE$ for paths with spaces etc…
RunProgram("open",FilePath$,"") ; Will open as if double-clicked
; Paths with double quotes will not open!
No way to escape double quotes on RunProgram parameter!!!
Other problems (Mac M1 Monterey): No Sound!!!
Toolbar: no text, keeps customization only if made on prefs…
// Moved from "Bugs - Mac OSX" to "Coding Questions" (Kiffi)
Last edited by Piero on Wed May 03, 2023 4:50 am, edited 2 times in total.
BarryG wrote: Sun Apr 30, 2023 10:27 amWhy have you got "open" there? That's not the file from OpenFileRequester().
I used "open" so you can test the RunProgram parameter bug.
open is a "Terminal Command" to open files (like a Finder double-click) used here with the file from OpenFileRequester() as parameter.
BarryG wrote: Sun Apr 30, 2023 11:21 am
Okay, that answers that. But you don't have to come in here as a newbie and start yelling at us in big text.
Now, does this topic help your question? -> viewtopic.php?t=68147
Forgive me for the "yelling".
No, that doesn't help; the problem is not the program, it's the parameter string.
mk-soft wrote: Sun Apr 30, 2023 11:35 am
Please move to 'Code Question'
Why please? I consider this a bug... try open a file named 'this "is" text.txt' with the code above and you will see…
Same applies if the containing folder has double quotes on name...
mk-soft wrote: Sun Apr 30, 2023 11:45 am
Welcome Piero
The bug forum pages are about bugs found in the IDE or compiler. But only after confirmation from experienced users.
Hi! I'm "experienced" in this kind of stuff (but I can make mistakes…)
PLEASE test and tell me, but believe me: do not waste too much time trying to escape the string… I tried all I could…
Many thanks for the solution!!!
But I still consider it a bug, because it affects the parameter string, e.g. if you want to run program osascript with parameter "tell app "Finder" to activate"... or any other "Console" command that needs double quotes on parameters...
mk-soft wrote: Sun Apr 30, 2023 12:46 pm
I don't see it as a bug, as a problem.
Double quotes is always the indication that the following parameter contains blanks and interpreted within double quotes as a single parameter.
Then let's see it as a BIG problem that just needs at least one way to "escape" double quotes for some "console commands"...
…like this "Terminal Magic":
open "/Users/user/Desktop/New Folder/'this \"is\" text'.txt"