Developer's API

API functions

They should be accessed as API.function_name() . For example API.paste()
  1. paste(channel="", clipno="")
    - Pastes clips from a certain postion in a certain channel. If both are blank, paste 1st clip from currently active channel.
    Example - API.paste(1, 14) pastes clip 14 of channel 1

  2. getClipAt(channel=0, clipno=1, toreturn=1)
    - Get a Clip's content i.e. what is contained in that clip. 'channel' and 'clipno' are the channel number and clip number respectively.
    If toreturn = 1 then return Clipboard text data
    If toreturn = 2 then return ClipboardAll binary data.

  3. manageClip(new_channel=0, channel="", clip="", flag=0)
    - Cut/Copy Clip from one channel to other. 'new_channel' is the new channel to place the clip in. Note that the clip will always be placed at clip 1 of new channel.
    If flag = 0 then cut , if flag = 1 then copy
    If channel is empty, active channel is used.
    If clip is empty, active clip in [Paste-Mode] (Clip x of y, "x") is used.

  4. emptyChannel(chno="")
    - Empties a particular channel (chno)
    If 'chno' is empty, it DEFAULTS to current channel.
    You can also use name of a channel like API.emptyChannel(web) or API.emptyChannel(pit) or API.emptyChannel(default) . Note that if you are creating an AHK Script i.e. a plugin you will have to surround the channel name by quotes ("") to take it as string.

  5. runPlugin(filename, parameters*)
    - Runs a plugin. See here and then here.

  6. runFunction(function_string)
    - Runs a function
    function_string - The string containing the function with parameters, like changeChannel(1) , inputBox(mytitle, some text to desc)
    Example - API.runFunction("changeChannel(1)")
    Note - ClipjumpCustom users are requested to use run=changeChannel(1) rather than this.

  7. disable(status)
    - Disables/Enables/Toggles Clipjump
    If status=1, then disable clipjump.
    If status=0, then enable clipjump.
    If status=-1, then toggle clipjump status.

  8. addClip(channel, input)
    - Adds a clip at the start of the channel i.e. as Clip 1
    channel - The channel where the new clip is to be added
    input - The text that the new clip will contain

  9. showPasteTipAt(channel, clip)
    - Opens [Paste-Mode] with clip number 'clip' of channel 'channel' active.

  10. ExecuteSection(secName)
    - Executes a section in the ClipjumpCustom.ini

  11. IncognitoMode(p=1)
    - Enable/disable Incognito Mode. Pass 1 to disable.
    If p = 1 enable incognito mode
    If p = 0 disable

  12. getClipLoc(channel="", clipno="")
    - get a Clip exact file location or the file in which the clip is saved
    channel - The channel the clip belongs to
    clipno - Clip number of the Clip

  13. getClipDataByTag(tag)
    - returns the text data of first clip which has the tag tag

  14. blockMonitoring(yes=1)
    - blocks Clipjump Clipboard monitoring. Useful when you are changing clipboard content such that you don't want it to be accounted by Clipjump
    If first parameter i.e. yes = 1 , then block Monitoring.
    If 0 , then unblock (or enable Clipboard monitoring)

  15. runLabel(name)
    - runs a label/routine
    name - The name of the label to be run.

  16. deleteClip(channel, clip)
    - deletes a clip from a channel
    channel - The channel number whose clip is to be deleted
    clip - The Clip number to be deleted.

  17. showTip(Text, forTime="")
    - shows a Tip (with a different font). recommended when creating a plugin
    Text - the text to show in the tip
    forTime - time for which the tip is to be shown, if the paramter is not passed i.e. blank, the tip becomes permanent

  18. removeTip()
    - removes the Plugin API Tip i.e. the tip created using the above function API.showTip()

  19. pasteText(Text)
    - pastes the 'Text' that is passed to the function.
    Text - the text/string you want to paste

  20. getChStrength(channel)
    - gets total number of clips in a channel i.e. population of a channel

  21. Text2Binary(Text, byref returnVar)
    - gets binary ClipboardAll data from simple text i.e. string. You pass it a string and it converts it into binary data and returns it via byref variable returnVar
    Text = the string you want to convert to ClipboardAll type data
    returnVar = byref variable to return ClipboardAll data

  22. getVar(var) and setVar(var, value)
    - gets the value of variable 'var'
    - sets the value of variable 'var' to 'value'

More functions

Other interesting functions that are not a part of API.
Unlike API, they should be accessed normally as function_name() . For example changeChannel(2)
  1. BeepAt(value, freq, duration=150)
    - Make a beep system sound.
    If 'value' = 1 , then the function will beep else it will not.
    freq - frequency of the beep
    duration - duration of the beep to be played in milliseconds

  2. getClipboardFormat(type=1)
    - gets the type of data on Clipboard
    If 'type' = 1 , then the function returns the type of data a/c Paste-Mode i.e. "[Text]" for text data including HTML , "[File/Folder]" for file,folder copied data and (blank) for Picture type data.
    If 'type' = 0 , then the function returns the data type formats ID's on Clipboard as per the Microsoft list.

  3. inputBox(title, text)
    - shows a dialog for user to enter any text and the function returns that text. See More

  4. HParse(hotkey)
    - converts a normal hotkey like 'Win+Alt+Z' or 'Ctrl+PrintScreen' to AutoHotkey format like '#!z' or '^Printscreen'.
    hotkey - The Standard hotkey to convert to AHK form.
    The function returns the AHK formatted hotkey of the input hotkey.

  5. changeChannel(channelno)
    - Changes channel to 'channelno'

  6. channel_find( name )
    - Finds the channel corresponding to the 'name' and returns its channel number.
    name - The name of the channel like 'Default'

  7. chooseChannelgui()
    - Shows a GUI for the user to select channel, if he selects a channel the function returns the selected channel number.
    USAGE-ClipjumpCustom tip = %chooseChannelgui()%
    USAGE-AhkScript(Plugin) zSelectedCh := chooseChannelgui()

  8. manageChannel(channel)
    - Deletes a channel with the channel number 'channel'
    channel - The Channel Number of the channel to be deleted.

  9. set_pformat( paste_format )
    - Sets the Paste format which is currently active.
    paste_format - The name of paste format (like 'UPPERCASE') to be made active.
    USAGE - set_pformat(SentenceCase)


Labels should be accessed as run = label_name in ClipjumpCustom and gosub label_name in AhkScript.
  1. These are the labels to open various dialogs and gui in Clipjump. You can easily guess their functions from their names.
    1. actionmode
    2. settings
    3. history
    4. channelgui
    5. classtool
    6. channelGUI
    7. pluginManagerGui
    8. channelOrganizer

  2. These are the labels corresponding to various features of Clipjump. Again, the name itself should be explanatory.
    1. onetime
    2. holdClip
    3. pitswap
    4. incognito

  3. disable_clipjump
    - Toggles Clipjump Status i.e. Enabled or disabled (same like Options > Disable Clipjump in Tray Menu)

  4. endPasteMode
    - Ends [Paste-Mode] forcibly.

  5. simplePaste
    - Pastes the current active content on System Clipboard

  6. windows_copy and windows_cut
    - Copies / Cuts the selected text or file without copying to Clipjump i.e. only System Clipboard is affected. This is what is used inside Copy to System Clipboard bypassing Clipjump

  7. updt
    - Check for Updates

  8. exit
    - Exits Clipjump properly


The important variables in Clipjump which can be changed to customize much of the behavior in the program are listed below. Please note that only selected variables have been listed to prevent any issues with the core functionality of Clipjump.
Changing a variable in ClipjumpCustom is done as variable = value and in AHKScript is done as variable := "value"
  1. Channel Object
    1. CN.NG - Holds the channel number that is currently active.
    2. CN.Name - The name of the channel that is currently active.
    3. CN.Total - Total number of channels that are currently created by the user.

  2. STORE Object
    - Public Storage Space. Use as STORE.var := "value" and msgbox % STORE.var
    See also STORE in ClipjumpCustom.

  3. curPformat - Holds the current active paste format.

  4. CALLER - Holds 1 if clipboard is monitored by Clipjump and 0 if not.

  5. pastemodekey and spmkey
    - Use as pastemodekey.key OR spmkey.key to change keys currently used in [Paste Mode] and [Search-Paste Mode].
    See here for an example.

Public API

Public API (publicAPI.ahk) gives power to any Ahk Script as well an external plugin to control all aspects of Clipjump from changing and reading variables to running function and labels. It is by default distibuted with Clipjump and present in the Clipjump.exe directory.
Here is the online github link in case it ever updates

An external plugin can include publicapi as #Include %A_ScriptDir%\..\publicAPI.ahk
Once publicAPI is included in the script, you will have to initialize it.
cj := new Clipjump()     ; The name 'cj' doesnt matter
Then you can call API methods, set variables, get variables and so on using the 'cj' object. Here are few examples -
; getting value of internal variable VERSION
msgbox % cj.version
; getting value of internal variable CN.NG
msgbox % cj["CN.NG"]
; setting internal variable PASTEMODEKEY.Z to Y
cj["pastemodekey.z"] := "y"
; running a API function GETCLIPLOC
msgbox % cj.getClipLoc(1, 5)
; running a normal function SET_PFORMAT that is not part of API
; running the label EXIT
cj.runLabel("exit") 		; closes Clipjump
The plugin Ignored Windows Manager uses the publicAPI. It will be a good idea to read its code ( external.ignoreWManager.ahk ).