SimHub EasyScript

SimHub EasyScript 2.0.0

Login or Register an account to download this content
Important: v2.0.0 requires SimHub v9.0.0 and beyond. This is due to a change to the Editor Dialog. The Plugin will work, but you can't edit scripts.
Therefore Plugin v1.1.0 and prior are not compatible with SimHub v9.0.0.

Create Custom Events, Properties and do Logging, configured through the UI, using SimHub's built in NCalc/JScript engine.

SimHub is required for this plugin to work: Download

Current Features
  • Events
    • Write a NCalc/JScript expresion as condition
    • Set the Update Rate for how often the condition should be checked
    • Set if the event should trigger when the condition goes from false to true (Rising), true to false (Falling), or Both
  • Propertys
    • Write the Output of the property as a NCalc/JScript function
    • Set the Update Rate for how often the property should be updated
    • And or run the update for the property in parallel (spawning the async task costs time too, so only worth it on large JScript functions)
    • Choice from Boolean, Int, Double, TimeSpan or String as DataType
  • Logging
    • Create an Action (which you can then attach to an Event or Input in "Controls and events") that logs to a file
      • Multiple Actions can log to the same file
      • Files will be created if they don't exist (as long as the folders exist)
    • The Output is what your NCalc/JScript function return, meaning the output is dynamic
    • Uncheck the Checkbox in the First Colum to temporally disable this action
  • Exporting And Importing of your creations

Images

2022-08-19 (1).png


2022-08-19 (2).png


2022-08-19 (3).png


Installation
  1. Make sure to have SimHub installed and set up
  2. Download EasyScript
  3. Extract the SimHub-EasyScript.dll and place it into the SimHub root folder
  4. Upon starting SimHub it will prompt you to enable the Plugin (you may select "Show In left main menu")
  5. You will find it now in the Left Menu (as it's own tile, or in the 3 dots menu "Additional Plugins")

Usage Advice:
If you want to exit the coding window without saving changes, then you can select None instead of Computed Value (compared to Dashboard mapping this won't delete your code).
Or you press ESC


Source Code: Here

Latest updates

  1. v2.0.0: Fixed Compatibilty with SimHub v9+

    -Recompiled to fix incompatibilty with v9 and higher of SimHub -Fixed "Select File" now opening...
  2. v1.1.0 - Import/Export And Critical Bug Fix

    -Added Ability to Import and Export Scripts -Fixed Bug with number types in Propertys not...

Latest reviews

Brilliant plugin but it looks like it is not compatible with latest Simhub versions any longer. When I press "Edit Connection" button nothing happens. I Simhub's logs I find this error message:

[2023-09-18 10:17:19,945] ERROR - Unhandled dispatcher errorSystem.MissingMethodException: Method not found: 'Void SimHub.Plugins.UI.SHDialogContentBase.ShowDialog(System.Windows.DependencyObject, System.Action)'.
at Easy_Script.UI.View.ListEditor.BtnEdit_Click(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
...
Amazing! Been looking for something that does this for years!!! Absolutely fantastic, works like a charm. Thanks so much for sharing this tool!

Latest News

Author
TheLichten
Downloads
398
File size
43.9 KB
Views
9,922
First release
Last update
User rating
4.50 star(s) 2 ratings

More mods from TheLichten

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top