Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Muadiv
6 discussion posts
Hi, I have already some script to put the code in an RSA window, and take the code.
But I want a little bit more.
Let me write in human language:

If window is open(hidden), focus and:
insert the ping
copy the password
close
is is not open, open it and
insert the ping
copy the password
close


Could anyone help me to get this?
My code already is:

Code

using System;
using System.Collections.Generic;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        
        BFS.Clipboard.PasteText("123456");
        //BFS.Input.SendKeys("{VK_13}");
        BFS.Input.SendKeys("{TAB}");
        BFS.Input.SendKeys("{ENTER}");
        //BFS.Clipboard.Copy();
        text = BFS.Clipboard.CopyText();
        return text;
    }
}
May 24, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Are you able to open the window via a command line? Or does it have to be clicked from a tray menu or something?
May 24, 2019  • #2
User Image
Muadiv
6 discussion posts
Yes, I can open from command line.
Also the tab command and enter to copy the code, not always works...
May 24, 2019 (modified May 24, 2019)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, try something like this (paste it in before your code and update the EXE names and paths.

Code

if (BFS.Application.IsAppRunningByFile("*notepad.exe")
        {
            BFS.Window.Focus(BFS.Application.GetMainWindowByFile("*notepad.exe");
        }
        else
        {
            BFS.Application.Start(@"C:\path\to\exe");
        }
        
        BFS.General.ThreadWait(2000);
May 24, 2019  • #4
User Image
Muadiv
6 discussion posts
Perfect, worked ! Thanks Keith :) !
May 24, 2019  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)