Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕
Pizza...

Joonas Pääkkö joonaspaakko

🍕
Pizza...
View GitHub Profile
View Resize all layers ( Photoshop script )
/*
This script resizes every layer within the active document.
How to use:
- Photoshop script ( cs3+ )
- Put in {photoshop_root}/presets/scripts/Resize Each Layer.jsx
- Run from: File > Scripts > Resize Each Layer
- ..or save the file where ever you want and run from there with: File > Scripts > Browse...
@joonaspaakko
joonaspaakko / Photoshop - Selected Layer Comps to PSD
Last active Aug 29, 2015
Helps you save selected layer comps as a single psd file.
View Photoshop - Selected Layer Comps to PSD
/*
Author: https://github.com/joonaspaakko
Gist: https://gist.github.com/joonaspaakko/09e8e2a218038e15344d
<javascriptresource>
<name>Menu=Selected Layer Comps to PSD...</name>
<category>layercomps</category>
</javascriptresource>
@joonaspaakko
joonaspaakko / Check Master Page Numbers v.2.2.jsx
Last active May 11, 2020
Indesign script that generates a text file with information on which pages each master page is applied to.
View Check Master Page Numbers v.2.2.jsx
// Version 2.2
// https://gist.github.com/joonaspaakko/efc6eb11759965d54b20
// *************
// Changelog:
// *************
// v.2.2.
// - Changed some of the wording in the output.
//
// v.2.1.
@joonaspaakko
joonaspaakko / Export document for each layer inside selected group.jsx
Last active May 11, 2022
Photoshop script that saves the whole document for each top level layer inside the selected group.
View Export document for each layer inside selected group.jsx
// Name: Export document for each layer inside selected group.jsx
// Formerly: Export Layers Inside Selected Group.jsx
// Description: Photoshop script that saves the whole document for each top level layer inside the selected group.
// Image example: https://user-images.githubusercontent.com/1164476/49152494-aef8af00-f31b-11e8-80ff-d774e3103eae.png
// https://gist.github.com/joonaspaakko/013a223e94ba0fb9a2a0
#target photoshop
@joonaspaakko
joonaspaakko / Duplicate a group & Unlink Smart objects inside.jsx
Last active Apr 9, 2020
Script for photoshop that duplicates layers or groups and unlinks any possible smart objects.
View Duplicate a group & Unlink Smart objects inside.jsx
View Launch application from AI.jsx
// Launch application from Illustrator
var external_app = new File("/Applications/Better Rename 9.app");
external_app.execute();
View Duplicate and separate linked smart objects.jsx
// https://gist.github.com/joonaspaakko/ace1ec3455b6959dc611
#target photoshop
// If there are any documents open, run the code...
// =================================================
if ( app.documents.length > 0 ) {
// Used later on when the layers are duplicated back to the original document.
// ===========================================================================
@joonaspaakko
joonaspaakko / Illustrator convert to legacy.jsx
Last active Mar 23, 2022
Finds all Illustrator files from the input folder + its subfolders and converts them to an older version.
View Illustrator convert to legacy.jsx
// https://gist.github.com/joonaspaakko/df2f9e31bdb365a6e5df
// Finds all .ai files from the input folder + its subfolders and converts them to the version given below in a variable called "targetVersion"
// Tested in Illustrator cc 2014 (Mac)
// Didn't bother to do a speed test with my macbook air...
#target illustrator
// If set to false, a new file will be written next to the original file.
@joonaspaakko
joonaspaakko / Circulate foreground color.jsx
Last active May 11, 2022
The script switches foreground color to the next color in the "colors" variable each time you run the code.
View Circulate foreground color.jsx
#target photoshop
// https://gist.github.com/joonaspaakko/347c270f15bc1d11efe9
var colors = [ "#0033ff", "#9a3838", "#888888", "#a6ad1e" ];
function init() {
var read = tempFile.read(),
color = colors[ read ];
@joonaspaakko
joonaspaakko / Save as JPEG.jsx
Created Mar 29, 2016
Saves a file in Photoshop as jpg. File path is based on current document and filename is based on current layer.
View Save as JPEG.jsx
var doc = app.activeDocument;
var fileName = doc.activeLayer.name;
var outputLocation= File( doc.path + "/" + fileName );
save( outputLocation );
function save( outputLocation ) {
var saveOptions = new ExportOptionsSaveForWeb;