Jump to content

Set focus on the current window without title and text

Recommended Posts


Hi Guys,

I have integrated autoIT with eclipse and i need to automate one desktop base application. But on the very first screen there is not title and text its a simple image with 4 fields. i need to know how can i set focus on the current window without title and text. 

Screen shot is mentioned. Please let me know how to set focus on window.

package Package;

import java.io.File;
import java.io.IOException;

import junit.framework.Assert;
import autoitx4java.AutoItX;

import com.jacob.com.LibraryLoader;

public class App
    public static void main( String args[] ) throws InterruptedException
        String jacobDllVersionToUse;
        //String jacobDllVersionToUse;

        if (jvmBitVersion().contains("32"))
        jacobDllVersionToUse = "jacob-1.18-x86.dll";
        else {
        jacobDllVersionToUse = "jacob-1.18-x64.dll";
        File file = new File("lib", jacobDllVersionToUse);
        System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());
        AutoItX x = new AutoItX();    
    //Launched BRMFO application
    //    String $hWnd = "";            
        boolean i;
    x.run("C:\\Program Files\\Craft Silicon\\Bankers Realm MFO\\Bin\\BRealmMFO_R13_89.exe");
    String brmfo = "x.run(C:\\Program Files\\Craft Silicon\\Bankers Realm MFO\\Bin\\BRealmMFO_R13_89.exe)";
    brmfo = x.winGetHandle("[ACTIVE]");

//    i = x.mouseMove(182, 184);
    x.controlClick("", "", "");
    System.out.println("TAB pressed");
    System.out.println("Enter ID");

private static String jvmBitVersion() {
    return System.getProperty("sun.arch.data.model");


Edited by YashShrivastava

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.