Jump to content

Recommended Posts

Posted

Hi I am new to AutoIt, and I am trying to automate entering the pin inside this application: 

image.png.8959d7e4e7150527b22b314a738a6008.png

 

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]")

 

image.png.8570fd2d3cc6fce71ef450b716f595fa.png

 

image.png

Posted (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: 

image.png.1b0c1443fc1dd168b3b14237251c45a0.png

Is a window's informations result

If you want to ControlClick We need the Control's Informations to help you.

image.png.094d7a36cc925f8a93bfb8a01353dfbc.png

 

Without information you could try this line ( With precedent corrections ) : 

ControlClick ( "ActivID PC Token: PIN Entry" , "" , "[CLASS:Button; INSTANCE:15]" , "left" , 1 )

 

 

Edited 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Posted (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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

  • Moderators
Posted
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!

Posted

Or dynamic regexp when someone make a topic like that :lol:

 

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...