Choix imprimante

Bonjour,
J’ai 2 imprimantes à ma disposition et je dois imprimer sur l’une d’entre elles seulement.
y-a-t-il une instruction dans Xojo pour choisir celle que je veux sans passer par “OpenPrinterDialog”, donc de paramétrer ce choix.

Merci

Il te faut chercher chez Apple (MacOS) ou Microsoft (Windows); à moins que tu roules en Linux ?

MacOS

Tu peux probablement trouver ce que tu cherches ici:

something like this should work

dim myShell as new shell
  
#if TargetMacOS or TargetLinux
  myShell.Execute "lpoptions -d "+aPrinterName
#Elseif TargetWindows
  myShell.Execute "wmic printer where name='"+aPrinterName+"' call setdefaultprinter"
#endif