
Aditya
Active Members-
Posts
23 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by Aditya
-
I encountered Microsoft Access Web Datasheet while using SharePoint 2007. Access Web Datasheet provides an Excel-like environment for viewing and editing data. And of course, I'm accessing it through IE. The Window info tool recognizes it as [CLASS:List Datasheet Window Class; INSTANCE:1]. I wasn't successful in finding much about this new control, which is part of Microsoft Office. Has anyone played with this type of control preferably through AutoIt? Or if someone knows any OLE objects that can access this control directly, that'd be great too. Thanks.
-
Did any one get the Access Bridge to install & work on 64-bit Windows 7? I tried following the instructions @ http://java.sun.com/javase/technologies/accessibility/accessbridge/2.0.1/docs/setup.html but I couldn't get Ferret to recognize any Java events.
-
The devs, its our app.
-
My application is minimized to tray & I am trying to use PostMessage to open it. The code in C++ would be: ::PostMessage(m_hwndTray, WM_COMMAND, MAKEWPARAM(ID_CLIENT, 0), 0); where ID_CLIENT is ID of the control of our app, which forces the window to open or show. I am trying to do the same in AutoIT & here is my snippet: #include <WinAPI.au3> #include <WindowsConstants.au3> $hWnd = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') $ID_CLIENT = 32788 ; this is the ID of the control to which message will be sent. _WinAPI_PostMessage($hWnd, $WM_COMMAND, $ID_CLIENT, 0)) The only problem I have is the MAKEWPARAM macro which gives me the wParam from the ID of the control. How to do this in AutoIT?
-
Getting the items in a ListView (or ListBox)
Aditya replied to Aditya's topic in AutoIt General Help and Support
Turns out it is a ListBox. I used Win32 API (SendMessage) directly & send the LB_GETCOUNT message to the control & I got the right number of items listed in the control. So why is that the ControlCommand is failing on any method I use on that control? Am I missing some params? -
I have a control that I couldn't figure out whether it is a ListBox or a ListView. So, I tried to use both ControlCommand and ControlListView & ControlCommand consistently gave errors, which makes me think it might be ListView. Here is the info from the window info tool: >>>> Control <<<< Class: ATL:0048B110 Instance: 1 ClassnameNN: ATL:0048B1101 Name: Advanced (Class): [CLASS:ATL:0048B110; INSTANCE:1] ID: 10129 Text: Position: 81, 218 Size: 272, 90 ControlClick Coords: 113, 38 Style: 0x50010081 ExStyle: 0x00000000 Handle: 0x000F097E >>>> Mouse <<<< Position: 617, 666 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Button1 Make the following selection to complete the connection. Please select a &Role: &Save settings &Connect C&ancel >>>> Hidden Text <<<< &Info &Retry &Upgrade C&lose &Continue Here is what I tried on the above control: val = ControlListView("Pulse", "Make the following selection to complete the connection.", "[ID:10129]", "GetItemCount", "", "") ConsoleWrite ("Item Count: " & $val & @CRLF & "ControlListView error: " & @error & @CRLF) ConsoleWrite( "Current Selection: " & ControlCommand('Pulse', 'Make the following selection to complete the connection.', '[ID:10209]', "GetCurrentSelection", "") & @CRLF & "ControlCommand error: " & @error & @CRLF) and here is the output I get: Item Count: 0 ControlListView error: 0 Current Selection: 0 ControlCommand error: 1 So, it seems it is a ListView but for some reason I cannot get any method to get any result on that control. Any ideas what might be wrong? Thanks.
-
Nevermind WinSetState is the answer, even though it does not simulate double-click.
-
I have an app that minimizes to the system tray (i.e. window does not appear any more). When you double click on the tray icon (or right click & click open), the window show up. I can't seem to find a way to do this. All the other similar requests I found talk about autoit GUI. But I want to do it for our app. Is that even possible?
-
Is there any method that when given a controlID will return saying whether the control exists or not? I am looking through the API for control methods I don't see any thing that is close to what I want. Is there some other way to achieve the same result?
-
Automation with multiple desktops
Aditya replied to Aditya's topic in AutoIt General Help and Support
Actually I was going in that direction with your tcp idea . But, I want to be able to control the processes (& probably hook to them) inside of that second desktop. Does that make sense. If you implement every thing as a server client model, you have to implement a lot of stuff. Or am I missing this completely? -
Automation with multiple desktops
Aditya replied to Aditya's topic in AutoIt General Help and Support
Now that I think about it you can probably do some thing on these lines: 1) Create some sort of auto launch script, which would launch when the virtual desktop launches. 2) This script will create a PIPE that you can use to communicate with scripts on real desktop. 3) Send commands & response back & forth for controlling actions inside of the virtual desktop from the real desktop. Any comments? -
Automation with multiple desktops
Aditya replied to Aditya's topic in AutoIt General Help and Support
Yeah, but you still have to launch the automation script (which will run in inside desktop) from the outside desktop. So my initial hang up was, can I launch an application or script inside desktop 1 from desktop 2. Wouldn't the process space be completely different? -
This post is somewhat related or rather inspired from: http://www.autoitscript.com/forum/index.php?showtopic=30083&st=0&p=214878&hl=sanboxie&fromsearch=1&#entry214878 http://www.autoitscript.com/forum/index.php?showtopic=105715&st=0&p=747033&#entry747033 If I have softwares like Sandboxie or other Virtual Desktop solutions installed, which can provide application instance isolation, how can I automate those applications from outside of that desktop? In most cases what these virtual desktop solutions do is to create another explorer.exe instance (which essentially gives you another desktop) & installed applications are allowed to run in that space. Even though I have to no initial code to show for, I was just wondering how would you go about controlling applications from outside the desktop of interest. So if I have 2 desktops running with their own applications, how would I go about controlling applications in desktop 2 form desktop 1? Any suggestions.
-
Make chroot jail sandbox for windows?
Aditya replied to Nooop's topic in AutoIt General Help and Support
Are you talking about creating a sandbox environment using Autoit? Or automate operations inside a sandbox environment. If you meant the former try solutions like Sandboxie. -
Selenium RC is a proxy for the Selenium core, which does the actual work. That is why you will see two browser windows opened when you use Selenium RC. So are you sure you are attaching to the right window?
-
I think I finally got the answer to my original question, when I posted it here - http://perlmonks.org/?node_id=804864. The function was returning a pointer and not a Perl object. So I have to create a Perl object from that pointer. I still have to do that part but it is the answer I was looking for. When I finish my code, I'll post it here for future reference. Thanks for all your help.
-
Never mind, I got the answer to that question in the forums.
-
Looking at it from another angle, can't I just convert the IE.au3 to a dll & call the methods directly from Perl (or any other language for that matter)? Will that work?
-
$idisp->Script(); But, Perl complains that it cannot locate the method - most probably because it is not an object reference.
-
Yup, my packing was wrong - here is the updated one: my $aInt = pack('LSSC8',0x626FC520,0xA41E,0x11CF,0xA7,0x31,0x00,0xA0,0xC9,0x08,0x26,0x37); Another change I made was to unpack the $lresult (I dunno why it was accepting the unpacked lresult) that I get back from SendMessageTimeout. So my updated code looks like this: my $co_init = new Win32::API('ole32', 'CoInitialize', 'P', 'I'); $co_init->Call(0); my $reg_window = new Win32::API('user32', 'RegisterWindowMessage', 'P', 'I'); my $html_obj = $reg_window->Call('WM_HTML_GETOBJECT'); my $SMTO_ABORTIFHUNG = 0x0002; my $lresult = " " x 80; my $send_msg = new Win32::API('user32', 'SendMessageTimeout', 'NIIIIIP', 'N'); $send_msg->Call(hex($hwnd), $html_obj, 0, 0, $SMTO_ABORTIFHUNG, 1000, $lresult); $lresult = unpack('L', $lresult); my $aInt = pack('LSSC8',0x626FC520,0xA41E,0x11CF,0xA7,0x31,0x00,0xA0,0xC9,0x08,0x26,0x37); my $obj = new Win32::API('oleacc', 'ObjectFromLresult', 'PPIP' , 'N'); my $idisp = " " x 8; my $obj = new Win32::API('oleacc', 'ObjectFromLresult', 'NPIP' , 'N'); my $ret = $obj->Call($lresult, $aInt, 0, $idisp); print "Error: ", $autoIt->error(), "\n"; print "ret: ", $ret, "\n", "ie: ", $idisp, "\n", "idisp: ", unpack('L', $idisp), "\n"; Now, I do get some value set for $idisp and is a scalar reference. I guess this is the COM object I am looking for, but I am unable to call methods like Script.Document etc on it directly. So I guess I have to dig a little more.
-
Thanks for pointing it out, but adding that didn't help. Also the solution in the link you provided uses SendMessage, which works only with Vista & higher. I am trying to make this work in XP.
-
Here is how far I got and the code below is continued from the post above. my $reg_window = new Win32::API('user32', 'RegisterWindowMessage', 'P', 'I'); my $html_obj = $reg_window->Call('WM_HTML_GETOBJECT'); my $SMTO_ABORTIFHUNG = 0x0002; my $lresult = " " x 80; my $send_msg = new Win32::API('user32', 'SendMessageTimeout', 'NIIIIIP', 'N'); $send_msg->Call(hex($hwnd), $html_obj, 0, 0, $SMTO_ABORTIFHUNG, 1000, $lresult); my $aInt = pack('IIII', 0x626FC520, 0xA41E, 0x11CF, [0xA7, 0x31, 0x0, 0xA0, 0xC9, 0x8, 0x26, 0x37]); my $obj = new Win32::API('oleacc', 'ObjectFromLresult', 'PPIP' , 'N'); my $idisp = 0; my $ret = $obj->Call($lresult, $aInt, 0, $idisp); print "ret: ", $ret, "\n", "ie: ", $idisp, "\n"; But $idsp is always 0. So something is wrong in my code. Any suggestions?
-
First of all I am not a windows programmer, so some of my terminology might be off. So bear with me. I am trying to translate IE.au3 UDF in to Perl - specifically _IEAttach function. I got as far as to get the HWND of an embedded IE in Perl. The code is pretty simple: use strict; use warnings; use Win32::API; use Win32::OLE; my $autoIt = Win32::OLE->new("AutoItX3.Control"); my $app_title = "Test App"; my $nc_path = "C:/Program Files/Test App/TestApp.exe"; my $win_title_match = $autoIt->Opt("WinTitleMatchMode", 1); my $hwnd = $autoIt->ControlGetHandle($nc_title, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]"); Now that I have got the HWND of the embedded IE in my test application, the next step is to get the COM object or rather IDispatch object using that HWND. In IE.au3, __IEControlGetObjFromHWND() does that job & as I was reading that code, it was making calls to DllCall(). Where is this method from? Is is part of the AutoItX? I couldn't find it in the AutoItX help file. Or is it from the Win32 API? Or even better, does any one know how to get IDispatch object from a HWND directly in Perl? I am guessing, probably Win32::API but I am not sure. Any ideas?