Jump to content

BruceCopperField

Active Members
  • Posts

    82
  • Joined

  • Last visited

Profile Information

  • Location
    afghanistan

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

BruceCopperField's Achievements

Wayfarer

Wayfarer (2/7)

3

Reputation

  1. And more importantly, I read my help files before posting my questions. Dogs don't eat help file. They eat dog food. Use your mind little kid and learn how to answer questions in proper manner. Or just simply STFU.
  2. By the way, I am using an old PS/2 optical mouse. Probably the PS/2 mouse driver is an issue.
  3. So, in that case why these don't result in a logical left click in a swapped mouse? ControlClick ( $vboxTitle, "", $buttonID, "primary") ControlClick ( $vboxTitle, "", $buttonID, "right") Because as decribed in the help file the first one always cause the primay click. And, the second one should cause a logical left click because the physical right button is now assigned as the logical left button due to the swap. And this should not cause any click at all (but it does in my test) ControlClick ( $vboxTitle, "", $buttonID, "left") because now physical left button is the logic right button
  4. I swapped the mouse buttons and used ControlClick to click a button control (the Next button of an installation window). These don't work: ControlClick ( $vboxTitle, "", $buttonID, "primary") ControlClick ( $vboxTitle, "", $buttonID, "right") The button isn't clicked. No left click. But I expect the above should make a left click because 'right' = left button now and 'Primary' should always=left. This works ControlClick ( $vboxTitle, "", $buttonID, "left") So probably the left/right/primary keywords for ControlClick doesnt honor swapped mouse button. My version is v3.3.6.1
  5. Actually, what I want to know is exactly what that something is. The description in the help file is too general. If they're exactly corresponding to, say, show state returned from GetWindowPlacement then I can use the MSDN as the more concrete reference to interpret the return value of WinGetState.
  6. In WinSetState(), the flag parameter showing some names similar to those used by win32 ShowWindow() function, so I guess WinSetState() mainly forwards calls to win32 ShowWindow() and the flag is the nCmdShow parameter we normally supply to the win32 ShowWindow(). But, what are the states returned by WinGetState()? What do they correspond to? Is it the show state found in the WINDOWPLACEMENT structure returned by the win32 GetWindowPlacement() function?
  7. I tried this many times with different variation but is having no luck so far. I need to send mouse click to the background browser running a Java Applet. I tried MouseClick() and the click is okay. But I need the automated browser running in the background so I've to used ControlClick(). But so far, all I can do with ControlClick() is to cause the Applet to click on the current position of the cursor even I've explicitly specified another x,y coordinate in the ControlClick() call. A click can be simulated but always on the wrong location. Is it a limitation of Java Applet ? Here is my test code: WinActivate("ShowApplet") WinWaitActive("ShowApplet") sleep(1500) ; no click done at all if using Internet Explorer_Server control ;ControlFocus ( "ShowApplet", "", "[CLASSNN:Internet Explorer_Server1]") ;ControlClick ("ShowApplet", "", "[CLASSNN:Internet Explorer_Server1]","left", 1, 11,290) ; For SunAwtCanvas control. only clicks on the current cursor position, not the 216,390 I specified ControlFocus ( "ShowApplet", "", "[CLASSNN:SunAwtCanvas1]") ControlClick ("ShowApplet", "", "[CLASSNN:SunAwtCanvas1]","left", 1, 216,390)
  8. My description was not accurate enough. Let me clarify the problem a bit. The issue I encountered was the ControlClick() just clicked on the current mouse pointer position regardless of what x,y value I gave it - if the control I am trying to click on is a Java Applet control.
  9. My appli. is a java applet in browser having a SunAwtCanvas under the Internet Explorer_Server control. I can use MouseClick() to move the mouse and give it a click at my desired position. But when I use ControlClick(), it will only click on the current position of the mouse without moving it to the specified position. Is it a nature of the SunAwtCanvas control that prevent ControlClick() or did I made any miistake?. My test code is here: Opt("WinTitleMatchMode",2);substring Opt("MouseCoordMode", 0) ; relative to active windows WinActivate($title) WinWaitActive($title) sleep(1500) ControlFocus ( $title, "", "[CLASSNN:SunAwtCanvas1]") ; ================================================================================================ ;not working just click on the current mouse position ControlClick ($title, "", "[CLASSNN:SunAwtCanvas1]","left", 1, 216,390) ; ================================================================================================ ; these works!!! ;MouseClick ( "primary" , 135, 417, 1, 11) ;MouseClick ( "primary" , 10, 200, 1, 1)
  10. My application is an applet running in browser. It got an SunAwtCanvas1 control under Internet Explorer_Server control. I want to click it while it is running in the background. I have tried using ControlClick() to it in the background. But it seems that it is not responding. Does anyone have similiar experience with SunAwtCanvas1 control ? Can I ControlClick() it in the background?
  11. I am not quite familiar with Windows security. If I started a few processes under another user id using RunAs in Windows menu, would I be still able to see the Windows created by them and send keystroke/mouseclick to them? Would the security model be the same for XP and Vista?
  12. Most of the function definitions in <IE.au3> are using ByRef for the object reference e.g. _IEFormElementSetValue ( ByRef $o_object, .....). So if I got an object returned by _IEGetObjById() and want to pass it to _IEFormElementSetValue (), is it a must to use ByRef in all my intermediate function parameters passing the $o_object reference ? Since _IEFormElementSetValue () is expecting a ByRef $o_object.
  13. The example script given in "_IEFormElementSetValue ()" manual for <input type=file> no longer works in IE8. I am looking for a way to work around. In IE8 the security setting has been changed that we are no longer able to send keystroke to the <input type=file>'s input box. It is now readonly. Because Micro$oft thinks that allowing the users to key in the full path directly would expose the full path name to the server if the document simply use keydown handler to intercept the keystrokes. It seems now that we must click the browse button and key in the filename in that Choose file window. I know the title of that choose file Window is "Choose File" in English Windows. But my script need to be executed in Windows of various language. I cannot hard code the title string into my script. Is there a portable way to send keystroke as in the old days?
  14. I am a bit confused by the difference between WinList() Vs _WinAPI_EnumWindowsTop (). According to the manual WinList() without any arguments will be: "If no title and text is given then all top-level windows are returned." and _WinAPI_EnumWindowsTop () will enumerates all top-level windows. These two sound the same to me but when I tried, WinList() return more things then _WinAPI_EnumWindowsTop () with something I have no idea what they are: winapi() testWinList() Func winapi() Local $winArr ;$winArr = _WinAPI_EnumWindowsPopup() $winArr = _WinAPI_EnumWindowsTop () For $i = 1 To $winArr[0][0] alert(WinGetTitle($winArr[$i][0])) Next EndFunc Func testWinList() Local $winArr = WinList() For $i = 1 To $winArr[0][0] alert($winArr[$i][0]) Next EndFunc The 2nd function return a lot more things like CiceroUIWndFrame/SysFader and a lot of blank titles!
  15. I know currently Autoit is using the title text to identify a window. However, my script could be run on Windows of various languages and I cannot foresee the title text in advance since there will be some language I do not understand. I would like to use process Id to get the Window but isn't sure how to. I know the process Id of my target Window which is spawn by my process. Then I just use WinList() to enumerate all and select those with the desired pid: enumProcesWindows(2046, $allHWND) Func enumProcessWindows(Const $pid, ByRef $allHWND) Local $winList=WinList() For $i = 1 To $winList[0][0] If WinGetProcess($winList[$i][1]) = $pid Then _ArrayAdd($allHWND, $winList[$i][1]) EndIf Next EndFunc My $allHWND array would contains all the controls belonging to my pid. But the problem is, the array contains handle to my target Window as well as its child controls. How could I tell which one is a control of my window which one is my window's handle?
×
×
  • Create New...