use of com.jacob.com.Variant in project selenium_java by sergueik.
the class AutoItX method winMenuSelectItem.
public boolean winMenuSelectItem(String title, String text, String item, String item2) {
Variant vTitle = new Variant(title);
Variant vText = new Variant(text);
Variant vItem = new Variant(item);
Variant vItem2 = new Variant(item2);
Variant[] params = new Variant[] { vTitle, vText, vItem, vItem2 };
Variant result = autoItX.invoke("WinMenuSelectItem", params);
return oneToTrue(result.getInt());
}
use of com.jacob.com.Variant in project selenium_java by sergueik.
the class AutoItX method winList.
public String[][] winList(String title, String text) {
Variant result = winVariant(title, text, "WinList");
SafeArray arr = result.toSafeArray();
int entries = arr.getInt(0, 0);
String[][] resultArr = new String[2][entries + 1];
for (int i = 0; i <= entries; i++) {
resultArr[0][i] = arr.getString(0, i);
resultArr[1][i] = arr.getString(1, i);
}
return resultArr;
}
use of com.jacob.com.Variant in project selenium_java by sergueik.
the class AutoItX method controlGetFocus.
public String controlGetFocus(String title, String text) {
Variant vTitle = new Variant(title);
Variant vText = new Variant(text);
Variant[] params = new Variant[] { vTitle, vText };
return autoItX.invoke("ControlGetFocus", params).getString();
}
use of com.jacob.com.Variant in project selenium_java by sergueik.
the class AutoItX method winSetTitle.
public void winSetTitle(String title, String text, String newtitle) {
Variant vTitle = new Variant(title);
Variant vText = new Variant(text);
Variant vNewtitle = new Variant(newtitle);
Variant[] params = new Variant[] { vTitle, vText, vNewtitle };
autoItX.invoke("WinSetTitle", params);
}
use of com.jacob.com.Variant in project selenium_java by sergueik.
the class AutoItX method regRead.
public String regRead(String keyname, String valueName) {
Variant vKeyname = new Variant(keyname);
Variant vValueName = new Variant(valueName);
Variant[] params = new Variant[] { vKeyname, vValueName };
Variant result = autoItX.invoke("RegRead", params);
if (result.getvt() == Variant.VariantInt) {
return String.valueOf(result.getInt());
}
if (result.getvt() == Variant.VariantString) {
return result.getString();
}
return "";
}
Aggregations