nitekram Posted January 16, 2015 Posted January 16, 2015 (edited) I have created a script, but there is an issue with actually finding an existing window. When the window is actually running in the start bar (not sure about that name, but the applications that are running to the right of the Start Button), it works fine. It is when you close the window, and the application is still running in the area where the time is - also in the start bar area, but where the services are running. My question is, how do I make sure, before I start trying to interact with that window, that the window is actually not running as a service, but running as a window. Let me know if I am not clearly stating my issue. I have written code, but I believe that this is not a code issue, but WinExists() not showing the right status? EDIT I have tried both the title and the class name WindowsForms10.Window.8.app.0.3ce0bb8, but in both cases, the WinExists shows it exist, even though it is not in the start bar EDIT 2 I have found a small work around, for now. I am just restarting the application, but there should be a way of finding appications running, compared to services or processes running? Edited January 16, 2015 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Moderators SmOke_N Posted January 16, 2015 Moderators Posted January 16, 2015 (edited) Yes, your message is confusing. Services don't run GUI's/Windows. Edit: It may be the window/GUI is hidden or out of view range. Have you tried to set the status to visible or within view range? Edit2: Look at the first example of WinList() (they've really murdered this helpfile and it's actual ability to help novices IMO)... There used to be a function called _IsVisible() with this code: BitAND(WinGetState($aList[$i][1]), 2) Now they've removed the function, and expect everyone to know what that actually means ... Anyway, (BitAND(WinGetState($aList[$i][1]), 2) = 2) will check if the window is visible or not. Edited January 16, 2015 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
nitekram Posted January 16, 2015 Author Posted January 16, 2015 Thanks, I will try that. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
nitekram Posted January 16, 2015 Author Posted January 16, 2015 Ok, I have tried it, but getting something strange. Local $aList = WinList() ; Loop through the array displaying only visable windows with a title. For $i = 1 To $aList[0][0] If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then ;ConsoleWrite("Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1] & @CRLF) ;IniWrite('junk.ini', 'active', $aList[$i][0], $aList[$i][1]) ;#cs If $aList[$i][0] = $sExtension Then MsgBox('', "", "Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1]) Else MsgBox('', '', 'not running, but starting it now') Run("C:\Program Files (x86)\Shoreline Communications\ShoreWare Client\ShoreTel.exe") ExitLoop EndIf ;#ce EndIf Next Even though the window is visible, it does not see it when I check it against by variable $sExtension, so there is so far no way for me to search for it first. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
jdelaney Posted January 16, 2015 Posted January 16, 2015 It would be more accurate, and reliable, to get the processID, and then use that when looping through the winlist. The processname will always be the same...the window title can change at any given point in time (possibly). Grab all your processes, and use: _WinAPI_GetWindowThreadProcessId Durring your winlist loop...if they match, then that window is the one you are looking for. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
nitekram Posted January 16, 2015 Author Posted January 16, 2015 I am not sure I follow, as I did retrieve the process ID, but I think, as @SmOke_N has said, I believe it is a hidden window...but finding it is becomeing and issue. Local $aList = WinList() Local $hWnd = WinGetHandle($sExtension) Local $iPID = 0 Local $aProcessID = _WinAPI_GetWindowThreadProcessId($hWnd, $iPID) MsgBox('','$aProcessID',$aProcessID & ' ' & $iPID) Local $aProcessListAll = ProcessList() _ArrayDisplay($aProcessListAll) ;Exit ; Loop through the array displaying only visable windows with a title. For $i = 1 To $aList[0][0] If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then ;ConsoleWrite("Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1] & @CRLF) ;IniWrite('junk.ini', 'active', $aList[$i][0], $aList[$i][1]) ;#cs If $aList[$i][0] = $sExtension Or _WinAPI_GetWindowThreadProcessId($hWnd, $iPID) = 7472 Then MsgBox('', "", "Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1]) Exit Else MsgBox('', '', 'not running, but starting it now') Run("C:\Program Files (x86)\Shoreline Communications\ShoreWare Client\ShoreTel.exe") ExitLoop EndIf ;#ce EndIf Next Exit 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Moderators SmOke_N Posted January 16, 2015 Moderators Posted January 16, 2015 Grab all your processes, and use: _WinAPI_GetWindowThreadProcessId Durring your winlist loop...if they match, then that window is the one you are looking for. Now you have my curiosity peeked. Why would you do that instead of using WinGetProcess() if you already know the hwnd? @nitekram: Can you break down step by step what you want to accomplish? I have a feeling it's very little code, but this could drag on and on if we don't know specifically. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Moderators SmOke_N Posted January 16, 2015 Moderators Posted January 16, 2015 I'm taking a guess that you're trying to do something like: Global $ghWnd = _myWinFunc("[CLASS:WindowsForms10.Window.8.app.0.3ce0bb8]") ConsoleWrite("hwnd: " & $ghWnd & " | error: " & @error & @CRLF) Func _myWinFunc($sTitle, $sText = "", $bShow = True, $bPosDesktop = True, $bActivate = True) Local $hWnd = WinGetHandle($sTitle, $sText) If Not $hWnd Then Return SetError(1, 0, 0) ; window doesn't exist EndIf Local $iState = BitAND(WinGetState($hWnd), 2) ; get window size Local $aWinPos = WinGetPos($hWnd) If Not IsArray($aWinPos) Then Return SetError(2, 0, 0) ; oops EndIf Local $aDesktopPoint[2] = [@DesktopWidth,@DesktopHeight] If $bShow And Not ($iState = 2) Then WinSetState($hWnd, "", @SW_SHOW) EndIf Local $iLeft, $iTop If $bPosDesktop Then $iLeft = ($aDesktopPoint[0] - $aWinPos[2]) / 2 $iTop = ($aDesktopPoint[1] - $aWinPos[3]) / 2 WinMove($hWnd, "", $iLeft, $iTop) EndIf If $bActivate Then WinActivate($hWnd) Return $hWnd EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
nitekram Posted January 16, 2015 Author Posted January 16, 2015 (edited) If will have to wait until tomorrow night, as am no longer at work. All I want to do: Verify the window exists Verify that the window is actually somewhere on the start bar. That means that the application is a click away, as I want to grab that window and make it active Activate the window Make my changes I am sending commands to move and resize it, as well as click on certain parts of the window. I have tried to use ControlSend(), but have been unable to access the program, as even when it is up, I do not see any action, and if it is not suppose to show, at least the application should change based on input. Put the window back in the original location and the same size EDIT I would rather use controlsend(), as the application I want to interact with, is only for logging out of your computer. As it is impossible with the Send() command, while the computer is locked. Edited January 16, 2015 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
jdelaney Posted January 16, 2015 Posted January 16, 2015 (edited) Here you go...this will always grab the window, even when it's minimized into the systray...but it will also grab all hwnds of the process: It's an example of how to grab an unknown window....I'll use something similar to debug a better way to grab the window I'm looking for...such as by the class...example, you click a button that opens a window, but might open a warning window first. #include <WinAPI.au3> $a = ProcessList("shoretel.exe") For $i = 1 To UBound($a)-1 $aWin = WinList("[REGEXPCLASS:.*]") For $j = 1 To UBound($aWin)-1 If WinGetProcess($aWin[$j][1])=$a[$i][1] Then ConsoleWrite(WinGetState($aWin[$j][1]) & @TAB & _WinAPI_GetClassName($aWin[$j][1]) & @TAB & WinGetTitle($aWin[$j][1]) & @CRLF) EndIf Next Next For you though, it's much easier, since the title is always the same...$extention - ShoreTel Communicator: $h = WinGetHandle("[REGEXPTITLE:ShoreTel Communicator]") ConsoleWrite(WinGetState($h) & @TAB & WinGetTitle($h) & @CRLF) Use this to always make it visible (at run time): $h = WinGetHandle("[REGEXPTITLE:ShoreTel Communicator]") If IsHWnd($h) Then If Not BitAnd (WinGetState($h),2) Then WinSetState($h,"",@SW_SHOW) Else Run(theexe) $h = WinWait("[REGEXPTITLE:ShoreTel Communicator]") If Not BitAnd (WinGetState($h),2) Then WinSetState($h,"",@SW_SHOW) EndIf Edited January 16, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
nitekram Posted January 16, 2015 Author Posted January 16, 2015 @jdelaney, This does the trick! Thanks for your help @SmOke_N, That also works...thanks I will have to see which one I understand better, but for now, I am very greatful. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
jdelaney Posted January 16, 2015 Posted January 16, 2015 Use my last example, it's the simpelist way to work with your specific application...the others are for unknown applicaitons. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
nitekram Posted January 17, 2015 Author Posted January 17, 2015 @jdelaney, that is the one I am leaning towards, but I am going to keep the other examples around, for those other times. I have a follow up question...about Control functions. Is there any function, existing or udf, that would allow me to view all control IDs, from this window. As I stated before, I would love to be able to control this window, while the computer was locked. @SmOke_N, as you were able to get the classname, do you have this installed? If so, do you have any ability to control this app with control functions, or because it is multiple apps layered into one window - is it not possible? 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Moderators SmOke_N Posted January 17, 2015 Moderators Posted January 17, 2015 I got the classname from your first post. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
nitekram Posted January 17, 2015 Author Posted January 17, 2015 I got the classname from your first post. Sorry about that...I looked and looked, but I guess my eyes are getting old lol For anyone that wants to try and help...here is the summary of the window info for the app: >>>> Window <<<< Title: 1567 - ShoreTel Communicator Class: WindowsForms10.Window.8.app.0.3ce0bb8 Position: 548, 121 Size: 584, 807 Style: 0x16CF0000 ExStyle: 0x00050100 Handle: 0x00260E88 >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.3ce0bb8 Instance: 33 ClassnameNN: WindowsForms10.Window.8.app.0.3ce0bb833 Name: Advanced (Class): [CLASS:WindowsForms10.Window.8.app.0.3ce0bb8; INSTANCE:33] ID: 132146 Text: Position: 0, 109 Size: 568, 25 ControlClick Coords: 140, 15 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00020432 >>>> Mouse <<<< Position: 696, 245 Cursor ID: 2 Color: 0xD9E9FF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< PCM Docking Pad Call Cell Panel Call Cells ShoreTel Communicator Contacts Find a contact or number >>>> Hidden Text <<<< Please wait while ShoreTel Communicator starts up... The Contact list will permit you to build groups of your most frequently used contacts. It will display their telephony and Instant Messaging presence and allow you to communicate with them via Instant Messages. History Here is the code that I have tried to just click a button: MsgBox('','','about to click') ControlClick("[CLASS:WindowsForms10.Window.8.app.0.3ce0bb8]", '', 132146, "", "", 148, 13) MsgBox('','','clicked') 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
nitekram Posted January 17, 2015 Author Posted January 17, 2015 I am still having issues with trying to add text after a code section, trying to get a return in there, but cannot even see the cursor. Anyway, tried this as well. ControlClick("[CLASS:WindowsForms10.Window.8.app.0.3ce0bb8]", '', "[CLASS:WindowsForms10.Window.8.app.0.3ce0bb8; INSTANCE:33]", "", "", 148, 13) 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
jdelaney Posted January 17, 2015 Posted January 17, 2015 (edited) Honestly, use my response. You can't use the class provided...it changes every launch. You'd have to use REGEXPCLASS instead...which wouldn't be reliable, since that's a fairly common class of window. Edited January 17, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
nitekram Posted January 17, 2015 Author Posted January 17, 2015 I tried with the following...it activates the window, but no click (it does do something to the window, as I see a little flash near the location, but not at the location that is needed) MsgBox('','','about to click') WinActivate("[REGEXPTITLE:ShoreTel Communicator]") ControlClick("[REGEXPTITLE:ShoreTel Communicator]", '', "[CLASS:WindowsForms10.Window.8.app.0.3ce0bb8; INSTANCE:33]", "", "", 148, 13) MsgBox('','','clicked') ; and tried MsgBox('','','about to click') WinActivate("[REGEXPTITLE:ShoreTel Communicator]") ControlClick("[REGEXPTITLE:ShoreTel Communicator]", '', "132146", "", "", 148, 13) MsgBox('','','clicked') ; and tried MsgBox('','','about to click') WinActivate("[REGEXPTITLE:ShoreTel Communicator]") ControlClick("[REGEXPTITLE:ShoreTel Communicator]", '', 132146, "", "", 148, 13) MsgBox('','','clicked') 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Moderators SmOke_N Posted January 17, 2015 Moderators Posted January 17, 2015 Are your coords (148, 13) client coords, screen coords, or window coords? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
nitekram Posted January 17, 2015 Author Posted January 17, 2015 (edited) That is where the button is on the window that I am trying to click. EDIT from window info tool ControlClick Coords: 140, 15 Edited January 17, 2015 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now