Skip to content

Commit

Permalink
release v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
komefai committed Sep 18, 2017
1 parent b57a6ed commit 4de6ba0
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 9 deletions.
4 changes: 2 additions & 2 deletions PS4Macro/Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion PS4Macro/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void LoadScript(string path)
private void MainForm_Load(object sender, EventArgs e)
{
// Load startup file
if (Program.Settings.StartupFile != null)
if (!string.IsNullOrWhiteSpace(Program.Settings.StartupFile))
m_SaveLoadHelper.DirectLoad(Program.Settings.StartupFile);
}

Expand Down
4 changes: 2 additions & 2 deletions PS4Macro/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.2.0")]
[assembly: AssemblyFileVersion("0.2.2.0")]
[assembly: AssemblyVersion("0.3.0.0")]
[assembly: AssemblyFileVersion("0.3.0.0")]
71 changes: 67 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Automation utility for PS4 Remote Play written in C# using [PS4RemotePlayInterce

#### Screenshot

![Screenshot](https://raw.githubusercontent.com/komefai/PS4Macro/master/_resources/Screenshot_0_2_2.png)
![Screenshot](https://raw.githubusercontent.com/komefai/PS4Macro/master/_resources/Screenshot_0_3_0.png)

## Usage

Expand All @@ -14,20 +14,80 @@ Automation utility for PS4 Remote Play written in C# using [PS4RemotePlayInterce

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](https://youtu.be/txI9AOEAk58) for more details.
See [this video](https://youtu.be/txI9AOEAk58) 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
<?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 tutorial](https://youtu.be/daCb97rbimA) to get started.

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.

```csharp
using PS4MacroAPI;

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

public override void Start()
{
base.Start();
}

public override void Update()
{
Press(new DualShockState() { DPad_Up = true });
Sleep(1000);
Press(new DualShockState() { Square = true });
}
}
```

## To-Do List

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

## Troubleshoot

Reinstall NuGet Package
##### 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
Expand All @@ -36,8 +96,11 @@ Update-Package –reinstall PS4RemotePlayInterceptor
## Resources

- [Tutorial Video](https://youtu.be/txI9AOEAk58)
- [Scripting Tutorial Video](https://youtu.be/daCb97rbimA)
- [Prototype Demo Video](https://youtu.be/QjTZsPR-BcI)

## Credits

- [EasyHook](https://easyhook.github.io/)
- [Jays2Kings/DS4Windows](https://github.com/Jays2Kings/DS4Windows)
- [jforshee/ImageHashing](https://github.com/jforshee/ImageHashing)
Binary file added _resources/Screenshot_0_3_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4de6ba0

Please sign in to comment.