Skip to content

Adobe Functions

Tomshi edited this page Jun 26, 2025 · 45 revisions

A list of Adobe function definitions, complete with examples.

All adobe functions are contained within classes respective to their programs and are called like: prem.func(), ae.func(), ps.func()

My scripts are heavily reliant on using specific versions of the adobe suite and I cannot guarantee their success using untested versions. The compatible versions can be found by looking within the ..\Support Files\ImageSearch\ folder for each program. ie in ..\Support Files\ImageSearch\Premiere\ you'll see v22.3.1 - that's a supported version (although versions other than the one I currently use cannot be guaranteed to behave exactly as expected. To see which version I test my scripts on, check the top of the individual class file).
If you have (complete) images for another version (and it doesn't require any code changes) feel free to create a pull request on github to potentially get it added to the supported versions!

Warning

These adobe functions heavily rely on the user to correctly set their keyboard shortcuts within;
..\Support Files\KSA\Keyboard Shortcuts.ini
And in the case of Premiere Pro, heavily rely on the user to correctly set their UIA values


Table of Contents:


After Effects

ae.ScaleAndPos()

This function allows the user to quickly begin keyframing the scale & position values. Simply hover over the desired track and activate this function.


ae.motionBlur()

This function will open up the composition settings window within After Effects, navigate its way to the "advanced" tab, find "shuttle angle" and increase it to a value of 360.


ae.timeline()

A weaker version of right click premiere.ahk

This function will gather the coordinates of the After Effects timeline and store them, then it will allow the user to move the playhead at the press of a button. Set this button to something quick to access like a mouse button (Xbutton1/2) or if you wish to use the keyboard, something a little more obscure like Ctrl + Capslock.


ae.wiggle()

This function is to quickly input a command into one of the properties of After Effects.

ae.wiggle( [command {, delete}] )

command

Type: String

This parameter is the command you wish to enter into the property field.

delete

Type: Boolean

This parameter is to determine whether you need the function to delete an extra '(' or ']' that may get automatically generated by AE as the command is input.


ae.zoomCompWindow()

Trying to zoom in on the preview window can be really annoying when the hotkey only works while the window is focused

ae.zoomCompWindow( [coords, command {, mousespeed := 2}] )

coords

Type: Object

This parameter is the coordinates of your tools bar. requires {x: , x2: , y: , y2: }

command

Type: String

This parameter is the hotkey to send to after effects to zoom however you wish

mousespeed

Type: Integer

This parameter is the speed you wish for the mouse to move. Defaults to 2


Photoshop

ps.Prop()

This function will warp the mouse to one of a photo's values (scale, x/y, rotation, etc), click and hold it so the user can drag to increase/decrease the value, then return once the user let's go.

Tapping the button will reset the property.

ps.Prop( [image] )

image

Type: String - Filename

This parameter is the filename of the property itself & the file extenstion - ie. scale.png NOT scale. Will require screenshots of said property in the appropriate ImageSearch folder.


ps.Save()

This function is to speed through the twitch emote saving process within photoshop - adjusting the image size and saving all 3 sizes.


ps.Type()

This function is to quickly select a different file extension during the file saving process. When you try and save a copy of something in photoshop, it defaults to psd, this is a function to instantly pick the actual filetype you want.

ps.Type( [filetype] )

filetype

Type: String - Filename

This parameter is the filename of the filetype you wish to save as itself - ie. png. Will require screenshots of said filetype in the appropriate ImageSearch folder.


Premiere

⚠️ Timeline Coords

This class contains variables that store the coordinates of the Premiere Pro timeline, this allows any scripts that require them to easily move on without needing to retrieve them constantly. This however poses a problem as the class will only be able to store those coordinates within its own instance, meaning if another script is launched that also requires those coordinates, it will need to retrieve them again for no reason.

Because of this I designed some functions that allows other scripts to communicate with My Scripts.ahk and share timeline coordinates so the other instance of the class can simply store them without needing to retrieve them itself.

⚠️ UIA

Some functions within the Prem { class require the use of the UIA lib to function correctly. Please ensure you have taken the time to fill out that class before proceeding.

prem.preset()

This function will drag and drop any previously saved preset onto the clip you're hovering over. Your saved preset MUST be in a folder for this function to work. This function contains custom code if the preset is called loremipsum and is intended for creating a custom text layer and then dragging your preset on top of it.

Your preset must also be in it's own folder like so;

image

prem.preset( [item] )

item

Type: String

This parameter is the name of the preset you wish to drag onto your desired clip. Try to use names that will result in only one item appearing in the list after doing a search in the effects panel.


prem.fxSearch()

This function is to highlight the effects window and highlight the search box to allow manual typing.


prem.valuehold()

This function will warp to the desired value of the current track (scale, x/y, rotation, etc), then click and hold it so the user can drag to increase/decrease the value. Tapping the button you assign this function will reset the desired value.

prem.valuehold( [control {, optional := 0}] )

control

Type: String

This parameter is which control you wish to adjust. Valids options; Position, Scale, Rotation, Opacity

Caution

This parameter is case sensitive

optional

Type: Integer

This value is used to add extra x axis movement to avoid the first "blue" text for some properties. This parameter can be omitted.


prem.wheelEditPoint()

This function allows you to move back and forth between edit points from anywhere in premiere

prem.wheelEditPoint( [window, direction {, keyswait := "all", checkMButton := false, activationKeys := "{Shift}{F21}{F23}"}] )

window

Type: String - Hotkey

This parameter is the hotkey within premiere to focus the desired window.

direction

Type: String - Hotkey

This parameter is the hotkey within premiere for the direction you want the playhead to go in relation to "edit points"

keyswait

Type: String

This parameter is the a string you wish to pass to keys.allWait()'s first parameter.

checkMButton

Type: Boolean/Object

This parameter determines whether the function will wait to see if MButton is pressed shortly after (or is being held). This can be useful with panning around Premiere's Program monitor (assuming this function is activated using tilted scroll wheels, otherwise leave this param as false). This parameter can either be set to true/false or an object containing key T along with the timeout duration. Eg. {T:"0.3"}

activationKeys

Type: String

The keys you use to activate this function so they can be passed to block_ext() (otherwise you may have issues activating this hotkey consecutively)


prem.movepreview()

This function is to adjust the framing of a video within the preview window in premiere pro. Let go of this hotkey to confirm, simply tap this hotkey to reset values.
This function mimics what happens either when you double click the preview window, or when you click the "motion" button in a video's "effect control" window.


prem.reset()

This function moves the cursor to the reset button to reset the "motion" effects


prem.gain()

This function is to increase/decrease gain for the current clip. This function will check to ensure the timeline is in focus and a clip is selected.

prem.gain( [amount] )

amount

Type: Number

This parameter is the value you want the gain to adjust (eg. -2, 6, etc)


prem.numpadGain()

This function once bound to NumpadMult::/NumpadAdd:: allows the user to quickly adjust the gain of a selected track by simply pressing NumpadSub/NumpadAdd then their desired value followed by NumpadEnter. Alternatively, if the user presses NumpadMult after pressing the activation hotkey, the audio level will be changed to the desired value instead (however the user needs PremiereRemote installed for this feature to work).

Tip

If no second input is pressed, the function will continue after 4s

prem.numpadGain( [{which := A_ThisHotkey, sendOnFail := "{" A_ThisHotkey "}"}])

which

Type: String

Whether the user wishes to add or subtract the desired value. If the user is using either NumpadSub/NumpadAdd or -/+ as the activation hotkey this value can be left blank, otherwise the user should set it as either -/+

sendOnFail

Type: String

What the function will send to SendInput in the event that the timeline isn't the active panel.


prem.mouseDrag()

Press a button (ideally a mouse button), this function then changes to the "hand tool" and clicks so you can drag and easily move along the timeline, then it will swap back to the tool of your choice (selection tool for example).

This function will (on first use) check the coordinates of the timeline and store them, then on subsequent uses ensures the mouse position is within the bounds of the timeline before firing - this is useful to ensure you don't end up accidentally dragging around UI elements of Premiere.

This function is best used bound to a mouse button (Xbutton1/2)

Caution

This function contains KSA values that need to be set correctly. Most notibly DragKeywait needs to be set to the same key you use to ACTIVATE the function.

prem.mousedrag( [premtool, toolorig] )

premtool

Type: String - Hotkey

This parameter is the hotkey you want the function to send to swap the current tool to another (ie, hand tool, zoom tool, etc). (consider using KSA values).

toolorig

Type: String - Hotkey

This parameter is the hotkey you want the function to send to bring you back to your tool of choice (consider using KSA values).


prem.getTimeline()

A function to retrieve the coordinates of the Premiere timeline. These coordinates are then stored within the Prem { class.

Warning

It is important to note that this function will need to retrieve the coordinates for every instance of the class; ie. if you have two scripts that both include the Prem { class, they will both need to individually retrieve and store the timeline coordinates. Some of my scripts attempt to share this information with each other, but if you notice multiple scripts retrieving and storing the same information this can be expected.

prem.getTimeline()

prem.openEditingDir()

Quickly and easily run/activate an asset folder.

prem.openEditingDir( [dir] )

dir

Type: String

This parameter is the path directory you wish to open.


prem.accelScroll()

This function handles accelorating scrolling within premiere. It specifically expects the first activation hotkey to be either alt or shift.

This function will attempt to only fire within the timeline.

prem.accelScroll( [{altAmount := 3, scrollAmount := 5}] )

altAmount

Type: Integer

The amount of accelerated scrolling you want

scrollAmount

Type: Integer

The amount of accelerated scrolling you want


prem.timelineFocusStatus()

This function will check for the blue outline around the timeline (using stored values within the class) that a focused window in premiere will ususally have.

prem.timelineFocusStatus()

Return Value

Type: Trilean

Returns true/false/-1. -1 indicates that the timeline coordinates could not be determined.


prem.Previews()

This function handles different hotkeys related to Previews (both rendering & deleting them). This function will attempt to save the project before doing anything.

prem.Previews( [which, sendHotkey] )

which

Type: String

@hether you wish to delete or render a preview. If deleting, pass "delete" else pass an empty string.

sendHotkey

Type: String

Which hotkey you wish to send.


prem.searchPlayhead()

This function checks to see if the playhead is within the defined coordinates.

prem.searchPlayhead( [coordObj {, playheadCol := this.playhead}] )

coordObj

Type: Integer

An object containing the cursor coordinates you want pixelsearch to check

playheadCol

Type: Hexadecimal

The colour you wish pixelsearch to look for


prem.thumbScroll()

This function will search for the playhead and then slowly begin scrubbing forward until the hotkey is released. This function was designed to make scrubbing for thumbnail screenshots easier.

prem.searchPlayhead()

prem.delayPlayback()

This function requires you to properly set your ripple trim previous/next keys correctly within KSA as well as requires you to make those same keys call prem.rippleTrim() in your main ahk script.

If the user immediately attempts to resume playback after ripple trimming the playhead will sometimes not be placed at the new clip and will inadvertently begin playback where you might not expect it This function attempts to delay playback immediately after a trim to mitigate this behaviour. This function might require some adjustment from the user depending on how fast/slow their pc is

prem.delayPlayback( [{delay := 150}] )

delayMS

Type: Integer

The delay in ms that you want the function to wait before attempting to resume playback. Defaults to a value set within the class


prem.rippleTrim()

Tracks how long it has been since the user used a ripple trim. This function is to provide proper functionality to prem.delayPlayback()

prem.rippleTrim()

Example #1

;// if my ripple trim buttons within both Premiere and KSA are `q` and `w`
q::
w::prem.rippleTrim()

prem.anchorToPosition()

A function to simply copy the current anchor point coordinates and transfer them to the position value. This function is designed for use in the Transform Effect and not the motion tab.

prem.anchorToPosition()

prem.zoomPreviewWindow()

Trying to zoom in on the preview window can be really annoying when the hotkey only works while the window is focused

prem.zoomPreviewWindow( [command {, zoomToFit := false}] )

command

Type: String

This parameter is the hotkey to send to premiere to zoom however you wish

zoomToFit

Type: Boolean

Informs the function whether the hotkey you're trying to send is the zoom to fit hotkey. This hotkey was made a global hotkey in premiere versions >=25.2 so this function has code to end logic early if the user's prem ver is higher than that


prem.swapChannels()

This function is mostly designed for my own workflow and isn't really built out with an incredible amount of logic.
It is designed to swap the L/R channel on a single track stereo file. attempting to use this script on anything else will either produce unintended results or will simply not function at all.

prem.swapChannels( [{mouseSpeed := 2, adjustGain := false, changeLabel?}] )

mouseSpeed

Type: Integer

Set the speed the mouse should move to interact with the Modify Clip window

adjustGain

Type: Number

Determine whether to adjust gain after modifying the channels

Note

It should be noted once again that this function is specifically designed for my workflow - if it swaps to the R channel it will increase gain by this parameter, if it swaps to the left it wil take away this parameter

changeLabel

Type: String

leave unset if you do not wish to change the label colour of the selected clip(s), otherwise provide the hotkey required to change to the desired colour


prem.escFxMenu()

This function is designed to allow the user to quickly dismiss certain fx windows that otherwise require them to manually dismiss them

prem.escFxMenu( [{onFailure := "{Escape}"}] )

onFailure

Type: String

This parameter defines what the function will send in the event that the active window isn't defined


prem.dismissWarning()

Premiere loves to spit stupid warning boxes at you, especially if it has even the smallest issue trying to playback audio. This function will detect that window and automatically click the x button to close the window.
This is especially necessary when using other functions of mine like those in Premiere_RightClick.ahk as the error window messes with the active window and may confuse those scripts.

prem.dismissWarning( [{waitWinClose := true, window := "DroverLord - Overlay Window ahk_class DroverLord - Window Class"}] )

waitWinClose

Type: Boolean

Determines whether to wait for the window to close or not.

window

Type: String

The window you wish to wait to close. This parameter is meaningless unless waitWinClose is set to true. Defaults to "DroverLord - Overlay Window ahk_class DroverLord - Window Class"


prem.dragSourceMon()

A function to quickly drag the audio or video track from the source monitor to the timeline. This is often easier than dealing with insert/override quirkiness.

prem.dragSourceMon( [{audOrVid := "audio", sendOnFailure := A_ThisHotkey, specificFile := false}] )

audOrVid

Type: String

Determine whether you wish to drag the audio or video track. This parameter must be either "audio" or "video".

sendOnFailure

Type: String

Define what hotkey you want this function to send in the event that the main premiere window isn't the active window. This function will correctly handle any single key activation hotkey - if your activation is more (ie Ctrl & F19) you will need to instead define this parameter as `"^{F19}" etc.

specificFile

Type: String

If set the function will only activate if the desired file is open within the source monitor.


prem.flattenAndColour()

A function to flatten a multicam clip, then recolour it to a specific label colour

prem.flattenAndColour( [colour] )

colour

Type: String

The hotkey required to set the colour of your choosing. Can be a KSA value.


prem.layerSizeAdjust()

A function designed to allow you to quickly adjust the size of the layer the cursor is within.

Caution

LAlt MUST be one of the activation hotkeys and is required to be held down for the duration of this function.

prem.layerSizeAdjust( [{capsLockDisable := true}] )

capsLockDisable

Type: Boolean

(If the user does NOT use CapsLock to activate this function, they should set this value to false)

Because I use capslock as the activation key (and also have it set to "AlwaysOff"), ahk is a bit quirky and will sometimes just not reset that even if I use SetStoreCapsLockMode(true) - so setting this parameter to true will cause the function to manually call SetCapsLockState('AlwaysOff') at the end of its logic


prem.toggleLayerButtons()

A function to quickly toggle the state of various layer settings for the layer the cursor is within.

Note

This funtion uses offset values of the timelineRawX value and as such the use of PremiereUIA is required.

prem.toggleLayerButtons( [{which := "target"}] )

which

Type: String

This parameter defines the button you wish to toggle. Accepted options are; source, target, sync, mute, solo, lock


prem.disableDirectManip()

Checks for and disables the Direct Manipulation button that appears in the bottom left of the program monitor when you select a clip
This button being enabled can be annoying as it will then pause playback if you click anything else in the timeline

prem.disableDirectManip( [{toggleKey := ksa.toggleCropDirectManip}] )

toggleKey

Type: String

This parameter is the keyboard shortcut to send to toggle off Direct Manip. Defaults to a KSA value.


prem.disableAllMuteSolo()

Disables either all muted or all solo'd audio tracks

prem.disableAllMuteSolo( [which := "solo"] )

which

Type: String

Whether you wish to operate on all muted, or all solo'd tracks


prem.pseudoFS()

A function that attempts to hide the top/bottom bars as well as the titlebar to try and retrieve some screen real estate back.

Warning

This function will store the class values of the bars that is hiding so that the function can be recalled to unhide them. This does however mean that if the script is reloaded while they are hidden, you will no longer be able to unhide the top/bottom bars within premiere as it will not be able to find them.

The function will still attempt to unhide the window Title bar, but to retrieve the navigation bars within Premiere, the program will need to be closed/reopened

justTitleBar

Type: Integer

Determines whether to hide just the window title bar, or the navigation panels as well. Defaults to true


PremiereRemote

This section is any functions directly tied to PremiereRemote.

prem.__remoteFunc()

This function is syntatic sugar to activate a PremiereRemote function.

prem.__remoteFunc( [whichFunc {, needResult := false, params*}] )

whichFunc

Type: String

This parameter is the function you wish to call

needResult

Type: Boolean

This parameter determines whether the user needs this function to return a result back from the cmd window.

params

Type: Varadic/String

These paramaters are any additional paramaters you need to pass to your function. do not add the & that goes between paramaters, this function will add that itself

Return Value

Type: String

if the user sets needResult to true this function will return a string containing the response.


prem.save()

Calls a PremiereRemote function to directly save the current project.

prem.save( [{andWait := true, checkSeqTime := 1000, checkAmount := 1, continueOnBusy := false}] )

andWait

Type: Boolean

This parameter determines whether you wish for the function to wait for the Save Project window to open/close. Defaults to true

*checkSeqTime

Type: Integer

The value you wish the function to sleep before checking if the active sequence was changed. Defaults to 1000

*checkAmount

Type: Integer

The amount of times you wish for the function to check (with a sleep delay of checkSeqTime inbetween each). Be aware that using a value higher than 1 may result in the function changing the sequence in the event that the user manually changes it after a save. Defaults to 1

*continueOnBusy

Type: Boolean

Determine whether to continue with a save attempt even if Premiere may be busy. Defaults to false

Return Value

Type: Boolean/String

  • true : successful
  • false : PremiereRemote/saveProj func/projPath func not found
  • "timeout" : waiting for the save project window to open/close timed out
  • "noseq" : focusSequence/getActiveSequence func not found
  • "busy" : another window may be open in premiere that could cause saving to fail

prem.__checkPremRemoteDir()

This function checks for the existence of PremiereRemote. Can also check for the existence of a specific function within the index.tsx file.

prem.__checkPremRemoteDir( [{checkFunc := ""}] )

checkFunc

Type: String

This parameter allows the user to also check for a specific function within the index.tsx file.

Return Value

Type: Boolean


prem.__checkPremRemoteFunc()

This function checks the PremiereRemote index file for the desired function.

prem.__checkPremRemoteFunc( [checkFunc] )

checkFunc

Type: String

This parameter is the function name you wish to search for. ie projPath.

Return Value

Type: Boolean


prem.setScale()

A wrapper function to set the scale of the currently selected clip. This function requires the use of PremiereRemote

prem.setScale( [scaleVal] )

scaleVal

Type: float

The value you wish to set the scale property to


prem.changeLabel()

This function is a wrapper function for changing the label colour of a clip; ensuring that the timeline is in focus and that a clip is selected.

labelHotkey

Type: String

The hotkey string that will be sent to SendInput to change the label colour to your desired choice


Premiere - Excalibur

A collection of functions used in combination with the Excalibur extension for Premiere Pro

Excalibur.lockTracks()

A function to help quickly and easily lock/unlock multiple audio/video tracks.

prem.Excalibur.lockTracks( [{which := "Video"}] )

which

Type: String

This parameter determines when you wish to lock/unlock either the audio or video tracks


PremHotkeys

A class designed to house functions that other functions use to set a variety of Hotkey adjustments. An example being prem.thumbScroll() sets Shift & Ctrl to speed up/slow down scrubbing respectively; the function to set those hotkeys is kept within this class.

Clone this wiki locally