Copy link to clipboard
Copied
I am giving the user the ability to type in a field. IF they enter something in the field I am needing feedback in order to make corrections. I am wanting the script to open an email with some details filled in already. Make it simple to give/get feedback. Is there a way within Javascript in Illustrator to do that?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
When on OS X think of curl that could be executed with the command line by AppleScript.
( See section 3 Email protocols )
Also possible, not tested with a mail protocol, use PhotoShop's app.system() function to call curl on Mac OS X or perhaps a similar service on WIndows. Search the web for samples. FWIW: You could access PhotoShop via ExtendScript's BridgeTalk module.
Just to give you some ideas from the InDesign scripting side by Marc Autret what's possible with e.g. curl on Mac OS X, also something else for Windows: Re: [ANN] IdExtenso: InDesign JSX Framework
Regards,
Uwe
Copy link to clipboard
Copied
I am using a Windows 10 PC and running Illustrator Crative Cloud (I believe version 23?)
Copy link to clipboard
Copied
You can try to write an html file with javascript in it and see if executing this file would accomplish your needs.
Copy link to clipboard
Copied
Found the EmailWithAttachment.jsx script on my disk under:
applications > Adobe ExtendScript Toolkit CC > SDK > Samples > javascript
Did not look thoroughly through it. Description at the top of the code:
Shows how to use the Socket object to send emails with attachments using ExtendScript.
Also this:
This sample sends a single email message at a time, and blocks the main thread until the message has been sent. You should select small files (under 100Kb) to send. For a non-blocking example, suitable for sending larger files, see BackgroundEmailer.jsx available in the Bridge SDK samples.
Regards,
Uwe
Copy link to clipboard
Copied
Please be aware that Illustrator has no Socket object, so any such magic would likely have to be sent over via BridgeTalk to an application which has Socket support - I'm not sure which ones don't have it besides Ai - most often I would use Bridge since it's free and everyone's likely to either have it installed or at least available.
Copy link to clipboard
Copied
Hi Silly-V ,
Socket is part of the Core JavaScript Classes that come along with ExtendScript.
Documented by Jongware e.g. here:
Regards,
Uwe
Copy link to clipboard
Copied
It may be so, but it's not going to work inside Illustrator vanilla-style - check out these results:
function test(){
try {
var s = new Socket;
alert(s);
} catch (e) {
alert(e);
}
};
test();


Find more inspiration, events, and resources on the new Adobe Community
Explore Now