Jump to content
sumanth1980

Installation of parallel programs using (Koda( Form Designer)) auto it not working !!!! - (Moved)

Recommended Posts

sumanth1980

Here i am wrote a simple lines to install basic applications but when i clicked on one application/program to install it was working fine but when i cancel the program in the middle to install another program it was not working. I am not an expert in this but i want a solution for this ... Can any one help me on this....

ORG-1.au3

Share this post


Link to post
Share on other sites
sumanth1980
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=f:\all-in-one.kxf
$Form1_1 = GUICreate("All-IN-ONE-Console Ver-1.0", 479, 584, -1, -1)
GUISetFont(8, 400, 0, "Verdana")
GUISetBkColor(0x008080)
$Button1 = GUICtrlCreateButton("Kaseya", 304, 152, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xFFFBF0)
$Button2 = GUICtrlCreateButton("FW-Ports-SQLTCP/IP-NS", 312, 376, 145, 25)
GUICtrlSetFont(-1, 7, 400, 0, "Verdana")
GUICtrlSetColor(-1, 0x000000)
$Button4 = GUICtrlCreateButton(".Net Framework 3.5", 304, 184, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xFFFBF0)
$Button5 = GUICtrlCreateButton("Winrar", 24, 144, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button6 = GUICtrlCreateButton("Oracle", 152, 144, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button7 = GUICtrlCreateButton("POS", 152, 176, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button8 = GUICtrlCreateButton("Acrobat-reader", 24, 176, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button9 = GUICtrlCreateButton(".NET Framework 4.5", 304, 216, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xFFFBF0)
$Button10 = GUICtrlCreateButton("Desktop-Shortcuts", 312, 408, 145, 25)
GUICtrlSetFont(-1, 7, 400, 0, "Verdana")
GUICtrlSetColor(-1, 0x000000)
$Button11 = GUICtrlCreateButton("ThinPrinter-64Bit", 168, 504, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button13 = GUICtrlCreateButton("Liber-Office", 24, 208, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button14 = GUICtrlCreateButton("MFS-Driver", 152, 208, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button15 = GUICtrlCreateButton("MFS-Client-Service", 152, 240, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button16 = GUICtrlCreateButton("Mozilla-Firefox", 24, 240, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Group1 = GUICtrlCreateGroup("Basic-Softwares", 8, 112, 465, 233)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button17 = GUICtrlCreateButton("VPN-Config-Import-32Bit", 312, 440, 145, 25)
GUICtrlSetFont(-1, 7, 400, 0, "Verdana")
GUICtrlSetColor(-1, 0x000000)
$Button20 = GUICtrlCreateButton("EXIT", 312, 504, 145, 25)
GUICtrlSetColor(-1, 0x000000)
$Button21 = GUICtrlCreateButton("MS-SQL-32Bit", 24, 376, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button22 = GUICtrlCreateButton("MS-SQL-64Bit", 168, 376, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button23 = GUICtrlCreateButton("AX-Prerequ-64Bit", 168, 408, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button24 = GUICtrlCreateButton("AX-Prerequ-32Bit", 24, 408, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button27 = GUICtrlCreateButton("Async-Config-64Bit", 168, 536, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button28 = GUICtrlCreateButton("Async-Config-32Bit", 24, 536, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button29 = GUICtrlCreateButton("AX-32Bit", 24, 440, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button30 = GUICtrlCreateButton("AX-64Bit", 168, 440, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button31 = GUICtrlCreateButton("FortiCleint-64Bit", 168, 472, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button32 = GUICtrlCreateButton("FortiClient-32Bit", 24, 472, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Group2 = GUICtrlCreateGroup("Core-Softwares", 8, 344, 465, 233)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Pre-Requirements", 8, 8, 465, 105)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Button33 = GUICtrlCreateButton("Admin Enable-Password Set", 288, 32, 169, 25)
$Button19 = GUICtrlCreateButton("System-Name-Change ", 291, 72, 169, 25)
$Group9 = GUICtrlCreateGroup("Source-Path-Drive", 24, 32, 249, 65)
GUICtrlSetFont(-1, 7, 400, 0, "Verdana")
GUICtrlSetBkColor(-1, 0xA6CAF0)
$Radio1 = GUICtrlCreateRadio("D", 48, 72, 41, 25)
$Radio2 = GUICtrlCreateRadio("E", 101, 72, 41, 25)
$Radio3 = GUICtrlCreateRadio("F", 157, 72, 41, 25)
$Radio4 = GUICtrlCreateRadio("G", 213, 72, 41, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button35 = GUICtrlCreateButton("PAD", 24, 272, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button36 = GUICtrlCreateButton("Generic-Printer", 152, 272, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Group4 = GUICtrlCreateGroup("Auto", 16, 128, 265, 209)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xB9D1EA)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("Manual", 296, 128, 137, 121)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xA6CAF0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button12 = GUICtrlCreateButton("ALL", 304, 256, 129, 33)
GUICtrlSetColor(-1, 0x000000)
$Button37 = GUICtrlCreateButton("ThinPrinter-32Bit", 24, 504, 121, 25)
GUICtrlSetColor(-1, 0x000000)
$Button38 = GUICtrlCreateButton("VPN-Config-Import-64Bit", 312, 472, 145, 25)
GUICtrlSetFont(-1, 7, 400, 0, "Verdana")
GUICtrlSetColor(-1, 0x000000)
$Button39 = GUICtrlCreateButton("WU-Disable", 152, 304, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Button40 = GUICtrlCreateButton("DailUp-Connection", 24, 304, 121, 25)
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xC8C8C8)
$Group6 = GUICtrlCreateGroup("32Bit-Auto", 16, 360, 137, 209)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xA6CAF0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group7 = GUICtrlCreateGroup("64Bit-Auto", 160, 360, 137, 209)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xA6CAF0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group8 = GUICtrlCreateGroup("Gen-Settings-Auto", 304, 360, 161, 209)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xA6CAF0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            main1()
            Case $Button2
            main2()
            Case $Button4
            main4()
            Case $Button5
            main5()
            Case $Button6
            main6()
            Case $Button7
            main7()
            Case $Button8
            main8()
            Case $Button9
            main9()
            Case $Button10
            main10()
            Case $Button11
            main11()
            Case $Button12
            main5()
            Sleep(200)
            main8()
            Sleep(200)
            main13()
            Sleep(200)
            main16()
            Sleep(200)
            main35()
            Sleep(200)
            main6()
            Sleep(200)
            main7()
            Sleep(200)
            main14()
            Sleep(200)
            main15()
            Sleep(200)
            main36()
            Sleep(200)
            main39()
            Sleep(200)
            Case $Button13
            main13()
            Case $Button14
            main14()
            Case $Button15
            main15()
            Case $Button16
            main16()
            Case $Button17
            main17()
            Case $Button21
            main21()
            Case $Button22
            main22()
            Case $Button23
            main23()
            Case $Button24
            main24()
            Case $Button27
            main27()
            Case $Button28
            main28()
            Case $Button29
            main29()
            Case $Button30
            main30()
            Case $Button31
            main31()
            Case $Button32
            main32()
            Case $Button33
             main33()
           Case $Button20
            Exit
        Case $Radio1
        Case $Radio2
        Case $Radio3
        Case $Radio4
    EndSwitch

WEnd


;For Kaseya

Func main1()
     ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\KcsSetup.exe")
    EndFunc

;For FW-Ports & SQL TCP/Ip-NS Enable

Func main2()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Firewall-Ports_Profiles-SQL-TCPIP-NS-Enable")
EndFunc

;For .Net Framework 3.5

Func main4()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\dotnetfx35.exe")
EndFunc

;For Winrar installation

Func main5()
    ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Wrar.exe")
    Sleep(300);
    WinActivate("WinRAR 3.62")
    WinWaitActive("WinRAR 3.62")
    Send("{ENTER}");
    Sleep(300);
    WinActivate("WinRAR Setup")
    WinWaitActive("WinRAR Setup")
    Send("{ENTER}");
    Sleep(300);
    Send("{ENTER}");
    Sleep(300)
EndFunc

;For Oracle-6

Func main6()
    Global  $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\OracleXEUniv.exe")
    Global $FFSetupWin = ("InstallShield Wizard")
    Global  $FFSetupWin1 = ("Oracle Database 10g Express Edition - Install Wizard")
     ShellExecute($FFInstdest)
     Sleep(500);
     WinWaitActive($FFSetupWin)
     WinActivate($FFSetupWin)
     Sleep(20000);
     WinWaitActive($FFSetupWin1)
     WinActivate($FFSetupWin1)
     Sleep(500)
     Send("{ENTER}");
     Sleep(500);
     Send("!a");
     Sleep(500);
     Send("{ENTER}");
     Sleep(500)
     Send("!r");
     WinWaitActive("Choose Folder")
     WinActivate("Choose Folder")
     Send("D:\oraclexe",1);
     Sleep(500);
     Send("{ENTER}");
     Sleep(500);
     Send("!n");
     Sleep(500);
     Send("{TAB}");
     Sleep(500);
     Send("system",1);
     Sleep(500)
     Send("{TAB}");
     Sleep(500);
     Send("system",1);
     Sleep(500);
     Send("{ENTER}");
     Sleep(500);
     Send("!i")
     Sleep(15000);
     WinWaitActive($FFSetupWin1,"Setup has finished installing Oracle Database 10g Express Edition on your computer")
     WinActivate($FFSetupWin1,"Setup has finished installing Oracle Database 10g Express Edition on your computer")
     Sleep(100)
     Send("!l")
     Sleep(100)
     Send("{ENTER}")
EndFunc

;For POS

Func main7()
     ShellExecute("F:\AX_Softwares\SHOP_AX\Package\setup.exe")
     Sleep(300);
     WinActivate("possetup Setup")
     WinWaitActive("possetup Setup")
     Send("{ENTER}");
     Sleep(300);
     Send("!c")
     Sleep(300)
     Send("D:\Shop")
     Sleep(300)
     Send("{TAB}")
     Sleep(300)
     Send("{TAB}")
     Sleep(300)
     Send("{TAB}")
     Sleep(300)
     Send("{ENTER}")
     Sleep(300)
     Send("{ENTER}")
     Sleep(300)
     WinActivate("possetup - Choose Program Group")
     WinWaitActive("possetup - Choose Program Group")
     Sleep(300)
     Send("{ENTER}")
     Sleep(300)
     WinActivate("Version Conflict")
     WinWaitActive("Version Conflict")
     Sleep(300)
     Send("{ENTER}")
     WinActivate("Version Conflict")
     WinWaitActive("Version Conflict")
     Sleep(400)
     Send("{ENTER}")
     WinActivate("Version Conflict")
     WinWaitActive("Version Conflict")
     Sleep(400)
     Send("{ENTER}")
     WinActivate("Version Conflict")
     WinWaitActive("Version Conflict")
     Sleep(400)
     Send("{ENTER}")
     WinActivate("possetup Setup")
     WinWaitActive("possetup Setup")
     Sleep(300)
     Send("{ENTER}")
EndFunc

;For Acrobat-reader Installation

Func main8()
     ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Acrobat_Reader.exe")
     Sleep(8000);
     WinActivate("Adobe Reader X (10.1.1) - Setup","Ready to Install Adobe Reader X (10.1.1)")
     WinWaitActive("Adobe Reader X (10.1.1) - Setup","Ready to Install Adobe Reader X (10.1.1)")
     Sleep(200)
     Send("{ENTER}");
     Sleep(5000);
     WinWaitActive("Adobe Reader X (10.1.1) - Setup", "Setup Completed")
     Sleep(200)
     Send("{ENTER}");
     Sleep(1000);
EndFunc

;For .net framework 4.5

Func main9()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\dotnetfx45_full_x86_x64.exe")
EndFunc

;For Desktop_Shortcuts

Func main10()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Desktop_Shortcuts")
EndFunc

;For ThinPrinter-64 bit

Func main11()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Thin_Printer_RDP\ThinPrintRDPClient_x64")
Sleep(300)
WinWaitActive("ThinPrint Client Windows for RDP 10 - InstallShield Wizard")
WinActivate("ThinPrint Client Windows for RDP 10 - InstallShield Wizard")
Sleep(500)
Send("{ENTER}")
Sleep(500)
WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer")
WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer")
Sleep(600)
Send("!n")
Sleep(300)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(300)
Send("!i")
Sleep(1500)
WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10")
WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10")
Sleep(300)
Send("{ENTER}")
Sleep(300)
    EndFunc

;For LibreOffice installation

Func main13()
     ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\LibreOffice.msi")
     WinActivate("LibreOffice 5.2.3.3 - Installation Wizard")
     WinWaitActive("LibreOffice 5.2.3.3 - Installation Wizard")
     Sleep(500);
     WinActivate("LibreOffice 5.2.3.3 - Installation Wizard")
     WinWaitActive("LibreOffice 5.2.3.3 - Installation Wizard")
     Send("{ENTER}");
     Sleep(500);
     Send("{ENTER}");
     Send("{TAB}");
     Send("{TAB}");
     Send("{SPACE}");
     Send("{TAB}");
     Send("{TAB}");
     Sleep(500);
     Send("{ENTER}");
     Sleep(500);
     Send("{ENTER}");
     Sleep(500);
     Send("{ENTER}");
     Sleep(1500);
     WinActivate("LibreOffice 5.2.3.3 - Installation Wizard","Installation Wizard Completed")
     WinWaitActive("LibreOffice 5.2.3.3 - Installation Wizard","Installation Wizard Completed")
     Send("{ENTER}");
EndFunc

;For MSF100driver-setup Installation

Func main14()
    Global  $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\MFS\New_MFS\MFS100_Driver_Setup.exe")
    Global  $FFSetupWin = ("Setup - MFS100 Fingerprint Sensor Driver")
    Global  $FFSetupWin1 = ("Device Driver Installation Wizard")
     ShellExecute($FFInstdest)
     Sleep(50);
     WinActivate($FFSetupWin)
     WinWaitActive($FFSetupWin)

     Send("{ENTER}");
     Sleep(200);
     Send("{ENTER}");
     Sleep(200);
     Send("{ENTER}");
     Sleep(200);
     Send("{ENTER}");
     Sleep(200);
     WinWaitActive($FFSetupWin1)
     WinWaitActive($FFSetupWin1)
     Send("{ENTER}");
     Sleep(200);
     WinWaitActive($FFSetupWin1,"Completing the Device Driver Installation Wizard")
     WinWaitActive($FFSetupWin1,"Completing the Device Driver Installation Wizard")
     Send("{ENTER}");
     Sleep(200)
     WinWaitActive($FFSetupWin)
     WinWaitActive($FFSetupWin)
     Send("{ENTER}");
     Sleep(200)
EndFunc


;For MFS_Client_Service
Func main15()
    Global  $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\MFS\New_MFS\MFS100ClientService.exe")
    Global  $FFSetupWin = ("Setup - MFS100ClientService")
    Global  $FFSetupWin1 = ("Setup - MFS100Driver")
    ShellExecute($FFInstdest)
     Sleep(50);
     WinWaitActive($FFSetupWin)
     WinActivate($FFSetupWin)
     Send("{ENTER}");
     Sleep(200);
     Send("{ENTER}");
     Sleep(200)
     WinWaitActive($FFSetupWin1)
     WinActivate($FFSetupWin1)
     Sleep(200);
     Send("{ENTER}");
     Sleep(200);
     Send("{ENTER}");
     Sleep(1000);
     WinWaitActive("Windows Security")
     WinActivate("Windows Security")
     Sleep(200)
     Send("!i")
     Sleep(400)
     WinWaitActive($FFSetupWin1)
     WinActivate($FFSetupWin1)
     Sleep(300)
    EndFunc

;For Mozilla firefox

Func main16()
    Global  $FFInstdest = ("F:\AX_Softwares\SOFTWARE_DUMP\Firefox Setup 9.0.1.exe")
    Global  $FFSetupWin = ("Mozilla Firefox Setup")
     Run($FFInstdest)
     Sleep(1000);
     WinActivate($FFSetupWin)
     WinWaitActive($FFSetupWin)
     Send("{ENTER}");
     Sleep(1000);
     Send("{ENTER}");
     Sleep(1000);
     Send("{ENTER}");
     Sleep(1000);
     WinWaitActive($FFSetupWin, "Completing the Mozilla Firefox Setup Wizard")
     Sleep(200)
     Send("!l")
     Sleep(200)
     Send("{ENTER}");
     Sleep(1000)
    EndFunc

;For VPN_Config_import-32 Bit

Func main17()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Forti_Client-Config-Import-32 Bit")
EndFunc

;For Ms-Sql 32 bit version

Func main21()
Global  $FFInstdest = ("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\SQL_Installation_32Bitexe")
Global  $FFSetupWin = ("SQL Server Installation Center")
Global $FFSetupWin1 = ("SQL Server 2014 Setup")
ShellExecute($FFInstdest)
Sleep(1000);
WinWaitActive($FFSetupWin)
WinActivate($FFSetupWin)
Sleep(500)
Send("{TAB}")
Send("{ENTER}")
Sleep(500)
WinWaitActive($FFSetupWin1)
WinActivate($FFSetupWin1)
Sleep(500)
Send("!a")
Sleep(500)
Send("!n")
WinWaitActive($FFSetupWin1,"Microsoft Update")
WinActivate($FFSetupWin1,"Microsoft Update")
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{ENTER}")
Sleep(400)
Send("!n")
Sleep(400)
Send("!n")
Sleep(500)
WinWaitActive($FFSetupWin1,"Feature Selection")
WinActivate($FFSetupWin1,"Feature Selection")
Send("!u")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("!n")
Sleep(400)
WinWaitActive($FFSetupWin1,"Instance Configuration")
WinActivate($FFSetupWin1,"Instance Configuration")
Sleep(400)
Send("!d")
Sleep(400)
Send("!n")
WinWaitActive($FFSetupWin1,"Server Configuration")
WinActivate($FFSetupWin1,"Server Configuration")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(500)
Send("Administrator",1)
Sleep(500)
Send("!c")
Sleep(500)
Send("{ENTER}")
Sleep(500)
Send("{TAB}")
Sleep(500)
Send("apollo@123",0)
Sleep(500)
Send("!n")
Sleep(400)
WinWaitActive($FFSetupWin1,"Database Engine Configuration")
WinActivate($FFSetupWin1,"Database Engine Configuration")
Sleep(400)
Send("!m")
Sleep(400)
Send("{TAB}")
Sleep(500)
Send("apollo@123",0)
Sleep(500)
Send("{TAB}")
Sleep(400)
Send("apollo@123",0)
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{RIGHT}")
Sleep(400)
WinWaitActive($FFSetupWin1,"&Data root directory")
WinActivate($FFSetupWin1,"&Data root directory")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{BS}")
Sleep(500)
Send("D:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA",0)
Sleep(400)
Send("!n")
Sleep(13000)
WinWaitActive($FFSetupWin1,"Your SQL Server 2014 installation completed successfully")
WinActivate($FFSetupWin1,"Your SQL Server 2014 installation completed successfully")
Sleep(300)
Send("{TAB}")
Sleep(200)
Send("{TAB}")
Sleep(300)
Send("{TAB}")
Sleep(300)
Send("{TAB}")
Sleep(300)
Send("{ENTER}")
Sleep(300)
WinWaitActive($FFSetupWin)
WinActivate($FFSetupWin)
Sleep(300)
Send("{ALT}{SPACE}")
Sleep(300)
Send("{UP}")
Sleep(300)
Send("{ENTER}")
Sleep(300)
EndFunc

;For Ms-Sql 64 bit version

Func main22()
Global  $FFInstdest = ("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\SQL_Installation-64Bit.exe")
Global  $FFSetupWin = ("SQL Server Installation Center")
Global $FFSetupWin1 = ("SQL Server 2014 Setup")
ShellExecute($FFInstdest)
Sleep(1000);
WinWaitActive($FFSetupWin)
WinActivate($FFSetupWin)
Sleep(500)
Send("{TAB}")
Send("{ENTER}")
Sleep(500)
WinWaitActive($FFSetupWin1)
WinActivate($FFSetupWin1)
Sleep(500)
Send("!a")
Sleep(500)
Send("!n")
WinWaitActive($FFSetupWin1,"Microsoft Update")
WinActivate($FFSetupWin1,"Microsoft Update")
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{ENTER}")
Sleep(400)
Send("!n")
Sleep(400)
Send("!n")
Sleep(500)
WinWaitActive($FFSetupWin1,"Feature Selection")
WinActivate($FFSetupWin1,"Feature Selection")
Send("!u")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{SPACE}")
Sleep(400)
Send("!n")
Sleep(400)
WinWaitActive($FFSetupWin1,"Instance Configuration")
WinActivate($FFSetupWin1,"Instance Configuration")
Sleep(400)
Send("!d")
Sleep(400)
Send("!n")
WinWaitActive($FFSetupWin1,"Server Configuration")
WinActivate($FFSetupWin1,"Server Configuration")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{DOWN}")
Sleep(400)
Send("{DOWN}")
Sleep(500)
Send("Administrator",1)
Sleep(500)
Send("!c")
Sleep(500)
Send("{ENTER}")
Sleep(500)
Send("{TAB}")
Sleep(500)
Send("apollo@123",0)
Sleep(500)
Send("!n")
Sleep(400)
WinWaitActive($FFSetupWin1,"Database Engine Configuration")
WinActivate($FFSetupWin1,"Database Engine Configuration")
Sleep(400)
Send("!m")
Sleep(400)
Send("{TAB}")
Sleep(500)
Send("apollo@123",0)
Sleep(500)
Send("{TAB}")
Sleep(400)
Send("apollo@123",0)
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{RIGHT}")
Sleep(400)
WinWaitActive($FFSetupWin1,"&Data root directory")
WinActivate($FFSetupWin1,"&Data root directory")
Sleep(400)
Send("{TAB}")
Sleep(400)
Send("{BS}")
Sleep(500)
Send("D:\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA",0)
Sleep(400)
Send("!n")
Sleep(13000)
WinWaitActive($FFSetupWin1,"Your SQL Server 2014 installation completed successfully")
WinActivate($FFSetupWin1,"Your SQL Server 2014 installation completed successfully")
Sleep(300)
Send("{TAB}")
Sleep(200)
Send("{TAB}")
Sleep(300)
Send("{TAB}")
Sleep(300)
Send("{TAB}")
Sleep(300)
Send("{ENTER}")
Sleep(300)
WinWaitActive($FFSetupWin)
WinActivate($FFSetupWin)
Sleep(300)
Send("{ALT}{SPACE}")
Sleep(300)
Send("{UP}")
Sleep(300)
Send("{ENTER}")
Sleep(300)
EndFunc

;For AX-64Bit Prerequasations

Func main23()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\hotfix\Synchronization-KB2703853-v2.1-x64-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853) has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x64) ENU (KB2703853) has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\hotfix\ProviderServices-KB2703853-v2.1-x64-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853) has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x64) ENU (KB2703853) has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\hotfix\DatabaseProviders-KB2703853-v3.1-x64-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853) has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x64) ENU (KB2703853) has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\Synchronization-v2.1-x64-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Core Components (x64) ENU ")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU ")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x64) ENU ","Microsoft Sync Framework 2.1 Core Components (x64) ENU  has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x64) ENU ","Microsoft Sync Framework 2.1 Core Components (x64) ENU  has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(400)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\ProviderServices-v2.1-x64-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Provider Services (x64) ENU")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x64) ENU ","Microsoft Sync Framework 2.1 Provider Services (x64) ENU  has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x64) ENU  ","Microsoft Sync Framework 2.1 Provider Services (x64) ENU  has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_64bit\Pos_Prerequisites\Sync_Framework\DatabaseProviders-v3.1-x64-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Database Providers (x64) ENU")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x64) ENU","Microsoft Sync Framework 2.1 Database Providers (x64) ENU  has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x64) ENU","Microsoft Sync Framework 2.1 Database Providers (x64) ENU  has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
EndFunc

;For AX-32 Bit Prerequasations

Func main24()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\hotfix\Synchronization-KB2703853-v2.1-x86-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853) has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Core Components (x86) ENU (KB2703853) has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\hotfix\ProviderServices-KB2703853-v2.1-x86-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853) has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Provider Services (x86) ENU (KB2703853) has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\hotfix\DatabaseProviders-KB2703853-v3.1-x86-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853) has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853)","Microsoft Sync Framework 2.1 Database Providers (x86) ENU (KB2703853) has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\Synchronization-v2.1-x86-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Core Components (x86) ENU ")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU ")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Core Components (x86) ENU ","Microsoft Sync Framework 2.1 Core Components (x86) ENU  has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Core Components (x86) ENU ","Microsoft Sync Framework 2.1 Core Components (x86) ENU  has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(400)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\ProviderServices-v2.1-x86-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Provider Services (x86) ENU")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Provider Services (x86) ENU ","Microsoft Sync Framework 2.1 Provider Services (x86) ENU  has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Provider Services (x86) ENU  ","Microsoft Sync Framework 2.1 Provider Services (x86) ENU  has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\AX_32bit\Pos_Prerequisites\Sync_Framework\DatabaseProviders-v3.1-x86-ENU.msi")
Sleep(200)
WinWait("Microsoft Sync Framework 2.1 Database Providers (x86) ENU")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
Send("{ENTER}")
Sleep(500)
WinWaitActive("Microsoft Sync Framework 2.1 Database Providers (x86) ENU","Microsoft Sync Framework 2.1 Database Providers (x86) ENU  has been successfully installed")
WinActivate("Microsoft Sync Framework 2.1 Database Providers (x86) ENU","Microsoft Sync Framework 2.1 Database Providers (x86) ENU  has been successfully installed")
Sleep(200)
Send("{ENTER}")
Sleep(500)


EndFunc

;For Async service Configuration-64 Bit

Func main27()
ShellExecute("C:\%Program Files(x86)%\%Microsoft Dynamics AX%\60\CDX\Async Client\Package\AsyncClientConfigurationUtility.exe")
EndFunc

;For Async Service Configuration-32Bit

Func main28()
ShellExecute("C:\%Program Files%\%Microsoft Dynamics AX%\60\CDX\Async Client\Package\AsyncClientConfigurationUtility.exe")
EndFunc

;For AX-32 Bit

Func main29()
EndFunc

;For AX-64 Bit

Func main30()
EndFunc

;For Forticlient-64 Bit Installation

Func main31()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\VPN\FortiClientOnlineInstaller_6.0.0.exe")
EndFunc

;For Forticlient-32 Bit installation

Func main32()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\VPN\FortiClientOnlineInstaller_6.0.0.exe")
EndFunc

;For Administartor account enable-set

Func main33()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Admin_Enable-Password")
EndFunc

;For System Host name Change

Func main34()
$newName = InputBox("Rename PC", " Note:- Please Enter the SITE ID, *** If you Click on OK it will Restarts the system immediatley *** ")
$WMI = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2")
$aItems = $WMI.ExecQuery ("Select Name from Win32_ComputerSystem")

 For $element In $aItems
  $action = $element.Rename($newName)
    If $action <> 0 Then
    MsgBox(0, "Error - " & $action, "Error renaming PC")
  Else
   Shutdown(6)
  EndIf
 Next
EndFunc

;For PAD Installation

Func main35()
     ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Swiping\PAD\Win7\PADDaemonSetupWin7.msi")
     Sleep(100);
     WinActivate("PADDaemonWin7")
     WinWaitActive("PADDaemonWin7")
     Send("{ENTER}");
     Sleep(100);
     Send("{ENTER}");
     Sleep(100);
     Send("{ENTER}");
     Sleep(500);
     WinWaitActive("PADDaemonWin7", "Installation Complete")
     Send("{ENTER}");
     Sleep(100)
EndFunc

;For Generic Printer-Installation

Func main36()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\ADD-Generic_Printer")
EndFunc

;For ThinPrinter-32Bit

Func main37()
ShellExecute("F:\AX_Softwares\SOFTWARE_DUMP\Thin_Printer_RDP\ThinPrintRDPClient_x64")
Sleep(300)
WinWaitActive("ThinPrint Client Windows for RDP 10 - InstallShield Wizard")
WinActivate("ThinPrint Client Windows for RDP 10 - InstallShield Wizard")
Sleep(500)
Send("{ENTER}")
Sleep(500)
WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer")
WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield(R) Wizard will install ThinPrint Client Windows for RDP 10 on your computer")
Sleep(600)
Send("!n")
Sleep(300)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(300)
Send("!i")
Sleep(1500)
WinWaitActive("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10")
WinActivate("ThinPrint Client Windows for RDP 10","The InstallShield Wizard has successfully installed ThinPrint Client Windows for RDP 10")
Sleep(300)
Send("{ENTER}")
Sleep(300)
EndFunc

;For VPN Config Import 64Bit

Func main38()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Forti_Client-Config-Import-64 Bit")
EndFunc

; For Windows Update Disable
Func main39()
ShellExecute("F:\AX_Softwares\Other_Softwares\Printer-Spooler\Support_Files\Windows_Update_Disable")
EndFunc

;For Dailup-Connection

Func main40()
ShellExecute ("rasphone.exe")
Sleep(200)
WinWaitActive("Network Connections")
WinActivate("Network Connections")
Sleep(200)
Send("{ENTER}")
Sleep(200)
WinWaitActive("Set up a new connection")
WinActivate("Set up a new connection")
Sleep(200)
Send("{SPACE}")
Sleep(200)
Send("!a")
Sleep(200)
Send("{ENTER}")
Sleep(200)
WinWaitActive("Network Connections")
WinActivate("Network Connections")
Sleep(200)
Send("{TAB}")
Sleep(200)
Send("{TAB}")
Sleep(200)
Send("{TAB}")
Sleep(200)
Send("{TAB}")
Sleep(200)
Send("{ENTER}")
Sleep(200)
ShellExecute("ncpa.cpl")
Sleep(200)
WinWaitActive("Network Connections")
WinActivate("Network Connections")
Sleep(200)
EndFunc

 

Edited by Jos
added CODEBOX <>

Share this post


Link to post
Share on other sites
Jos

Since you are doing WinWait() and Send() commands, the script will continue until it has done all steps.
Are you sure those installers don't have a silent (/S) option that avoid having to do any interaction?

Jos

  • Like 1

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Melba23

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Earthshine

if they are msi installers, when you cancel, they roll back. you need to wait for one to finish fully before trying to start another, one at a time.


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
Earthshine

oh and @Jos gave you the answer. You are installing all msi installers, ALL support silent installation. Look up MSI silent install on google for more. that way, each install would be one line of code, maybe two

Edited by Earthshine

My resources are limited. You must ask the right questions

 

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

  • Similar Content

    • nooneclose
      By nooneclose
      I forgot an important and needed aspect of my code. I need to be able to check for people who work every other week. Is it possible to write the dates that they work (every other week) between two date ranges? 
      Example:  Bob Smith has a Start date of 8-26-2018 (that is the date he is hired) And He stops working on 12-12-18 (that's the day he goes on vacation or whatever) However his work shift is every other Saturday from 7:30 AM to 6:00 Pm.  I need to calculate every other Saturday between 8-26-18 and 12-12-18 (is this clear?)
       
      here is the code I have so far. I am just missing this last part:
      ; Step 7 Func SendData() ;******************************************************************************* ; Sends all collected data to the Excel file in correct order for Upload ;******************************************************************************* MsgBox($MB_ICONINFORMATION, "Scheduler_Bot", "Sending Data", 2) ; Loop Counters $LoopCount = 0 $Array_Index = 0 $DayIndex = 0 $dataIndex = 0 ; Counter for the day of the week Local $dCount = 2 ; Counter for the numbers of Ys Local $yesCount = 0 ; Excel Write Counter (VERY IMPORTANT!) Local $EWriteCount = 2 ; Declare the global shift arrays (Sunday - Saturday) Global $ShiftDaySU[100][600] Global $ShiftDayM[100][600] Global $ShiftDayT[100][600] Global $ShiftDayW[100][600] Global $ShiftDayR[100][600] Global $ShiftDayF[100][600] Global $ShiftDayS[100][600] Global $sDates[400] While $Formatted_Names[$dataIndex] <> $Formatted_Names[$IndexRows] ; $LoopCount < $IndexRows $ACounter = 0 ; Array counter ; Gets the Start date from the array $Temp = $StartDate[$Array_Index] $TempStart = StringLeft($Temp, 8) $StartTempYear = StringLeft($TempStart, 4) $StartTempMonth = StringMid($TempStart, 5, 2) $StartTempDay = StringRight($TempStart, 2) ; Gets the End date from the array $Temp = $EndDate[$Array_Index] $TempEnd = StringLeft($Temp, 8) $EndTempYear = StringLeft($TempEnd, 4) $EndTempMonth = StringMid($TempEnd, 5, 2) $EndTempDay = StringRight($TempEnd, 2) ; The starting date (in value form) $sdate = _DateToDayValue($StartTempYear, $StartTempMonth, $StartTempDay) ;_DateToDayValue(2019,1,9) ;ConsoleWrite(@CRLF & "$start date " & $sdate & @CRLF & @CRLF) ; The ending date (in value form) $edate = _DateToDayValue($EndTempYear, $EndTempMonth, $EndTempDay) ;_DateToDayValue(2019,4,9) ;ConsoleWrite(@CRLF & "$end date " & $edate & @CRLF & @CRLF) ; Variables for readability Local $iYear, $iMonth, $iDay ;Stores what day of the week that shift lands on Local $tSU = _Excel_RangeRead($OpenWorkbook, Default, "I" & $dCount) If $tSU = "Y" Then $yesCount = 1 EndIf Local $tM = _Excel_RangeRead($OpenWorkbook, Default, "J" & $dCount) If $tM = "Y" Then $yesCount += 1 EndIf Local $tT = _Excel_RangeRead($OpenWorkbook, Default, "K" & $dCount) If $tT = "Y" Then $yesCount += 1 EndIf Local $tW = _Excel_RangeRead($OpenWorkbook, Default, "L" & $dCount) If $tW = "Y" Then $yesCount += 1 EndIf Local $tR = _Excel_RangeRead($OpenWorkbook, Default, "M" & $dCount) If $tR = "Y" Then $yesCount += 1 EndIf Local $tF = _Excel_RangeRead($OpenWorkbook, Default, "N" & $dCount) If $tF = "Y" Then $yesCount += 1 EndIf Local $tS = _Excel_RangeRead($OpenWorkbook, Default, "O" & $dCount) If $tS = "Y" Then $yesCount += 1 EndIf ConsoleWrite(@CRLF & @CRLF) ConsoleWrite($tSU & @CRLF) ConsoleWrite($tM & @CRLF) ConsoleWrite($tT & @CRLF) ConsoleWrite($tW & @CRLF) ConsoleWrite($tR & @CRLF) ConsoleWrite($tF & @CRLF) ConsoleWrite($tS & @CRLF) ConsoleWrite(@CRLF & @CRLF) ; Check to see if they work every other week Local $rotationWeek = _Excel_RangeRead($OpenWorkbook, Default, "U" & $dCount) If $rotationWeek = "0" Then ; Do nothing Else If $rotationWeek = 1 ; Do something Else ; $rotationWeek = 2 ; Do something EndIf EndIf Local $repeatWeek = _Excel_RangeRead($OpenWorkbook, Default, "V" & $dCount) If $rotationWeek = "0" Then ; Do nothing Else If $rotationWeek = 1 ; Do something Else ; $rotationWeek = 2 ; Do something EndIf EndIf While $yesCount > 0 If $tSU = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 1 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDaySU[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDaySU[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "SU " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Sunday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tSU = "N" ElseIf $tM = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 2 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDayM[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDayM[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "M " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Monday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tM = "N" ElseIf $tT = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 3 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDayT[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDayT[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "T " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Tuesday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tT = "N" ElseIf $tW = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 4 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDayW[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDayW[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "W " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Wednesday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tW = "N" ElseIf $tR = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 5 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDayR[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDayR[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "R " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Thursday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tR = "N" ElseIf $tF = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 6 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDayF[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDayF[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "F " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Friday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tF = "N" ElseIf $tS = "Y" Then For $Index = $sdate To $edate _DayValueToDate($Index, $iYear, $iMonth, $iDay) ; Finds the day based on its numerical value (1 = Sunday) If _DateToDayOfWeek($iYear, $iMonth, $iDay) = 7 Then $Temp = $iYear & "-" & $iMonth & "-" & $iDay & "T" & "00" & ":" & "00" & ":" & "00" & ":" & "000" $ShiftDayS[$ACounter][$DayIndex] = $Temp _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $ShiftDayS[$ACounter][$DayIndex], "AI" & $EWriteCount) ; Send Name _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Formatted_Names[$dataIndex], "AA" & $EWriteCount) ; Send Start Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $StartTimes[$dataIndex], "AB" & $EWriteCount) ; Send End Time _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $EndTimes[$dataIndex], "AC" & $EWriteCount) ; Send Work Hours _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $HoursWorked[$dataIndex], "AD" & $EWriteCount) ; Send Work Group _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkGroup[$dataIndex], "AE" & $EWriteCount) ; Send Department _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkDepartment, "AF" & $EWriteCount) ; Send Supervisor _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $Supervisors[$dataIndex], "AG" & $EWriteCount) ; Send Notes _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, $WorkNotes[$dataIndex], "AH" & $EWriteCount) ; Send Shift Number $tempStime = StringReplace($StartTimes[$dataIndex], ":", "") $tempEtime = StringReplace($EndTimes[$dataIndex], ":", "") _Excel_RangeWrite($OpenWorkbook, $OpenWorkbook.ActiveSheet, "S " & $tempStime & "-" & $tempEtime, "AJ" & $EWriteCount) $ACounter += 1 $EWriteCount += 1 ConsoleWrite(@CRLF & "Saturday " & $Temp & @CRLF) EndIf Next $yesCount -= 1 $tS = "N" Else ;Error Nothing equals "Y" ConsoleWrite(@CRLF & "Error Nothing equals 'Y'" & @CRLF) EndIf $DayIndex += 1 $LoopCount += 1 WEnd $Array_Index += 1 $dataIndex += 1 $dCount += 1 WEnd MsgBox($MB_ICONINFORMATION, "Scheduler_Bot", "Finished Sending Data", 2) EndFunc  
    • gahhon
      By gahhon
      Is there any resource/sample to generating a fancy report?
      I was downloaded this resource and try the example, but it failed to execution due to function not define. PDF
      My simple idea of generating the report would be like this:-
      Read data from excel instead of database, then generate PDF report based on my custom design.
      Any better ideas is much appreciate to share with me here
      Thanks.
    • gahhon
      By gahhon
      While Not _Login() _Login() WEnd _Initial_Check() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $GUI_CLOSE_BUTTON, $BTN_EXIT _GUIDisable($GUI_MAIN, 0, 30) _Close_Application() EndSwitch WEnd ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Password_Check ; Description ...: To check against the input with the password file ; =============================================================================================================================== Func _Password_Check() Local $IN_PASSWORD = _Metro_InputBox("Please Enter Your Password:" , 11, "", True, True) If @error Then Return SetError(1, 0, "") ElseIf $PASSWORD <> $IN_PASSWORD Then Return SetError(2, 0, "Access Denied!") Else Return True EndIf EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Login ; Description ...: Login ; =============================================================================================================================== Func _Login() Local $FLAG_LOGIN = _Password_Check() If @error = 1 Then _Close_Application() ElseIf @error = 2 Then _Metro_MsgBox(0, "", $FLAG_LOGIN) Return False Else _Metro_MsgBox(0, "", "Access Granted!") Return True EndIf EndFunc When the application start, it will prompt for password for login.
      I entered several wrong password, it shows "Access Denied!" and re-prompt for password for login.
      Then I entered the correct one, it shows "Access Granted!" but it still re-prompt for password for login.
      Any idea what's wrong? Thanks
    • gahhon
      By gahhon
      #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\Downloads\ALlogo.ico #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_HiDpi=y #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /rm /pe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** I found out that a lot of sources provided by AutoIT members like what I am recently using is the Metro UDF.
      On top of it, it always written the Region of code and red color. Then it also assign some value into some variable.
      May I know, what are their use and what is the purpose of doing?
      If I remove them, will affect the application?
      Thanks
    • gahhon
      By gahhon
      I don't find any relevant topic via Google Search. Please kindly advise how to read and update data in Google SpreadSheet.
      Thanks a lot.
×