I’m launching thunderbird on mac os from Xojo, actually I compose the message like this
Dim sh as new shell
Dim command as String
command ="/Applications/Thunderbird.app/Contents/MacOS/thunderbird -compose to=‘firstname.lastname@example.org’,subject=‘dinner’,body=‘How about dinner tonight?’,attachment=file:///’/Users/Desktop/Temporals/File.pdf’"
it works fine but there is a problem. The xojo program does not continue running until thunderbird is closed. Is there anyway to continue program running without exit Thunderbird. I understant that the issue will be any program.
If that is the only code in your program… what do expect “continue to run” to be doing?
The shell command will spawn Thunderbird, and both Xojo and Thunderbird will run until such time as they have deemed there function complete. Not sure what else you expect?
I’m sorry I didn’t explain very well. I mean the xojo program remains frozen util thunderbird is not closed.
It sounds like you want to run the Shell in Asynchronous mode so that it does not wait for the command to finish.
Yes, it is. this is that I want
Unfortunately shell doesn’t launch thunderbird in mode = 2 nor mode = 3.
open /Applications/Thunderbird.app --args --compose to=‘email@example.com’,subject=‘dinner’,body=‘How about dinner tonight?’,attachment=file:///’/Users/Desktop/Temporals/File.pdf
OPEN(1) BSD General Commands Manual OPEN(1)
open – open files and directories
open [-e] [-t] [-f] [-F] [-W] [-R] [-n] [-g] [-j] [-h] [-s sdk]
[-b bundle_identifier] [-a application] file … [–args arg1 …]
Thank you Horst Jehle.
open -a /Applications/Thunderbird.app/Contents/MacOS/thunderbird --args --compose to=‘firstname.lastname@example.org’
it works fine as log as thunderbird is not running.
if thunderbird is running the “compose” is not working it does nothing. Any idea ?
Use additional argument “-n”
see man open:
-n Open a new instance of the application(s) even if one is already run-
If you’re just trying to compose an email you can use ShowURL and the url for emails. The only thing it can’t do is attach files.
Also you can start the application in the background:
-j Launches the app hidden.
@Jaume Jaume - have you tried putting a & at the end of your original command?