Need little help of script.

Explorer ,
Oct 21, 2020 Oct 21, 2020

Copy link to clipboard

Copied

i has this two line of script,

can i combine into just one line? Thanks.

app.selection[0].texts.item(0).contents = markTransport_array[0]; app.selection[0].texts.item(-1).parentStory.appliedFont = "abud4hsym";

TOPICS
Scripting

Views

103

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 21, 2020 Oct 21, 2020

Copy link to clipboard

Copied

Do these text elements point to different objects? What are you trying to do? Can you give some screenshots for reference?

-Manan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 22, 2020 Oct 22, 2020

Copy link to clipboard

Copied

HI,

 

Similar to above, why are you wanting it in one line? What are you trying to achieve by doing that?

 

Regards

 

Malcolm

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 22, 2020 Oct 22, 2020

Copy link to clipboard

Copied

LATEST

i think you can use item(0) only, somthing like this:

app.selection[0].texts.item(0).parentStory.properties = {
	contents:'text',
	appliedFont: app.fonts[0],
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines