Skip to content

Instantly share code, notes, and snippets.

// Mon Jun 3 17:57:26 CST 2024
(function main(thisObj){
// 创建脚本UI面板
function createUI(thisObj) {
var panel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Keyframe Counter", undefined, { resizeable: true });
panel.orientation = "column";
panel.alignChildren = ["fill", "top"];
var button = panel.add("button", undefined, "Count Keyframes");
@msongz
msongz / Fkey.ahk
Created January 25, 2021 12:45
Function key to show/hide app by one hit
F3::
UniqueID:="ahk_id " WinExist("Files")
if !WinExist(UniqueID){
Run C:\Users\songz\Creative Cloud Files\Files.lnk
return
}else{
if WinActive(UniqueID){
WinMinimize,%UniqueID%
return
@msongz
msongz / 📂new project folder.kmmacros
Created January 22, 2021 17:04
fast setup project folder with keyboard maestro
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>611489812.61455905</real>
<key>CustomIconData</key>
@msongz
msongz / spotify Macros.kmmacros
Created March 2, 2020 13:31
spotify global shortcut key to play/pause/next/previous with keyboard maestro
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>604848114.02842605</real>
<key>CustomIconData</key>
{
"meta": {
"manifest_version": 1,
"locale_version": " 1.1",
"locale_name": "中文",
"locale_type": "zh_CN",
"locale_last_updated": " 2020-03-05 12:00:00 UTC",
"locale_author_name": "songz",
"locale_author_email": " nodetics@gmail.com",
"locale_source_url": " https://nodetics.com/feedbro/"
@msongz
msongz / DUIK-dev-macOS.command
Last active November 2, 2019 15:02
create a soft link(ln) from DUIK repo to run DUIK in the newest commit on macOS. if new files in, or anything mess up, repeat.
#edit your DuAEF_Duik and DuAEF repo path, make sure you had cloned DUIK and DUAEF to your home folder
duik=$HOME/DuAEF_Duik;
duaef=$HOME/DuAEF;
#sync the folder structure of libs(do not link the libs folder directly)
rsync -a $duaef/src/libs $duik/src/ --include \*/ --exclude \*;
#ln libs(maybe you should delete the origin libs in the DUIK src folder first)
for file in $duaef/src/libs/icons/*; do ln -s $file $duik/src/libs/icons;done;
for file in $duaef/src/libs/pseudoEffects/*; do ln -s $file $duik/src/libs/pseudoEffects;done;
@msongz
msongz / 🈳️️空格之神.kmmacros
Created July 16, 2019 14:04
在编辑区域选中文字,然后在 keyboard maestro 的菜单栏里召唤空格之神
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>531049276.55934</real>
<key>Macros</key>
@msongz
msongz / change project item size.jsx
Last active March 20, 2022 05:39
batch change project items size, like:null, comp, etc.
app.beginUndoGroup("resize null");
var s = app.project.activeItem.selectedLayers;
var o = Number(prompt("new size", 100));
for (var i = 0; i < s.length; i++) {
try {
s[i].source.width = s[i].source.height = o;
} catch (e) {}
}
app.endUndoGroup();
//songz meng
//github.com/msongz
//2018.05.30
var comp = app.project.activeItem;
var sl = comp.selectedLayers;
app.beginUndoGroup("shapes from texts")
//first deselect all selected layers
for (var i = 0; i < sl.length; i++) {
sl[i].selected = false;