Jump to content
Sign in to follow this  
losgat

help me to improve

Recommended Posts

losgat

This is what i have done so far

what can I do to make this work better

CODE
#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <ProgressConstants.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

$Form1 = GUICreate("XXX INSTALLER", 639, 463, 311, 253)

$Label1 = GUICtrlCreateLabel("AUTO INSTALLER", 128, 8, 382, 56)

GUICtrlSetFont(-1, 28, 800, 0, "Arial Black")

$Label2 = GUICtrlCreateLabel("Select all aplications for the pc", 240, 64, 148, 17)

$Checkbox1 = GUICtrlCreateCheckbox("SoftTalk 11", 88, 144, 121, 25)

$Checkbox2 = GUICtrlCreateCheckbox("SoftTalk 45", 88, 168, 121, 25)

$Checkbox3 = GUICtrlCreateCheckbox("Open Office", 88, 192, 121, 25)

$Checkbox4 = GUICtrlCreateCheckbox("Ms Office 2003", 88, 216, 121, 25)

$Checkbox5 = GUICtrlCreateCheckbox("C3 X", 420, 136, 129, 25)

$Checkbox6 = GUICtrlCreateCheckbox("C3 XX", 420, 160, 129, 25)

$Checkbox7 = GUICtrlCreateCheckbox("C3 XXX", 420, 184, 129, 25)

$Progress1 = GUICtrlCreateProgress(40, 432, 569, 25)

$Btn_install = GUICtrlCreateButton("INSTALL", 384, 352, 121, 57, $WS_GROUP)

$Btn_exit = GUICtrlCreateButton("EXIT", 100, 352, 121, 57, $WS_GROUP)

GUISetState(@SW_SHOW)

While 1

switch GUIGetMsg()

Case $Btn_Install

ExitLoop

EndSwitch

WEnd

If GUICtrlRead($Checkbox1) = 1 Then

Run("\\10.168.3.4\software\SofTalk\SoftTalk_New\4.2.0.183c_new\setup.exe")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&Welcome to SofTalk setup process:")

Send("{ENTER}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&Choose Destination Location")

Send("{ENTER}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&SofTalk GUI Applocation for Xpresso Contack Center")

Send("{SPACE}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&SofTalk GUI Applocation for Xpresso Contack Center")

Send("{DOWN}")

Send("{SPACE}")

Send("{ENTER}")

WinWaitActive("Setup","&Dialog Template")

Send("0000")

Send("{TAB}")

Send("0000")

Send("{TAB}")

; Setup for Server 11 ;

Send("10.168.3.11")

Send("{ENTER}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&InstallShield Wizard Complete")

Send("{ENTER}")

EndIf

If GUICtrlRead($Checkbox2) = 1 Then

Run("\\10.168.3.4\software\SofTalk\SoftTalk_New\4.2.0.183c_new\setup.exe")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&Welcome to SofTalk setup process:")

Send("{ENTER}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&Choose Destination Location")

Send("{ENTER}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&SofTalk GUI Applocation for Xpresso Contack Center")

Send("{SPACE}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&SofTalk GUI Applocation for Xpresso Contack Center")

Send("{DOWN}")

Send("{SPACE}")

Send("{ENTER}")

WinWaitActive("Setup","&Dialog Template")

Send("0000")

Send("{TAB}")

Send("0000")

Send("{TAB}")

; Setup for Server 45 ;

Send("10.168.3.45")

Send("{ENTER}")

WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&InstallShield Wizard Complete")

Send("{ENTER}")

EndIf

Share this post


Link to post
Share on other sites
bogQ

This is what i have done so far

what can I do to make this work better

sugestion

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("XXX INSTALLER", 639, 463, 311, 253)
$Label1 = GUICtrlCreateLabel("AUTO INSTALLER", 128, 8, 382, 56)
GUICtrlSetFont(-1, 28, 800, 0, "Arial Black")
$Label2 = GUICtrlCreateLabel("Select all aplications for the pc", 240, 64, 148, 17)
$Checkbox1 = GUICtrlCreateCheckbox("SoftTalk 11", 88, 144, 121, 25)
$Checkbox2 = GUICtrlCreateCheckbox("SoftTalk 45", 88, 168, 121, 25)
$Checkbox3 = GUICtrlCreateCheckbox("Open Office", 88, 192, 121, 25)
$Checkbox4 = GUICtrlCreateCheckbox("Ms Office 2003", 88, 216, 121, 25)
$Checkbox5 = GUICtrlCreateCheckbox("C3 X", 420, 136, 129, 25)
$Checkbox6 = GUICtrlCreateCheckbox("C3 XX", 420, 160, 129, 25)
$Checkbox7 = GUICtrlCreateCheckbox("C3 XXX", 420, 184, 129, 25)
$Progress1 = GUICtrlCreateProgress(40, 432, 569, 25)
$Btn_install = GUICtrlCreateButton("INSTALL", 384, 352, 121, 57, $WS_GROUP)
$Btn_exit = GUICtrlCreateButton("EXIT", 100, 352, 121, 57, $WS_GROUP)
GUISetState(@SW_SHOW)

While 1
    switch GUIGetMsg()
    Case $Btn_Install
    ExitLoop
    EndSwitch
WEnd

If GUICtrlRead($Checkbox1) = 1 Then 
    firs()
; Setup for Server 11;
    Send("10.168.3.11")
    second()
EndIf

If GUICtrlRead($Checkbox2) = 1 Then 
    firs()
; Setup for Server 45;
    Send("10.168.3.45")
    second()
EndIf



Func firs()
    Run("\\10.168.3.4\software\SofTalk\SoftTalk_New\4.2.0.183c_new\setup.exe")
    WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&Welcome to SofTalk setup process:")
    Send("{ENTER}")
    WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&Choose Destination Location")
    Send("{ENTER}")
    WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&SofTalk GUI Applocation for Xpresso Contack Center")
    Send("{SPACE}")
    WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&SofTalk GUI Applocation for Xpresso Contack Center")
    Send("{DOWN}")
    Send("{SPACE}")
    Send("{ENTER}")
    WinWaitActive("Setup","&Dialog Template")
    Send("0000")
    Send("{TAB}")
    Send("0000")
    Send("{TAB}")
EndFunc

Func second()
    Send("{ENTER}")
    WinWaitActive("SofTalk for Xpresso Contact Center v3.04 SP1","&InstallShield Wizard Complete")
    Send("{ENTER}")
EndFunc

instead send command did you try to use ControlClick,ControlFocus and ControlSend?


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
losgat

done some simple installs but not with the gui will read up on the use of ControlClick,ControlFocus and ControlSend? thanks.

the Exit btn how do i tell it to exit the gui?

Share this post


Link to post
Share on other sites
Appie78

Add this to your While loop.

CODE
Case $Btn_exit

Exit

Cheers Appie


Electron microscopes rule!!!

Share this post


Link to post
Share on other sites
bogQ

the Exit btn how do i tell it to exit the gui?

something like this for main loop

Do
    $guimsg = GUIGetMsg()
    Select
        Case $guimsg = $Btn_install
            If GUICtrlRead($Checkbox1) = 1 Then 
                firs()
            ; Setup for Server 11;
                Send("10.168.3.11")
                second()
            EndIf
            If GUICtrlRead($Checkbox2) = 1 Then 
                firs()
            ; Setup for Server 45;
                Send("10.168.3.45")
                second()
            EndIf
        Case $guimsg = $Btn_exit
            Exit
    EndSelect
Until $guimsg = $GUI_EVENT_CLOSE

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
losgat

what am I doing wrong

ControlClick("SofTalk for Xpresso Contact Center v3.04 SP1","&Welcome to SofTalk setup process:", "[CLASS:Button, TEXT:&Next, 1]") ??

Share this post


Link to post
Share on other sites
martin

what am I doing wrong

ControlClick("SofTalk for Xpresso Contact Center v3.04 SP1","&Welcome to SofTalk setup process:", "[CLASS:Button, TEXT:&Next, 1]") ??

Maybe ypou just need to look in the help at Controls and follow the format for the CLASS parameter in ControlClick?

Maybe the text isn't quite as you've written it and maybe the window text isn't needed.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


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
Sign in to follow this  

×