Adobe 12040118 - After Effects Standard Using Manual page 194

Using help
Hide thumbs Also See for 12040118 - After Effects Standard:
Table of Contents

Advertisement

Help
Using Help
a p p. s e t t i n g s . s aveS e t t i n g ( " E m a i l S e t t i n g s " , " Re n d e r Rep o r t
Re cipient", toValue);
}
}
Dialogs and console
This script shows how to use the various dialogs (alert(), prompt(), confirm()) and how to write to the info
palette (write(), writeLn() and clearOutput()). Although this script serves no practical use, these dialogs and
info palette prompts are highly useful and should be familiar to all script creators.
/ / Us e con fi r m ( ) to l e t t h e u s e r te l l u s w h e t h e r h e c a n s e e t h e " i n f o " w i n d ow.
// Depending how the user clicks, t r ue or false is re tur ned.
if (confir m("Can you see the \"info\" palette?")){
// Star t by clear ing the infor mation area.
clearOutput();
// w r ite and w r iteLn w ill w r ite to the info tab w ith or w ithout a
/ / ' n e w l i n e '
// at the end.
w r ite("Roses a re re d, ");
w r iteLn("v iolets are blue");
w r i te ( " Su g a r i s s we e t , " ) ;
w r iteL n("a n d so is E qu a l.");
var reply = prompt( "Did you like my poem?");
if (reply == "yes" || reply == "YES"){
aler t("See the info w indow for a special secret for tune.");
// This gets r id of the old w r iting on the info tab.
clearOutput();
w r iteLn("You have a future as a liter ar y cr itic.");
}
e l s e {
aler t("Hmm, I'll t r y once more...");
w r iteL n(".. ... .." );
w r iteLn("Roses are re d, v iolets are blue,");
w r iteLn("I've got some gum, on the sole of my shoe.");
}
aler t("Okay, all done w ith this test.");
}
e l s e {
// aler t() just displays a message in a dialog box.
ale r t("P lea se ma ke it so you ca n se e t h e in f o palet te and r un t hi s sc r ip t
a g a i n " ) ;
}
Using Help
Examples
Back
194
Back
194

Advertisement

Table of Contents
loading

This manual is also suitable for:

After effects

Table of Contents