Page 1 of 1

RunProgram() on MacOS (arm64) [SOLVED]

Posted: Wed May 01, 2024 7:50 pm
by tikidays
Hi, recently RunProgram stopped working on the MacOS compile, and I dont know why, it may have been linked to the recent 6.10 LTS update. The Windows component still functions. Can some one verify this for me?

Code: Select all

CompilerIf #PB_Compiler_OS = #PB_OS_MacOS 
	RunProgram("open","http://www.google.com/","")
CompilerElseIf #PB_Compiler_OS = #PB_OS_Windows
	RunProgram("http://www.google.com/")
CompilerEndIf
                              

Re: RunProgram() on MacOS (arm64)

Posted: Wed May 01, 2024 9:40 pm
by Mindphazer
Your code works fine on my MacBook Pro M1 (PB 6.10, MacOS 14.4.1)

Re: RunProgram() on MacOS (arm64)

Posted: Thu May 02, 2024 4:59 am
by Piero
Try this (httpS needed?)

Code: Select all

RunProgram("/usr/bin/open", URLEncoder("https://www.google.com/"), "")
Write on Terminal:

which open

Result should be: /usr/bin/open

Re: RunProgram() on MacOS (arm64) [SOLVED]

Posted: Thu May 02, 2024 10:06 am
by tikidays
Thankyou! It was the URLEncoder() I was missing.

Re: RunProgram() on MacOS (arm64) [SOLVED]

Posted: Thu May 02, 2024 11:16 am
by Piero
Generally speaking (this was only for URLs) on Mac runprogram has some problems with the parameter string, but there is a Workaround