Skip to content

Instantly share code, notes, and snippets.

View Trevor-'s full-sized avatar

Trevor Trevor-

View GitHub Profile
@Trevor-
Trevor- / JSX.js
Created July 9, 2019 05:48
JSX.js For execution of JSX Extended Code from your CEP js files
/*
_ ______ __ _
| / ___\ \/ / (_)___
_ | \___ \\ / | / __|
| |_| |___) / \ _ | \__ \
\___/|____/_/\_(_)/ |___/
|__/
_ ____
/\ /\___ _ __ ___(_) ___ _ __ |___ \
\ \ / / _ \ '__/ __| |/ _ \| '_ \ __) |
@Trevor-
Trevor- / setLogLevelWin.bat
Last active February 13, 2022 22:17
Set Logging level Windows
reg add HKEY_CURRENT_USER\SOFTWARE\Adobe\CSXS.11 /t REG_SZ /v LogLevel /d 6 /f
@Trevor-
Trevor- / setLogLevelMac.sh
Last active February 13, 2022 22:26
Set Logging level Mac
defaults write com.adobe.CSXS.11.plist LogLevel 6 && killall -u `whoami` cfprefsd
@Trevor-
Trevor- / setLogLevelMac.sh
Last active February 13, 2022 22:19
Set Logging level Mac
defaults write com.adobe.CSXS.11.plist LogLevel 6 && killall -u `whoami` cfprefsd
@Trevor-
Trevor- / setDebugWin.bat
Last active February 13, 2022 22:18
Set debug mode on Windows from CMD
reg add HKEY_CURRENT_USER\SOFTWARE\Adobe\CSXS.11 /t REG_SZ /v PlayerDebugMode /d 1 /f
@Trevor-
Trevor- / setDebugMac.sh
Last active February 13, 2022 22:18
Set debug mode on Mac from Terminal
defaults write com.adobe.CSXS.11.plist PlayerDebugMode 1 && killall -u `whoami` cfprefsd
@Trevor-
Trevor- / Thinny Font Finder.jsx
Created July 8, 2019 14:56
Finds thin fonts in InDesign Document
// jshint unused: true, undef: true, evil:true
/* globals app, alert, LocationOptions, UndoModes, ColorSpace, UnitValue,
AutoEnum, MeasurementUnits, AlternateGlyphForms, File, Folder,
ConditionIndicatorMethod, ScriptLanguage, ChangeConditionsModes, Window, exit, $*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// InDesign Thin Font Finder Version 1 //
// By Trevor https://creative-scripts.com //
// Created 27th March 2017 Last modified 30th March 2017 //
// See https://creative-scripts.com/indesign-thin-font-finder for explanation, instructions and EULA //
@Trevor-
Trevor- / LogFactory.jsx
Created July 8, 2019 11:36
A Log Factory for Adobe Products
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// LogFactory.jsx //
// Version 1 //
// 1st Published: 6th Mar 2017 //
// Modified: 6th Mar 2017 //
// Copyright © 2017 Trevor https://creative-scripts.com //
// May be used on condition that this comment block is left in
@Trevor-
Trevor- / LogFactory.squished.jsx
Created July 8, 2019 11:32
Squished version of LogFactory.jsx
// LogFactory.jsx Ver 1 By Trevor 6rd Mar 2017 https://creative-scripts.com/logging-with-a-smile/ Provided 'as is', with no warranty whatsoever. This line may not be removed.
var LogFactory=function(file,write,store,level,defaultStatus,continuing){if(file&&(file.constructor===String||file.constructor===File)){file={file:file};}else if(!file)file={file:{}};write=(file.write!==undefined)?file.write:write;if(write===undefined){write=true;}store=(file.store!==undefined)?file.store||false:store||false;level=(file.level!==undefined)?file.level:level;defaultStatus=(file.defaultStatus!==undefined)?file.defaultStatus:defaultStatus;if(defaultStatus===undefined){defaultStatus='LOG';}continuing=(file.continuing!==undefined)?file.continuing:continuing||false;file=file.file||{};var stack,times,logTime,logPoint,icons,statuses,LOG_LEVEL,LOG_STATUS;stack=[];times=[];logTime=new Date();logPoint='Log Factory Start';icons={"1":"\ud83d\udd50","130":"\ud83d\udd5c","2":"\ud83d\udd51","230":"\ud83d\udd5d","3":"\ud83d\udd52","330":"\
var varFromRemote = "foo";
function blah(bar, baz){
var result = bar + " " + baz;
alert(result);
return result;
}
blah(varFromLocal1, varFromLocal2);
// See https://forums.adobe.com/message/10632451#10632451