RunProgram() on MacOS (arm64) [SOLVED]

Just starting out? Need help? Post your questions and find answers here.
User avatar
tikidays
User
User
Posts: 46
Joined: Tue Oct 24, 2023 6:47 am
Location: New Zealand
Contact:

RunProgram() on MacOS (arm64) [SOLVED]

Post 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
                              
Last edited by tikidays on Thu May 02, 2024 10:07 am, edited 1 time in total.
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: RunProgram() on MacOS (arm64)

Post by Mindphazer »

Your code works fine on my MacBook Pro M1 (PB 6.10, MacOS 14.4.1)
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: RunProgram() on MacOS (arm64)

Post 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
User avatar
tikidays
User
User
Posts: 46
Joined: Tue Oct 24, 2023 6:47 am
Location: New Zealand
Contact:

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

Post by tikidays »

Thankyou! It was the URLEncoder() I was missing.
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

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

Post by Piero »

Generally speaking (this was only for URLs) on Mac runprogram has some problems with the parameter string, but there is a Workaround
Post Reply