ScriptPlayer Command Line Interface

Woah! That’s a super cool feature! I was thinking about building my own little Pi based e-stim player, and this is precisely what I was missing!

2 Likes

pretty dope. this will be useful for automating some stuff with python scripts.

1 Like

If you would add a “seek” command where you can pass a timestamp or a relative position as well as a command to hot reload the funscript, I could write a little Lua extension for OFS to enable live testing through ScriptPlayer. :thinking:

Not sure if there’s demand for such a thing. :eyes:
Still could be interesting.

1 Like

There is now :wink:

Hey, just a quick heads up. Seems like command for connecting the handy is misspelled. It’s “ConenctHandyDirectly” currently.

1 Like

Thanks, I’ll fix that

A couple of new commands in the new version:
(btw. spcli always returns “OK”, that’s not done yet)

(Filenames and other parameters have to be formatted/quoted properly when they contain spaces)

OpenFile

OpenFile <FilePath>
OpenFile C:\Videos\Porn.mp4
OpenFile "D:\Complicated path\with spaces\script.funscript"

Opens the specified file (script or media)

Seek

Seek [+/-]<TimeStamp>
Seek 10000
Seek +01:00
Seek -00:05
Seek 01:23:45.678

Seeks to a timestamp (anything from mm:ss to hh:mm:ss.fff) or simply a number in ms.
If you put a + or - in front of it, it will seek relative of the current timestamp.

ReloadScript

ReloadScript

Reloads the current script

SetRange

SetRange <Min> <Max>
SetRange 0 100
SetRange 20 99
SetRange 70 70

Sets the Min/Max Range (99 is considered the same as 100 for Launch legacy reasons)

2 Likes

Oh, this is perfect!

Everything I do is voice automated and I had to figure out a janky macro to send mouse/kb commands in order to have scriptplayer connect to the launch. A command interface is a much better solution for automation. Thank you for doing this!

Is direct launch connect/disconnect one of the supported commands?

Connect - Yes, disconnect - No (can’t disconnect BLE with the windows API, no idea why …

That’s fine, I can always restart scriptplayer via command line instead. Thanks again!

This could be pretty cool for automating Fap Land, though we’d need scripts for all 100 scenes.

What’s that?

Since I couldn’t get all use-cases working with a simple command switch, I’ve added a second program spcon.

spcli and spcon are mostly identical, but spcli will not launch a visible console anymore and spcon can be used for interactive sessions.

Some examples/use-cases:

  • When you want to execute single commands by pressing hotkeys, shortcuts, etc. without having a console window flash on screen - use spcli
  • When you just want to play with the commands use spcon - it can be launched by simply starting the exe from your explorer
  • When you want to send commands from your own program use either of them depending on what works best with your architecture

ScriptPlayer will now send slightly better feedback than just “OK” by waiting for the command to be processed.
(Not neccessarily finished executing, e.g. when loading files, but at least you know the command was received and the syntax was correct)
If the command isn’t processed within 2 seconds, you will receive a “FAIL:Timeout”.

examples:

OK:Loading File
OK:Executed
FAIL:Expected 2 parameters, got 1
FAIL:Timeout
FAIL:Unknown Command

100 rounds that you randomly traverse though with a dice until you get to the end, not sure if it’s just a 4chan thing but all of their Fap Hero threads have it in the info.

https://boards.4chan.org/h/thread/6375102/fap-hero-general-50#p6375108

It works :raised_hands:
Going to need to do another OFS release though before I can release this because I had to add some functionality to the Lua api, like funscript saving to facilitate this.

1 Like

Nice,

btw. there is a built-in “Auto Reload” debug option in ScriptPlayer that reloads the script whenever the file is changed:

image

If you get this working on a Pi or another linux device, please make a post about it.

1 Like

SetPatternSpeed
Sets the pattern speed in ms, supports absolute and relative values

SetPatternSpeed 1500
SetPatternSpeed -200
SetPatternSpeed +25

SetRangeExtender
Sets the range extender setting, supports absolute and relative values

SetRangeExtender 50
SetRangeExtender -5
SetRangeExtender +10
1 Like

can I use my sr6 that runs on wifi with scriptplayer, anyone know ?