How to use app intergration for MAC?

Status
Not open for further replies.

Jbotman

Forum User
Joined
Sep 13, 2019
Messages
12
Reaction score
1
Hello,
Im using .bat files to open a popup when an incoming call is received.
This works fine on windows, but I want it to work for MAC too.
The batch code looks like this:
Code:
set string1=%1

If NOT "%string1%"=="%string1:+=%" (
start "Chrome" chrome --app=https://website.com?phone=%string1:+=%
) else (
 start "Chrome" chrome --app=https://website.com?phone=%string1%
)

Can anyone explain what to do If I want to build the same for MAC?
MAC can't import bat files.
 
Hello,
Im using .bat files to open a popup when an incoming call is received.
This works fine on windows, but I want it to work for MAC too.
The batch code looks like this:
Code:
set string1=%1

If NOT "%string1%"=="%string1:+=%" (
start "Chrome" chrome --app=https://website.com?phone=%string1:+=%
) else (
 start "Chrome" chrome --app=https://website.com?phone=%string1%
)

Can anyone explain what to do If I want to build the same for MAC?
MAC can't import bat files.
Use a Bash or Shell script (.sh). Search Internet, there are plenty of possibilities. You can also use AppleScript.
 
Is that possible to create on windows?
I don't have an mac by myself.
 
Is that possible to create on windows?
I don't have an mac by myself.
Yes, use Notepad++ to get syntax highlighting.

Your script is pretty basic so converting to Shell shouldn't be too hard. You can test the script on Windows using either PowerShell (in some cases), WSL or Git Bash.
 
Im not familliar with Shell at all, also I cannot find anything on the internet that explains it for beginners.
I created an .sh file with the following content
Code:
xdg-open https://website.com?phone=%1
But it doesnt work when I run it with Git bash.
 
Im not familliar with Shell at all, also I cannot find anything on the internet that explains it for beginners.
I created an .sh file with the following content
Code:
xdg-open https://website.com?phone=%1
But it doesnt work when I run it with Git bash.
xdg-open? Just use open. No it won't work with xdg, it's a Mac thing.
 
Ok thanks tried that but it says
open: command not found
Any other idea's or idea why that is occuring?
 
Ok thanks tried that but it says

Any other idea's or idea why that is occuring?
Try simply calling chrome <url>. Mine works like that but Git Bash might not work for this, I'd recommend testing with WSL or PowerShell.
 
The %1 is also not replaced in .sh file the parameter stays %1
Any idea how to use these parameters in shell?
 
The %1 is also not replaced in .sh file the parameter stays %1
Any idea how to use these parameters in shell?
$1 if I remember correctly
 
I got it working on windows :)
But my colleague says that this .sh file can't be opened with the 3cx application on his mac?
 
I got it working on windows :)
But my colleague says that this .sh file can't be opened with the 3cx application on his mac?
You don't open the file via 3CX app. You open it directly (normally runs via Terminal). Your script just opens a URL.
 
Isnt there any way to make this .sh file run when there is an incoming call?
 
Isnt there any way to make this .sh file run when there is an incoming call?
Not really but you can make your own CRM integration, so why use a script?
 
Because we already created an intergration on the url we are opening with the script, the intergration is based on opening an url on incoming calls.
We don't have the supplies to do it in another way, so if its not possible to run this file on incoming call then our integration will not work on MAC
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,476
Latest member
awan05