Giter Club home page Giter Club logo

ps4macro's Introduction

PS4 Macro

Automation utility for PS4 Remote Play written in C# using PS4RemotePlayInterceptor.

Screenshot

Screenshot

Usage

Download latest version here!

⚠️ You must have DualShock 4 controller plugged in via USB with PS4 Remote Play running.

To record, click on record button (Ctrl+R) to arm recording then press play to start recording controls. To stop recording, click on record button (Ctrl+R) to unarm. The macro will then play the controls in a loop.

See this video for basic usage / making of.

Settings

You can create settings.xml and place it with the executable to override default settings.

Example settings.xml

This example settings will enable AutoInject and load MyMacro.xml at startup.

<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <AutoInject>true</AutoInject>
  <StartupFile>MyMacro.xml</StartupFile>
</Settings>

Scripting

C# scripting support has been introduced in version 0.3.0 and later. This allows us to create custom behaviors beyond repeating macros with an easy-to-use API. The API also includes wrapped convenience functions such as pressing buttons, timing, and taking a screenshot from PS4 Remote Play.

See the scripting video tutorial to get started or see the wiki for full documentation, examples, and other information.

NOTE: The script have to include a reference to PS4MacroAPI.dll to interface with PS4Macro. At the moment the scripts has to be compiled into a DLL file to be able to open with PS4 Macro.

Basic Example Script

This example script will press DPad up and wait one second, follow by pressing square. The loop repeats every 800ms.

using PS4MacroAPI;

public class Script : ScriptBase
{
    /* Constructor */
    public Script()
    {
        Config.Name = "Example Script";
        Config.LoopDelay = 800;
    }

    // Called when the user pressed play
    public override void Start()
    {
        base.Start();
    }

    // Called every interval set by LoopDelay
    public override void Update()
    {
        Press(new DualShockState() { DPad_Up = true });
        Sleep(1000);
        Press(new DualShockState() { Square = true });
    }
}

List of Scripts

Troubleshoot

Macro not playing/recording

=> Disable AutoInject in settings.xml since some machines does not support AutoInject.

Visual Studio Build Error

=> Reinstall NuGet Package.

Update-Package –reinstall PS4RemotePlayInterceptor

To-Do List

  • Save/Load
  • Keyboard Shortcuts
  • Status Indicators
  • Scripting
  • Scripting API Docs
  • Playback Timeline UI
  • Use without DualShock controller
  • ...

Resources

Credits

ps4macro's People

Contributors

komefai avatar

Watchers

James Cloos avatar kzeronet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.