Jump to content

Recommended Posts

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

@Tof006 Look at the AutoIt Window Info Tool, in the same directory where you installed AutoIt. Grab the cross-hair symbol and hover over the button/controls you want to click. This should give you inf

something like this, but this is only dealing with that ok button, you can make it press all the buttons in the setup, you just define the button text and hotkey. as I stated, I don't know French but

Really, thanks a lot. I'll test this first time tomorrow and let you know how this is going. It's what I needed to try writing a script that could work. I'll handle the french text

Posted Images

12 hours ago, Earthshine said:

get the two required udfs and you should be able to do the entire install

Hi again,

I'm gonna have a lot of dummy questions... I hope it won't bother you too much :)

I'm trying to understand what I need to do.

1) I have added the Setup.exe at the top of your script. Is it the way I should do ?

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Run ("Setup.exe","C:\Tools\SpeechMagic6\WsSetup\French")

#RequireAdmin

2) On this window (the first one that opens when I launch setup.exe) :

image.png.82574aa7caa3a2d31ac5ba9167945efe.png

What would be the $text I'm looking for ?

I've tried Avertissement or OK but it doesn't change anything. Is it "Il n'y a aucun.." ?

Const $text = "Put your official text you are looking for here...."

 

Here's the log :

8\06\2019 07:57:24 | MININT-M8KE3UD | Info | Begin Install()
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | _checkClickCtrl():Begin
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | Searching for Formclass: [Class:#32770]
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | Searching for Text: OK
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | Searching for Ctrl Txt: OK
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | Timeout: 0
08\06\2019 07:57:24 | MININT-M8KE3UD | Info | Time Delay (after click): 0
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Begin Install()
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | _checkClickCtrl():Begin
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Searching for Formclass: [Class:#32770]
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Searching for Text: OK
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Searching for Control: [CLASS:Button; INSTANCE:1]
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Searching for Ctrl Txt: OK
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Timeout: 0
08\06\2019 08:06:48 | MININT-M8KE3UD | Info | Time Delay (after click): 0
 

Edited by Tof006
Link to post
Share on other sites

Hi,

Here's what I've been able to do so far :

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Const $TD_BTN_NEXT = '&Suivant >'
Const $TD_BTN_INSTALL = '&Install'
Const $TD_BTN_INSTALL2 = 'Install'
Const $TD_BTN_FINISH = '&Finish'
Const $TD_BTN_CANCEL = 'Cancel'
Const $TD_BTN_SELECTALL = 'Sélectionner &tout'
Const $TD_BTN_SPEECHMIKE = 'Speech&Mike Pro ou SpeechMike'
Const $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Const $TD_BTN_ALTFINISH = '&Finish'
Const $TD_BTN_ALLOW_ACCESS = '&Allow access'
Const $TD_BTN_REMOVE = '&Remove'
Const $TD_BTN_YES = '&Yes'
Const $TD_BTN_OK = 'OK'
Const $TD_BTN_TYPICAL = '&Typical'
Const $TD_EDIT_DATA = '99999'
Const $TD_TREE_NAME = 'Tree1'


Const $textWarning = "Avertissement"
Const $textInstallShield = "InstallShield Wizard"
Const $stdClass = '[Class:#32770]'
Const $button1 = "[CLASS:Button; INSTANCE:1]"
Const $button2 = "[CLASS:Button; INSTANCE:2]"
Const $button3 = "[CLASS:Button; INSTANCE:3]"
Const $button4 = "[CLASS:Button; INSTANCE:4]"
Const $button5 = "[CLASS:Button; INSTANCE:5]"
Const $button6 = "[CLASS:Button; INSTANCE:6]"
Const $Edit1 = "[CLASS:Edit; INSTANCE:1]"


#Region ;**** Logging  This sections sets up logging. If you compile it, it creates a nice text log file with the script name and a .log at the end. ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Run("C:\Tools\SpeechMagic6\WsSetup\French\Setup.exe")
    _log4a_Info('Begin Install()')
    _checkClickCtrl($stdClass, $textWarning, $button1, $TD_BTN_OK, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_SELECTALL, 0)
    _log4a_Info('End Install()')

EndFunc   ;==>Install

Install()

I'm stuck here :

image.png.3c7f3ffd3e6bcf88623363bc663e46d5.png

Here's the sequence :

image.thumb.png.e450f60218ec2c7b30a18e59b0f5c43d.png

image.thumb.png.48fc276fe095a78e5ef897024d22cc26.png

image.thumb.png.6e12ba9c85e114ea27237c2c1dc2f57c.png

image.thumb.png.ab436048555fde0bd0490f392342e035.png

Here, it looks for Sélectionner &tout but this button is on the next screen... 

It doesn't seem to accept step 4

I can add 2 or 3  

  _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)

it will be stuck on this window.

Question : what does the 0 stand for at the end this command ?

Edited by Tof006
Link to post
Share on other sites
7 minutes ago, Earthshine said:

at least you solved it. i am still wondering why it doesn't find that 4th Next button.

But as I told you, this command line has been able to find the 4th button :) ... and the Sélectionnez &tout button

image.png.ce4e7f0e415a8efb866d7d3455412034.png

 

EDIT : I don't understand how this works but ... if I stop the installation and start it again : it doesn't work anymore :

image.png.47523f3b7ee3fa521751591cfe731207.png

Edited by Tof006
Link to post
Share on other sites

OK, I'm gonna take all buttons and try to create a full script then I'll try it on a brand new VM

I have one question but I cannot post any screenshot anymore because I don't have anymore space available... :(

Can I PM it ?

Link to post
Share on other sites

That would be unfortunate... I'll probably do it once it's over and do a recap for others who would be interested in what I've been learning with you :) 

EDIT : even in PM I cannot post.

I'm gonna delete some of them

 

Edited by Tof006
Link to post
Share on other sites
Just now, Tof006 said:

Sorry but it's a bit lite for my level of knowledge...

Can you provide me with an example please ?

just look it up in the Help file, from the AutoIt editor, Scite, just hit F1 and search for ControlSetText

example from the help file

#include <MsgBoxConstants.au3>

Example()

Func Example()
    ; Run Notepad
    Run("notepad.exe")

    ; Wait 10 seconds for the Notepad window to appear.
    Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)

    ; Set the edit control in Notepad with some text. The handle returned by WinWait is used for the "title" parameter of ControlSetText.
    ControlSetText($hWnd, "", "Edit1", "This is some text")

    ; Retrieve the text of the edit control in Notepad. The handle returned by WinWait is used for the "title" parameter of ControlGetText.
    Local $sText = ControlGetText($hWnd, "", "Edit1")

    ; Display the text of the edit control.
    MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $sText)

    ; Close the Notepad window using the handle returned by WinWait.
    WinClose($hWnd)
EndFunc   ;==>Example

 

My resources are limited. You must ask the right questions

 

Link to post
Share on other sites

Sorry, I must be a bit too dum to use this here..

That code doesn't do anything :

 

Const $TD_BTN_NEXT = '&Suivant >'
;Const $TD_BTN_INSTALL = '&Install'
;Const $TD_BTN_INSTALL2 = 'Install'
Const $TD_BTN_FINISH = '&Finish'
Const $TD_BTN_CANCEL = 'Annuler'
Const $TD_BTN_SELECTALL = 'Sélectionner &tout'
Const $TD_BTN_SPEECHMIKE = 'Speech&Mike Pro ou SpeechMike'
Const $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Const $TD_BTN_ALTFINISH = '&Finish'
Const $TD_BTN_ALLOW_ACCESS = '&Allow access'
Const $TD_BTN_REMOVE = '&Remove'
Const $TD_BTN_YES = '&Yes'
Const $TD_BTN_OK = 'OK'
Const $TD_BTN_TYPICAL = '&Typical'
Const $TD_EDIT_DATA = '99999'
Const $TD_TREE_NAME = 'Tree1'


Const $textWarning = "Avertissement"
Const $textInstallShield = "InstallShield Wizard"
Const $stdClass = '[Class:#32770]'
Const $button1 = "[CLASS:Button; INSTANCE:1]"
Const $button2 = "[CLASS:Button; INSTANCE:2]"
Const $button3 = "[CLASS:Button; INSTANCE:3]"
Const $button4 = "[CLASS:Button; INSTANCE:4]"
Const $button5 = "[CLASS:Button; INSTANCE:5]"
Const $button6 = "[CLASS:Button; INSTANCE:6]"
Const $Edit1 = "[CLASS:Edit; INSTANCE:1]"
Const $Edit2 = "[CLASS:Edit; INSTANCE:2]"
Const $Edit3 = "[CLASS:Edit; INSTANCE:3]"
Const $User = "xxx\xxxx"
Const $Pass = "xxxx"

#Region ;**** Logging  This sections sets up logging. If you compile it, it creates a nice text log file with the script name and a .log at the end. ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    Run("C:\Tools\SpeechMagic6\WsSetup\French\Setup.exe")
    _log4a_Info('Begin Install()')
    _checkClickCtrl($stdClass, $textWarning, $button1, $TD_BTN_OK, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_SELECTALL, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button4, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_SELECTALL, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button4, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button1, $TD_BTN_SPEECHMIKE, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button6, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button3, $TD_BTN_NEXT, 0)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    ControlSetText($Edit1, "", "", $User)
    ControlSetText($Edit2, "", "", $Pass)
    ControlSetText($Edit3, "", "", $Pass)
    _checkClickCtrl($stdClass, $textInstallShield, $button2, $TD_BTN_NEXT, 0)
    _log4a_Info('End Install()')

EndFunc   ;==>Instal

ControlSetText ( "title", "text", controlID, "new text" [, flag = 0] )

Parameters

title The title/hWnd/class of the window to access. See Title special definition.
text The text of the window to access. See Text special definition.
controlID The control to interact with. See Controls.
new text The new text to be set into the control.
flag [optional] when different from 0 (default) will force the target window to be redrawn.

To my understanding, I just need :

title = "[CLASS:Edit; INSTANCE:1]" =$Edit1

- text = no text in my case

- ControlID = .... would be again the $Edit1 to my understanding

- new text = $User

I've tried with ControlID = "" or $Edit1 but it doesn't change anything.

Thanks for your help

Edited by Tof006
Link to post
Share on other sites

This doesn't work.

I'm gonna give up but I really want to thank you for your help and advises.

I'll stay in my ignorance and I hate that but I have lost of other things to do and cannot waste 2 more days to understand why this doesn't work.

I already have wasted enough time on this crappy software.

Maybe later this month I'll try again.

See you and thanks again

Link to post
Share on other sites

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...