Recently Browsing 0 members
No registered users viewing this page.
Hello! Thanks you for looking at my post
**No source code I'm sorry work related can't copy information**
I've been using autoit for about 1 year.
I'm having trouble automating a click on an internet explorer web page and I've tried a lot of examples from help pages and forums already. The object I'm trying to click on isnt always in the same spot so I can't use mouse click or control click, I have tried to use the different get collection options and clickbyname, or index or get object. I'm just struggling.
Description of object I'm trying to click --
HTML Code looks like <a ng-click.. "Click Here" it appears it's just a click able object named "click here" that opens a hidden window by running a script inside the web page. I'm not able to grab the information from the window unless it's open so I have to automate this click somehow.
I understand it's difficult to assist without having something to look at, I apologize for that sincerely and appreciate and assistance and suggestions.
So I am trying to click the green button, this button is not always in the same place. So fare I am trying to click it by finding the color but there is also something else with the same color on the screen (circled in yellow) that is causing issues. Is there a way to use the Title and Class of the window (can't be just the window as there are more than one with the same name).
How does AutoIt Info get this information?
Getting this error :
(22) : ==> Variable used without being declared.: if $vNumber = 0 Then if ^ ERROR
But I'm sure I have defined the variable, as in the top of my script has
Global $vNumber = 0
How would I go about fixing this?
Hi AutoIT masters,
Good day! Sorry to have bothered this forum but we really need help. We are working on an automation project that is running on VDI server. The BOTS are in .exe are running fine until AV detected them and deleted the files. The files were re-compiled and AV kept on deleting them. The copy of the .exe BOT deleted were sent to Symantec for whitelisting. After whitelisting, it is no longer deleted but no longer working as designed (showing Line script error). We checked the scripts and there were no issues since we run it using SciTE editor and it performed the desired task. Good thing we found on this thread the solution using .a3x and the BOTS worked fine and no longer deleted. Now, the problem is they are asking why the BOTS won't run in .EXE and what is the reason behind Symantec AV deleting them. We raised a case with Symantec but they cannot provide further information as they are always seeing the file as "False Positive". We even tested with Symantec turned off and those .EXE files are working fine, however, after re-enabling, it got deleted.
Just seeking help on how to better convince them that it is really Symantec causing the issue and the .a3x file.
I think I'm so close to solving an automation problem but need that last bit of help. Anyone familiar with automation might know this answer. The beginning of this code is a nice example from @IanN1990 which I dug into a little and found it's counting my tabs correctly in Chrome. How may I print out each tab name (probably some sort of property in the automation object)
#include "CUIAutomation2.au3" ; Window handle Local $hWindow = WinGetHandle( "[CLASS:Chrome_WidgetWin_1]" ) If Not IsHWnd( $hWindow ) Then Return ConsoleWrite( "$hWindow ERR" & @CRLF ) ConsoleWrite( "$hWindow OK" & @CRLF ) ; Activate window WinActivate( $hWindow ) Sleep( 100 ) ; UI Automation object Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement( $pDesktop ) $oDesktop = ObjCreateInterface( $pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oDesktop ) Then Return ConsoleWrite( "$oDesktop ERR" & @CRLF ) ConsoleWrite( "$oDesktop OK" & @CRLF ) ; Chrome window Local $pCondition $oUIAutomation.CreatePropertyCondition( $UIA_ClassNamePropertyId, "Chrome_WidgetWin_1", $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) Local $pChrome, $oChrome $oDesktop.FindFirst( $TreeScope_Descendants, $pCondition, $pChrome ) $oChrome = ObjCreateInterface( $pChrome, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oChrome ) Then Return ConsoleWrite( "$oChrome ERR" & @CRLF ) ConsoleWrite( "$oChrome OK" & @CRLF ) ; Tab item Local $pCondition1 $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_TabItemControlTypeId, $pCondition1 ) If Not $pCondition1 Then Return ConsoleWrite( "$pCondition1 ERR" & @CRLF ) ConsoleWrite( "$pCondition1 OK" & @CRLF ) ;~ Find All tab items Local $pTabs, $oUIElementArray, $iElements, $pFound, $oFound, $value $oChrome.FindAll( $TreeScope_Descendants, $pCondition1, $pTabs ) $oUIElementArray = ObjCreateInterface($pTabs, $sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray) $oUIElementArray.Length( $iElements ) ConsoleWrite( "$iElements:" & $iElements & @CRLF ) For $i = 0 To $iElements - 1 Local $pFound $oUIElementArray.GetElement($i, $pFound) ConsoleWrite($pFound & @CRLF) $pFound.GetCurrentPropertyValue($UIA_NamePropertyId,$value) ;<==PROBLEM HERE ConsoleWrite($value & @CRLF) Next
Thanks for any direction.