LoreenGiac Posted November 12, 2018 Posted November 12, 2018 Hi I am new to AutoIt, and I am trying to automate entering the pin inside this application: This is the code I'm using to press button with text 9. and the info from AutoIt info. Quote #include <MsgBoxConstants.au3> Run("C:\Users\laureen\AppData\Local\HID Global\PC Token\EzTokenSystray.exe launch") WaitActive("ActivID PC Token: PIN Entry") Then ControlClick("ActivID PC Token: PIN Entry", "", "[CLASS:Button; TEXT:OK; INSTANCE:15]")
caramen Posted November 12, 2018 Posted November 12, 2018 (edited) Hi there; This : #include <MsgBoxConstants.au3> Is not needed until you're not using : Button Pressed Return Value OK $IDOK (1) CANCEL $IDCANCEL (2) ABORT $IDABORT (3) RETRY $IDRETRY (4) IGNORE $IDIGNORE (5) YES $IDYES (6) NO $IDNO (7) TRY AGAIN ** $IDTRYAGAIN (10) CONTINUE ** $IDCONTINUE (11) This: ;Then Alone worth nothing ;If ... Then ... ;If <expression> Then statement ;In one line If $a = 1 Then Sleep(100) ;In more than one line If $a = 1 Then Sleep (100) ... ... ... EndIf Is an error until you're not unsing a IF statement to match with Then. This: Is a window's informations result If you want to ControlClick We need the Control's Informations to help you. Without information you could try this line ( With precedent corrections ) : ControlClick ( "ActivID PC Token: PIN Entry" , "" , "[CLASS:Button; INSTANCE:15]" , "left" , 1 ) Edited November 12, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
LoreenGiac Posted November 12, 2018 Author Posted November 12, 2018 Hi @caramen thanks for the reply here's the control tab: This is for the entire PIN PAD, i can't seem to be able to get info one specific button from the pad entries.
caramen Posted November 12, 2018 Posted November 12, 2018 (edited) Ok then you run a .NET framwork application or java or somthing not being able to be clickable as ControlCLick. That mean you have to learn how to automate this. You have to check IUIAutomation from @junkew. @Jos Feel like I am repeating myself so much with that kind of question could we not stick the IUIAutomation knowledge somewhere ? Edited November 12, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Moderators JLogan3o13 Posted November 12, 2018 Moderators Posted November 12, 2018 34 minutes ago, caramen said: Feel like I am repeating myself so much with that kind of question could we not stick the IUIAutomation knowledge somewhere ? The IUIAutomation thread is already a pinned topic, and in the Wiki, what more would you like - flashing banner with lights when someone logs into the forum perhaps? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
caramen Posted November 12, 2018 Posted November 12, 2018 Or dynamic regexp when someone make a topic like that Ok. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
junkew Posted November 12, 2018 Posted November 12, 2018 Me and others have it as part of the signature referenced in faq31 In this example i more have the question what au3inf is higlighting as it seems to be unnamed buttons reachable by index so controlclick can work. If not working you should try simplespy with iuiautomation. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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