Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
four20jones
1 discussion post
I was wondering if there was a way to script a macro to
Get current Mouse Position x & y
"execute other commands"
Recall and move mouse to the stored X/Y?

Also can anybody point me to a scripting tutorial for voiceBot macros?
Mar 27, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
You sure can! Try something like this out:

Code

using System;
using System.Drawing;

public static class VoiceBotScript
{
    public static void Run(IntPtr windowHandle)
    {
        // Store the mouse position
        Point originalMousePosition = new Point(BFS.Input.GetMousePositionX(), BFS.Input.GetMousePositionY());
        
        // Do stuff here
        
        // Restore the mouse position
        BFS.Input.SetMousePosition(originalMousePosition.X, originalMousePosition.Y);
    }
}


Unfortunately we don't have any scripting tutorials. The code is written in C#, so you could start with something like this: https://csharp-station.com/Tutorial/CSharp/Lesson01

In VoiceBot (and other Binary Fortress apps), there's a BFS namespace that has a bunch of pre-built functions. If you type
BFS.
into the code editor, you'll get an Intellisense style list that gives you some options to start with. Hovering the mouse over them will give descriptions and examples. We also have them listed here: https://www.voicebot.net/Profiles/Help/

Hope that helps!
Mar 28, 2019  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)