I have tried to use a combination of get_offsetheight,get_offsetwidth,get_offsettop and getoffsetleft but the values returned are in reference to the immediate parent.
kartikdasani
Posts
-
How do i get the screen coordinates of an IHTMLElement? -
Problem using IAccessible2I have been trying to write automation code for Mozilla Firefox and need to use the IAccessible2 interface in my code. The problem is that I keep getting the error : No such interface supported. I have registered the IAccessible2Proxy.dll. But still get the error.
-
Getting the options from a Html.SELECT objectIs there a way to get the options in a Html.SELECT object (Combo box) without using the IDispatch. The reason for not using IDispatch is that I am using FireFox which does not have/support/implement IDispatch. All I can use is IAccessible. Any Suggestions.
-
Program execution hangs at accSelect.Clean up does not help either.
-
Program execution hangs at accSelect.The same problem occurs even when i give both the flags as follows:
hr = pAcc->accSelect((SELFLAG_TAKEFOCUS | SELFLAG_TAKESELECTION), varItem);
-
Program execution hangs at accSelect.I use the following lines of code in my program to get focus to a particular object and select it: hr = (SELFLAG_TAKEFOCUS,varTemp); hr = pTempAcc->accLocation(&left,&top,&width,&height,varTemp); The trouble is that after the my program has been running for a while ( as such there is no specific limit or minimum), the execution just hangs at pTempAcc->accSelect() and the only way to stop it is a forced exit. Can anyone tell me why this might happen.
-
CPU usage per processIs there a way to list the CPU usage per process of all the processes that are currently running in the system. What I mean is CPU % usage as is shown in the Taskmanager. I have tried a few API like sigar and JavaSysMon but am not able to get accurate values of the %'s.
-
Execute commands in putty prompt through javaI need to execute unix commands in the putty prompt via java code. So far : String[] cmdArray = {"putty.exe", "server IP"}; Runtime.exec(cmdArray); has got the prompt open. Need help to interact with this window and execute other commands.
-
Taskbar button text [modified]I am trying to get the list of windows displayed in the windows taskbar and am doing so in the following manner:
HWND hDesktop = GetDesktopWindow();
HWND hTray = FindWindow(_T("Shell_TrayWnd"), NULL );
HWND hReBar = FindWindowEx( hTray, NULL, _T("ReBarWindow32") , NULL );
HWND hTask = FindWindowEx( hReBar, NULL, _T("MSTaskSwWClass") , NULL );
HWND hToolbar = FindWindowEx(hTask,NULL,_T("ToolbarWindow32") , _T("Running Applications") );
long cnt = SendMessage(hToolbar, TB_BUTTONCOUNT,0,0);
long pid,hprocess,text,len;
WCHAR * buttontext[128];
GetWindowThreadProcessId(hToolbar(LPDWORD)pid);
hprocess = (long)OpenProcess(PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION,0,pid);
text = (long)VirtualAllocEx((HANDLE)hprocess,0,sizeof(buttontext),MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
for(int i=0;i<cnt;i++)
{
len = SendMessage(hToolbar,TB_GETBUTTONTEXT,i,(LPARAM)text);
if(len>-1)
{
ReadProcessMemory((HANDLE)hprocess, (LPCVOID)text,buttontext,sizeof(buttontext),NULL);
wcout<<buttontext<<"\n";
}
}I have not been able to get the text and any other message eg:TB_PRESSBUTTON doesn't work either. Any suggestions?
modified on Friday, July 29, 2011 8:38 AM
-
Cannot understand this Error log# # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d9ac0c6, pid=1972, tid=932 # # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode, sharing windows-x86) # Problematic frame: # V [jvm.dll+0x13c0c6] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x02aac800): VMThread [stack: 0x02b90000,0x02be0000] [id=932] ......................and it goes on to give a lot of other data. How do I interpret it?
-
right-click on windows taskbarWhat I want to do is to right-click on a Button on the TaskBar corresponding to a particular running application and then select one of the actions from the Menu that shows. Any suggestions?
-
right-click on windows taskbarI need to right-click on the windows taskbar on the button of a particular application and then select one of the actions in the menu (maximize,restore,close/exit). Have been trying to get a handle to the taskbar as follows: HWND hDesktop = GetDesktopWindow(); HWND hTray = FindWindowEx( hDesktop, NULL, _T("Shell_TrayWnd"), NULL ); HWND hReBar = FindWindowEx( hTray, NULL, _T("ReBarWindow32") , NULL ); HWND hTask = FindWindowEx( hReBar, NULL, _T("MSTaskSwWClass") , NULL ); HWND hToolbar = FindWindowEx( hTask, NULL, _T("ToolbarWindow32") , NULL ); But I dont know what to do beyond that or if I am actually getting the correct handle.
-
Need to detect the properties of any object on an application window.How about the current set of properties for example : the page contains a listview and the text of the listview items is set at a particular set of properties font,size,color etc. Now can we get the properties of the currently displayed text in the listview.
-
Need to detect the properties of any object on an application window.Need a way to detect the properties of the text of any object on an application window example the displayed name of a button or a tab, label etc. Is there a means to get properties like : 1. name of the font 2. color of the font 3. size of the font 4. bold/italic/regular etc..
-
Regex to find an alphanumeric sequence in a block of text.I need to find an alphanumeric sequence example:1wer3rtyu4sd inside a block of text to which the alpanumeric sequence is unique. I am using the following piece of code: Pattern pattern = Pattern.compile(regex);//need a proper regex Matcher matcher = pattern.matcher(strLine); //strLine consists the text if (matcher.find()) { System.out.println(matcher.group()); System.out.println(matcher.groupCount()); }
-
Image identificationI want to identify an image in an application window. To be more specific, I want to know how i can identify if the image exists and if it is at the right location in the window.
-
embed an excel sheet into a java GUII need to embed an excel sheet into a java GUI. Read online that it can be done using "owc". Can someone please tell me how I can use "owc" in my java code.
-
random runtime crash# A fatal error has been detected by the Java Runtime Environment: # # Internal Error (0xe06d7363), pid=3292, tid=820 # # JRE version: 6.0_17-b04 # Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode, sharing windows-x86 ) # Problematic frame: # C [kernel32.dll+0x12aeb] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # I receive the following error intermittently while running a batch of scripts. The problem is that it only happens some times and randomly. Any suggestions to stop this from happening are welcome.