Skip to content

Instantly share code, notes, and snippets.

@moluapple
Created June 21, 2011 09:21
Show Gist options
  • Save moluapple/1037513 to your computer and use it in GitHub Desktop.
Save moluapple/1037513 to your computer and use it in GitHub Desktop.
Funny Time!
/**********************************
* 提示、警告框,模拟切入淡出效果
* for Adobe Illustrator, Indesign
**********************************/
#targetengine 'session';
var
i = 0,
s = $.screens[0].toString().split ('-')[1].split(':'),
len = s[0]/10,
y = s[1]/2 - 158,
w, img;
w = new Window ('palette', undefined, undefined, {borderless: true});
img = w.add ('image', undefined, File(app.filePath + '/(InDesign Resources)/idrc_PNGA/294.idrc'));
w.margins = [0,0,0,0];
img.addEventListener('click', function (){w.close(0); w = null});
w.location = [0 , s[1]/2 - 158];
w.show();
while (i < len && w != null){
$.sleep (20);
w.location = [i * 10, y];
w.opacity -= 0.002;
++i;
}
w.close();
@moluapple
Copy link
Author

Test with Indesign CS5, Win7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment