Automating Adobe Illustrator with GPT4 : A GPT-4 Scripting Tutorial | Part 01

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back guys welcome back to my channel in  this video I will show you guys how I use chat GPT   and created a script where you can customize and  automate your process in this example basically   I have a background artwork and a text message in  here and the date text in here so basically what   I want to do with this is every week let's say in  my company I need to post something to our social   media right so this will start from Monday to  Friday by posting something like good morning   messages okay so every time I need to go in and  create a background and a good morning message   and I need to enter the date and Export it to a  PNG image then post it into social media what I   want to do is I want to make this as a script and  automate the process okay please note everything   in here is created with chat GPT even the messages  script and also the UI part which I am going to   show you guys let's go in here you can see I have  asked the gbd to create some good morning messages   between 100 characters okay so first I'm going  to just copy these messages all right and then   I will go into the AI illustrator file and in here  I'm going to load the script which we have created   which we are going to create in here I already  created and I'm just going to open the script all   right so now there is a message popping up in here  we have to paste the messages okay I just paste   these messages you can see we have five messages  which I have copied from the judge ability all   right and then below we need to till the starting  date which is the Monday uh starting date is 22   and the month is going to be May and the year  is going to be 2023 and then I simply say okay   now you guys can see it's printing our message  below it's adding in our date and it also changing   the artwork if I go back into my files in here  you can see we have the message this message is   actually created by chat jpd also you can see  the first message is same as this one and then   the second one is this message and the third one  is this and all five messages are here with the   all five dates for the next week all right so now  I'm going to show you guys how I created in three   parts the first two part the first part I will  show you guys how to create messages and use   illustrator layers to embed those messages and  the date and in the second video I will show you   guys how to change the background image and in the  third video I will show you guys how to use the UI   but the third video is going to be in the members  only section all right guys okay let's get started together [Music] all right guys so first  I will show you guys how my artwork is   right now basically I have three main layers in  illustrator and I have placed the background in   one layer which is the background layer so you  can have any background in here and then I have   the message which is this text in here inside the  message layer and then I have created another text   on top and for this I rename this layer as did  for the main layer and the sub layer as date I   can guarantee you guys when you use stat GPT for  scripting it's never going to work in the first   time you have to do a lot of fixing okay that's  the whole point of creating this tutorial and you   guys can see how I fix this and you can use the  same thing for your future artworks as well all   right okay so let's go back to the church GPT in  here first I want to create good morning messages   okay so create file good morning messages  uh keep it less than under yeah right first   uh ignore the spelling mistakes all guys all those  things you don't need to worry make it uh related   to crypto people all right so let's say I'm  working in a crypto firm and I want to create   good morning messages I can just say uh make it  related to crypto people so you can do it for any   type of Industry all right okay then enter let's  wait for it to create five good morning messages all right so you can see in here it has created  Five good morning messages and also it made it   related to crypto people for some reason it's  a crypto minus you guys can improve on these   things I'm not uh going to tell you guys how to  create a prompt to get these better but let's   use this for our scripting all right and then  the second part is the main prompt it's better   for you guys to always create a new document  text document and type it in there in that way   you can keep improve the problem and also you  can reuse them again and again all right so in   here what I created first is first I'm describing  the illustrator file okay so what I am basically   doing is I need you to help on creating a script  for Adobe Illustrator okay and then I say I have   three layers I should have say I have three main  layers okay you can see I have three main layers   and then I describe the layers number one date  layer which is this one and message layer second   one and the design layer and then on the date  layer I have a sub layer sub text layer called   Date which is did one and then on the message  layer I have a sub text layer called message   which is this one okay and then I also giving  it the structure okay I can just structure so it will have a better understanding and also  I'm going to add in one more line specifically   for the elastator this is really really helpful  guys because elastic layers work differently   from Photoshop if you want to create this  for Photoshop it's really really easy you   can type most of the time it will work but  for illustrator for some reason it doesn't   always work so you can tell put this line in  here I'm just going to say please remember layers look different from Photoshop okay I'm  just adding in this line for a reason this can   be really really helpful to save a lot of time  okay and then I already described my file and then   below I'm telling what I want okay so what I want  is in message text sub layer okay I want the good   morning messages which you have created above okay  and then in the date text sub layer I don't need   text in here I want the date in this format Monday  first January 20th so basically the day and date a   month and year okay and then I want to have five  of the above messages in five different PNG files   this should be on the message layer so you replace  the message text which is this text in here   with your good morning messages okay for the date  I want to start from 22nd May to 26 Friday okay   and then here I'm giving them the specific size  each file I want to save as 150 DPI PNG file with   original artwork size save it next to the original  artwork okay that's it uh these things we don't   need I'm just going to copy these all of these  and go back to the tab TPT and paste it in here   all right okay so we have given 30pt  what to do and it's already understood   the requirements and it's creating the  scripts file for us to use in illustrator all right so it has created the script for us  in here it says understood the requirements   and it's created the Javascript file for it to  use in the script and also is giving you a node   please note this is the basic script and may  require further customization definitely you   need for the customization but first i'm going  to copy this in here you can if you if you can   also ask the GPT to how to use the file but uh you  don't have to you just need to go in and open the   notepad in here and I'm going to paste this one I  can guarantee you guys this one will not work if   it works it's really a miracle okay so I'm just  going to save this one as GM dot j j s x okay X   all right and save it okay now let's uh go  to illustrator in here go to file and script   and in here select the other script which  will open up uh your Explorer and in here   select this one so this is the file like we  have created and open yes so it didn't work   as you guys can see it's saying there is  no such element line five what the layer go in here I'm just going to select  OK let's minimize this I'm going to   place it in here and the GPT one I'm going  to place it on the left okay so let's open   this one again okay go to script other script I'm  going to load the script again which is this one   okay so it's giving this error message I'm just  going to type in here I'm getting this error 1302 no such elements and then line five okay let's see what it says okay so in here what it says is it seems that  there might be an issue with locating the layer   or text frame by their name Adobe Illustrated  JavaScript is is sensitive so please ensure the   name in The Script match the layer name in your  listed exactly also verify that the layers and the   text frames are unlocked and visible all right if  you still face the same error let's replace here   name by name with the text frame 0 assuming there  is only one text frame in each main layers let's   also add some error checking okay it has modified  the code and also there is error checking now so   instead of just getting this error message we will  get the alerts like this okay which is good so I'm   just going to copy this again and go in here  I'm going to select everything and paste now   uh I'm going to save as uh I recommend you guys  if you use Windows notepad always do a save as   instead of save sometimes when you save for some  reason it doesn't save so maybe you are using the   old code without your knowledge so I'm just going  to save as this and yes now I'm going to go in and   go to the script other script and let's open the  file again all right successful so you can see   it has created our file in here and it  has replaced the messages and also the   date and if you go into the source file in  here you guys can see it has created there   messages in five different files you  can see each message is based on the   good morning messages in here and then also the  day all right so once you have created this file   all you need to do is go in here replace this  good morning messages with the good morning   messages you create every week using the GPT  or you can type your own message and then in   here you can select the dates okay so Monday to  Friday you just need to change the date and the   month all right so that's all about for the part  one of this video in the part two I will show you   guys how you can change the background images as  well okay and in the part three instead of using   the script like this I will show you guys how you  can create a UI user interface input data and the   date like you guys saw on the example earlier all  right part three is going to be on the membership   video part two you guys can watch it for free  okay all right guys see you guys in the part two
Info
Channel: Digital Art Creation
Views: 6,925
Rating: undefined out of 5
Keywords:
Id: TWTMANRkUkc
Channel Id: undefined
Length: 14min 45sec (885 seconds)
Published: Sat May 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.