Copy link to clipboard
Copied
Bonjour à tous,
J'ai créé un script qui me permet de choisir quel document ouvrir. Mon problème est que j'aimerais que ce script s'éxécute automatiquement dès le lancement de Illustrator quand aucun document n'est encore ouvert.
Bonne journée
PM
create a Startup Scripts folder in the default Illustrator folder and place the scripts you want to run there
C:\Program Files\Adobe\Adobe Illustrator 2023
more info on startup scripts here
https://ai-scripting.docsforadobe.dev/introduction/executingScripts.html
Copy link to clipboard
Copied
Mac or PC?
Copy link to clipboard
Copied
Hi @Met1 I'm on PC windows 11 Illustrator 26.0.3
PM
Copy link to clipboard
Copied
Take a look at 4 here - https://www.guidingtech.com/top-ways-to-run-apps-at-startup-on-windows-11/
I don't know how to do it, but it's possible you can have a PowerShell script launch Illy and then your script.
Copy link to clipboard
Copied
create a Startup Scripts folder in the default Illustrator folder and place the scripts you want to run there
C:\Program Files\Adobe\Adobe Illustrator 2023
more info on startup scripts here
https://ai-scripting.docsforadobe.dev/introduction/executingScripts.html
Copy link to clipboard
Copied
Ah! I was over-complicating it, I thought we needed to script Illy opening too.
Copy link to clipboard
Copied
it happens, you were going the generally speaking way (which it may work) but illustrator has a way to natively handles startup scripts.
Copy link to clipboard
Copied
Merci beaucoup @CarlosCanto ça fonctionne !
Est-il possible d'uniquement et seulement déclencher le script lors du démarrage d'illustrator? Pour le moment mon script se lance automatiquement lors du démarrage mais il se lance aussi automatiquement dès que j'ouvre un fichier sr Illustrator, j'aimerais qu'il ne s'ouvre qu'une seule fois lors de l'ouverture.
Merci aussi @Met1 pour votre aide.
PM
Copy link to clipboard
Copied
Hi @polotrobo, I tested putting a script alert('hello') into the startup scripts folder and when I ran the script it executed twice—once immediately on launch, and then again when Illustrator displayed the "Suggestions/Recents" window/dialog. It didn't show it at any other time that I could trigger. I'm on MacOS 13.1, Illustrator 27.2. (I also tried the Application-specific startup scripts folder and the behaviour was the same.)
So obviously the second execution is a bug, but the script could check the timestamp and ignore the second one I guess. But you are on Windows so it's quite possible your experience is different.
- Mark
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more