#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)[\s]*([\/+\s\w@'\,\.()\-\*\-\>\<\_\"]*)?[\n]*UFUNCTION[(]([\w<>\s\(\)\=\,\"\| ]*|\n]*)[\)]\n\s(virtual)*\s*(static)*\s*(\w+\&?\*?)\s(\w+)[(]([\w<>\s,&\*]*|\n]*)[)][\s]*([const]*)"
Local $sString = "// Fill out your copyright notice in the Description page of Project Settings." & @CRLF & _
"" & @CRLF & _
"#pragma once" & @CRLF & _
"" & @CRLF & _
"#include "CoreMinimal.h"" & @CRLF & _
"#include "GM_Stepper.h"" & @CRLF & _
"#include "Kismet/BlueprintFunctionLibrary.h"" & @CRLF & _
"#include "StepperTypes.h"" & @CRLF & _
"#include "Encoder/EncodeData.h"" & @CRLF & _
"#include "Components/TextBlock.h"" & @CRLF & _
"#include "BFL_Stepper.generated.h"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"/**" & @CRLF & _
" * " & @CRLF & _
" */" & @CRLF & _
"UCLASS()" & @CRLF & _
"class STEPPER_API UBFL_Stepper : public UBlueprintFunctionLibrary" & @CRLF & _
"{" & @CRLF & _
" GENERATED_BODY()" & @CRLF & _
"" & @CRLF & _
"public:" & @CRLF & _
" // Returns a copy of the current rendering LogPacket" & @CRLF & _
" // For use ONLY during render time" & @CRLF & _
" // Will be invalid otherwise" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Core")" & @CRLF & _
" static FLogPacket& GetCurrentLogPacket(bool& Success);" & @CRLF & _
"" & @CRLF & _
" // Updates the log packet sources in memory" & @CRLF & _
" UFUNCTION(BlueprintCallable, Category = "Stepper|Core")" & @CRLF & _
" static bool UpdatePacket(FLogPacket NewPacket);" & @CRLF & _
"" & @CRLF & _
" // Returns a copy of the requested MetaData from the relevant core" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Core")" & @CRLF & _
" static FGenericMetaTag GetMetaTag(FLogPacket ReferencePacket, FName MetaTag, bool& bIsValid);" & @CRLF & _
" " & @CRLF & _
" // Returns a copy of the requested MetaData from the supplied packet" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Core")" & @CRLF & _
" static FGenericMetaTag GetMetaTag_Explicit(FLogPacket ReferencePacket, FName MetaTag, bool& bIsValid);" & @CRLF & _
"" & @CRLF & _
" // Returns a logLine for this LogPacket by a LineId" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Core")" & @CRLF & _
" static bool GetLogLineInId(FLogPacket ReferencePacket, int32 inId, FActionLine& LineData);" & @CRLF & _
"" & @CRLF & _
" // Returns a logLine for this LogPacket by seeking from a specific line" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Core")" & @CRLF & _
" static bool GetNextActionByType(FLogPacket ReferencePacket, FAction RefAction, FName NextActionName, bool bShouldDebug, FActionLine& Action);" & @CRLF & _
" " & @CRLF & _
" // Updates the LogPacket in memory and text file " & @CRLF & _
" UFUNCTION(BlueprintCallable, Category = "Stepper|Core")" & @CRLF & _
" static void UpdateGenericTag(FLogPacket ReferencePacket, FGenericMetaTag MetaTag);" & @CRLF & _
"" & @CRLF & _
" // Get the saved user settings" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|User Settings")" & @CRLF & _
" static bool GetUserSettings(FUserSettings& Settings);" & @CRLF & _
"" & @CRLF & _
" // Get the saved capture resolution" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|User Settings")" & @CRLF & _
" static FIntPoint GetCaptureResolution();" & @CRLF & _
"" & @CRLF & _
" // Get the saved output resolution" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|User Settings")" & @CRLF & _
" static FIntPoint GetOutputResolution();" & @CRLF & _
"" & @CRLF & _
" // Get the root output folder for this log" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|User Settings")" & @CRLF & _
" static FString GetLogOutputFolder();" & @CRLF & _
"" & @CRLF & _
" // Gets the saved resources folder" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|User Settings")" & @CRLF & _
" static FString GetResourcesFolder();" & @CRLF & _
"" & @CRLF & _
" // Get a reference to the active UStepperObject" & @CRLF & _
" // Can be nullptr" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Statics")" & @CRLF & _
" static UStepperCore* GetStepper();" & @CRLF & _
"" & @CRLF & _
" // Get the currently rendered stepper frame number" & @CRLF & _
" // Return -1 if not rendering" & @CRLF & _
" UFUNCTION(BlueprintPure, Category = "Stepper|Statics")" & @CRLF & _
" static int32 GetStepperFrame();" & @CRLF & _
"" & @CRLF & _
" // Checks if a file is of type "png", "jpg", "mp4" or "mov"" & @CRLF & _
" UFUNCTION(BlueprintPure)" & @CRLF & _
" static bool bIsMediaFile(FString FileName);" & @CRLF & _
"" & @CRLF & _
" // Get the language of the inputted log packet" & @CRLF & _
" UFUNCTION(BlueprintPure)" & @CRLF & _
" static FString GetLogLanguage(FLogPacket LogPacket);" & @CRLF & _
"" & @CRLF & _
" // Get the packet's framerate" & @CRLF & _
" UFUNCTION(BlueprintPure, meta=(CompactNodeTitle="FR", Keywords = "FrameRate, Frame, Rate"))" & @CRLF & _
" static FFrameRate GetPacketFrameRate(FLogPacket Packet);" & @CRLF & _
" // Get the rendered framerate" & @CRLF & _
" UFUNCTION(BlueprintPure, meta=(CompactNodeTitle="FR", Keywords = "FrameRate, Frame, Rate"))" & @CRLF & _
" static bool GetRenderedFrameRate(FFrameRate& FrameRate);" & @CRLF & _
" // Get the packet's start timecode" & @CRLF & _
" UFUNCTION(BlueprintPure, meta=(CompactNodeTitle="STC", Keywords = "Timecode, Time, Code, TC"))" & @CRLF & _
" static FTimecode GetPacketStartTimecode(FLogPacket Packet);" & @CRLF & _
" // Get the packet's end timecode" & @CRLF & _
" UFUNCTION(BlueprintPure, meta=(CompactNodeTitle="ETC", Keywords = "Timecode, Time, Code, TC"))" & @CRLF & _
" static FTimecode GetPacketEndTimecode(FLogPacket Packet);" & @CRLF & _
" //Get the timecode data struct from the currently loaded LogPackt's MetaData" & @CRLF & _
" UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Stepper|XML|Helpers")" & @CRLF & _
" static FTimecodeData GetPacketTimecodeData(FLogPacket Packet);" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" UFUNCTION()" & @CRLF & _
" static bool bIsDllLoaded(FString DllName);" & @CRLF & _
"" & @CRLF & _
" // Get a reference to the active game mode" & @CRLF & _
" UFUNCTION(BlueprintCallable)" & @CRLF & _
" static AGM_Stepper* GetGameMode();" & @CRLF & _
"" & @CRLF & _
" UFUNCTION()" & @CRLF & _
" static ELogRenderStatus QtChangeFile(FLogPacket& LogPacket, FCameraData& CameraData, int32 Iteration);" & @CRLF & _
" UFUNCTION()" & @CRLF & _
" static ELogRenderStatus QtChangeFile_Scatter(FLogPacket& LogPacket, FCameraData& CameraData, int32 ScatterIndex, FName ScatterTag, FTimecode ClipTc, int32 Iteration);" & @CRLF & _
" UFUNCTION()" & @CRLF & _
" static ELogRenderStatus RunQtBat(FString BatLoc, FString Dir);" & @CRLF & _
"" & @CRLF & _
" UFUNCTION()" & @CRLF & _
" static int CheckLine(FString Line);" & @CRLF & _
" // Break a TextBox's text into lines" & @CRLF & _
" UFUNCTION(BlueprintCallable)" & @CRLF & _
" static void BreakTextBox(UTextBlock* TextBox, int32 MaxLineSize);" & @CRLF & _
"" & @CRLF & _
" //Takes a snapshot of a widget and returns it as a render target" & @CRLF & _
" UFUNCTION(BlueprintCallable, Category = "Stepper|Helpers", meta=(DisplayName="Render Target From Widget With Alpha"))" & @CRLF & _
" static UTextureRenderTarget2D* RtFromWidget_Alpha(UUserWidget* const Widget, FVector2D Size);" & @CRLF & _
"" & @CRLF & _
" //Adds a prefix 0 for numbers below 10 (i.e 6 -> 06)" & @CRLF & _
" UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Stepper|Helpers")" & @CRLF & _
" static void IntToPaddedString(int32 Int, FString& PaddedString);" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" " & @CRLF & _
"};" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm