How to call python function from KeyBinds page?

I want to switch profile by calling a python function, not sure how to make the bot call it…
Does it have to be a file under plugins/ folder and be named a specific way?
What format? file::function?
So many questions :smiley:

yes it has to be in a plugin file in the plugin folder, name doesnt matter. You call the function from the keybind not the file name.

def DoSomething():

you would just type DoSomething in the keybind

tried, didn’t work.
testPlugin.py with:
def LoadDefaultProfile():
log(‘Loading default profile’)
set_profile(‘Default’)
LoadDefaultProfile()

and in keybinds:
image

didn’t work :person_shrugging:

okay so that keybind ‘\’ is not supported, i tried with a different keybind and it worked

1 Like