Skip to content

Instantly share code, notes, and snippets.

@animoplex
Last active August 10, 2023 21:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save animoplex/a72fb3cb5040676c5826411dad887a81 to your computer and use it in GitHub Desktop.
Save animoplex/a72fb3cb5040676c5826411dad887a81 to your computer and use it in GitHub Desktop.
Cursor While Typing - After Effects Expression by Animoplex
// Cursor While Typing - Created by Animoplex: www.animoplex.com
// Creates a pipe "|" symbol on a text layer while it types.
// NOTE: Add a Slider Control and Checkbox Control to your text layer and apply this to the "SourceText" parameter.
// NOTE: Keyframe the Slider Control from 0 to 100 to reveal the text being typed, the Checkbox toggles the cursor.
// Full Tutorial: https://www.youtube.com/watch?v=I-Acdl_l9G0&t=294s
src = effect("Slider Control")("Slider");
tog = effect("Checkbox Control")("Checkbox");
blink = Math.round(time % 1);
pipe = " ";
if (((blink == 1) || (src.speed > 0)) && (tog == true)) {
pipe = "|"
}
substr(0, src) + pipe
@Darellblg
Copy link

Thanks

@JoseAgustinHdez
Copy link

Excelente expresion, gracias por compartir. Saludos

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