1. Follow this tutorial!
Script Development Setup
2. Create your base class script inside of src directory
@ScriptManifest(name = "Example", author = "Example", version = 1.0, info = "Example", logo = "")
class OsbotScriptTemplate : Script() {
override fun onLoop(): Int {
TODO("Not yet implemented")
}
}
3. Build your project. (Build > Build Project)
4. You should see a lib folder with a bunch of kotlin library in it
5. Go back to File > Project Structure > Artifacts, assuming you followed step one correctly, you should already have an artifact. If not, go back to step 1!
6. On the right side under Available Elements you should see KotlinJavaRuntime , right click on this, and select extract into Output Root
7. Rebuild your project, and you should now be able to run your Kotlin based script!