wjp79 KiXforms Novice

Joined: 24 Feb 2009 Posts: 4 Location: Friesland (The Netherlands)
|
Posted: Tue Dec 22, 2009 3:51 pm Post subject: Final touch.. Add a "ALL DONE" Message |
|
|
Hello people..
I'm allmost sadisfied with "my" script... (Tnx to all the people who contributed.)
I'm only looking for a way to create a "popup" message when the function "Function RunApps ()" has completed. I added a messagebox at the end of the function wich seems to work. But when I create a exe file with kix2exe is doesn't work anymore!.
If anyone has some ideas.. please let me know.
TNX
WJP
| Code: |
;<kix2exe>
;<version>1.4.0.0</version>
;<settings>
; <package>X:\Software Menu Tool\software.exe</package>
; <icon>C:\Program Files\AutoIt3\Aut2Exe\Icons\AutoIt_Main_v10_48x48_256.ico</icon>
; <kix>Wkix32</kix>
; <consolehide></consolehide>
; <consolesize></consolesize>
; <consoletitle></consoletitle>
; <keepconsoleopen></keepconsoleopen>
; <include></include>
; <runasuser></runasuser>
; <runaspassword></runaspassword>
; <runasinteractive></runasinteractive>
; <runasnoprofile></runasnoprofile>
; <uaclevel></uaclevel>
; <branding-name></branding-name>
; <branding-desc></branding-desc>
; <branding-company></branding-company>
; <branding-version></branding-version>
; <branding-vernum>1.0.0.0</branding-vernum>
; <branding-prodver></branding-prodver>
; <branding-copyright></branding-copyright>
; <balloontips>true</balloontips>
; <kixforms>true</kixforms>
;</settings>
;</kix2exe>
;SELECT
;CASE EXIST ("\\10.0.0.1\software\INSTALLEREN-autoit\")
;$ShellCMD = "\\10.0.0.1\software\INSTALLEREN-autoit\"
;CASE EXIST ("\\server1\software\INSTALLEREN-autoit\")
;$ShellCMD = "\\server1\software\INSTALLEREN-autoit\"
;CASE Exist ("..\software.exe")
$ShellCMD = (".\")
;CASE 1
;? "beide bestaan niet. Help..."
;ENDSELECT
$TestForm= CreateObject("Kixtart.Form")
If @ERROR
shell ("msiexec /i" + "bin\KiXforms.msi /qb /norestart")
Endif
;creer form
Break On
$System = CreateObject("Kixtart.System")
$Form = $System.Form()
$Form.BackColor = 255,255,255
$Form.Height = 577
$Form.Left = 113
$Form.Text = "Oké-Pc Autoit Software Menu"
$Form.Top = 150
$Form.Width = 800
;************* PictureBox1 **************
$PictureBox1 = $Form.Controls.PictureBox()
$PictureBox1.BackColor = 192,192,192
$PictureBox1.BorderStyle = 0
$PictureBox1.Height = 105
$PictureBox1.Left = 200
$PictureBox1.Top = 400
$PictureBox1.Width = 464
$PictureBox1.Picture = $shellcmd + "bin\oke.bmp"
;**************************************
$TabControl = $Form.Controls.TabControl()
$TabControl.height = 350
$TabControl.top = 30
$TabControl.left = 200
$TabControl.width = 500
$TabControl.size = 500
$Tabcontrol.Backcolor = 130,202,212
;TABCONTROLS
$TabPage1 = $TabControl.TabPages.Add("Software")
$TabPage2 = $TabControl.TabPages.Add("Utilities")
$TabPage3 = $TabControl.TabPages.Add("Info")
;****************************************************************************************
;* *
;* Knoppen Tabpage 2 *
;* *
;****************************************************************************************
;HWINFO
$Button6 = $TabPage2.Controls.Button()
$Button6.Height = 75
$Button6.Left = 15
$Button6.Text = "Hwinfo"
$Button6.ToolTipText = "hwinfo utility"
$Button6.Top = 30
$Button6.Width = 75
$Button6.OnClick = "Hwinfo"
;Total commander
$Button7 = $TabPage2.Controls.Button()
$Button7.Height = 75
$Button7.Left = 15
$Button7.Text = "Total Commander"
$Button7.ToolTipText = "Total Commander"
$Button7.Top = 130
$Button7.Width = 75
$Button7.OnClick = "Totalcmd"
;Clamav
$Button8 = $TabPage2.Controls.Button()
$Button8.Height = 75
$Button8.Left = 15
$Button8.Text = "Clam antivirus"
$Button8.ToolTipText = "Clam antivirus"
$Button8.Top = 230
$Button8.Width = 75
$Button8.OnClick = "clamav"
;MalwareByte Portble
$Button8 = $TabPage2.Controls.Button()
$Button8.Height = 75
$Button8.Left = 105
$Button8.Text = "Malware Bytes Portable"
$Button8.ToolTipText = "MalwareByte Portable"
$Button8.Top = 30
$Button8.Width = 75
$Button8.OnClick = "MalwareP"
;MalwareByte Portble
$Button9 = $TabPage2.Controls.Button()
$Button9.Height = 75
$Button9.Left = 105
$Button9.Text = "Symantec RNAV"
$Button9.ToolTipText = "Symnrt"
$Button9.Top = 130
$Button9.Width = 75
$Button9.OnClick = "RNAV"
;****************************************************************************************
;* *
;* Overige knoppen *
;* *
;****************************************************************************************
;alles knop
$Button1 = $TabPage1.Controls.Button()
$Button1.Height = 23
$Button1.Left = 15
$Button1.Text = "Alles"
$Button1.ToolTipText = "Selecteer alle applicaties"
$Button1.Top = 50
$Button1.Width = 75
$Button1.OnClick = "SelectAll"
;verwijder alles knop
$Button2 = $TabPage1.Controls.Button()
$Button2.Height = 24
$Button2.Left = 15
$Button2.Text = "Geen"
$Button2.ToolTipText = "deselecteer applicaties"
$Button2.Top = 80
$Button2.Width = 75
$Button2.OnClick = "SelectNone"
; go knop
$Button3 = $TabPage1.Controls.Button()
$Button3.Height = 75
$Button3.Left = 15
$Button3.Text = "Go!"
$Button3.ToolTipText = "Gaan met die Banaan!"
$Button3.Top = 160
$Button3.Width = 75
$Button3.OnClick = "RunApps"
;exit knop
$Button4 = $Form.Controls.Button()
$Button4.Height = 75
$Button4.Left = 15
$Button4.Text = "Exit"
$Button4.ToolTipText = "Exit"
$Button4.Top = 290
$Button4.Width = 75
$Button4.OnClick = "CloseForm"
;****************************************************************************************
;* *
;* Checkboxen tabpage1 *
;* *
;****************************************************************************************
;checkbox 1
$CheckBox1 = $TabPage1.Controls.CheckBox
$CheckBox1.BackColor = 212,208,200
$CheckBox1.CheckAlign = 16
$CheckBox1.Height = 20
$CheckBox1.Left = 100
$CheckBox1.Text = "7ZIP"
$CheckBox1.Top = 50
$CheckBox1.Width = 138
;checkbox 2
$CheckBox2 = $TabPage1.Controls.CheckBox
$CheckBox2.BackColor = 212,208,200
;$CheckBox2.CheckAlign = 16
$CheckBox2.Height = 28
$CheckBox2.Left = 100
$CheckBox2.Text = "Adobe Reader 9.2"
$CheckBox2.Top = 70
$CheckBox2.Width = 138
;checkbox 3
$CheckBox3 = $TabPage1.Controls.CheckBox()
$CheckBox3.BackColor = 212,208,200
$CheckBox3.CheckAlign = 16
$CheckBox3.Height = 30
$CheckBox3.Left = 100
$CheckBox3.Text= "Filezilla 3.2.4.1"
$CheckBox3.Top = 90
$CheckBox3.Width = 138
;checkbox 4
$CheckBox4 = $TabPage1.Controls.CheckBox()
$CheckBox4.BackColor = 212,208,200
$CheckBox4.CheckAlign = 16
$CheckBox4.Height = 30
$CheckBox4.Left = 100
$CheckBox4.Text = "Firefox 3.5.2"
$CheckBox4.Top = 110
$CheckBox4.Width = 138
;checkbox 5
$CheckBox5 = $TabPage1.Controls.CheckBox()
$CheckBox5.BackColor = 212,208,200
$CheckBox5.CheckAlign = 16
$CheckBox5.Height = 30
$CheckBox5.Left = 100
$CheckBox5.Text = "MC voor Windows"
$CheckBox5.Top = 130
$CheckBox5.Width = 138
;checkbox 6
$CheckBox6 = $TabPage1.Controls.CheckBox()
$CheckBox6.BackColor = 212,208,200
$CheckBox6.CheckAlign = 16
$CheckBox6.Height = 30
$CheckBox6.Left = 100
$CheckBox6.Text = "Audiacity"
$CheckBox6.Top = 150
$CheckBox6.Width = 138
;checkbox 7
$CheckBox7 = $TabPage1.Controls.CheckBox()
$CheckBox7.BackColor = 212,208,200
$CheckBox7.CheckAlign = 16
$CheckBox7.Height = 30
$CheckBox7.Left = 100
$CheckBox7.Text = "Open Office 3.1"
$CheckBox7.Top = 170
$CheckBox7.Width = 138
;checkbox 8
$CheckBox8 = $TabPage1.Controls.CheckBox()
$CheckBox8.BackColor = 212,208,200
$CheckBox8.CheckAlign = 16
$CheckBox8.Height = 30
$CheckBox8.Left = 100
$CheckBox8.Text = "Java V6 update 17"
$CheckBox8.Top = 190
$CheckBox8.Width = 138
;checkbox 9
$CheckBox9 = $TabPage1.Controls.CheckBox()
$CheckBox9.BackColor = 212,208,200
$CheckBox9.CheckAlign = 16
$CheckBox9.Height = 30
$CheckBox9.Left = 100
$CheckBox9.Text = "VLC 1.0.3"
$CheckBox9.Top = 210
$CheckBox9.Width = 138
;checkbox 10
$CheckBox10 = $TabPage1.Controls.CheckBox()
$CheckBox10.BackColor = 212,208,200
$CheckBox10.CheckAlign = 16
$CheckBox10.Height = 30
$CheckBox10.Left = 300
$CheckBox10.Text = "Inkscape 0.46"
$CheckBox10.Top = 50
$CheckBox10.Width = 138
;checkbox 11
$CheckBox11 = $TabPage1.Controls.CheckBox()
$CheckBox11.BackColor = 212,208,200
$CheckBox11.CheckAlign = 16
$CheckBox11.Height = 30
$CheckBox11.Left = 300
$CheckBox11.Text = "Notepad++"
$CheckBox11.Top = 70
$CheckBox11.Width = 138
;checkbox 12
$CheckBox12 = $TabPage1.Controls.CheckBox()
$CheckBox12.BackColor = 212,208,200
$CheckBox12.CheckAlign = 16
$CheckBox12.Height = 30
$CheckBox12.Left = 300
$CheckBox12.Text = "Flash player 10 IE en FF"
$CheckBox12.Top = 90
$CheckBox12.Width = 138
;checkbox 13
$CheckBox13 = $TabPage1.Controls.CheckBox()
$CheckBox13.BackColor = 212,208,200
$CheckBox13.CheckAlign = 16
$CheckBox13.Height = 30
$CheckBox13.Left = 300
$CheckBox13.Text = "NVU WYSIWYG editor"
$CheckBox13.Top = 110
$CheckBox13.Width = 138
;checkbox 14
$CheckBox14 = $TabPage1.Controls.CheckBox()
$CheckBox14.BackColor = 212,208,200
$CheckBox14.CheckAlign = 16
$CheckBox14.Height = 30
$CheckBox14.Left = 300
$CheckBox14.Text = "Malware Bytes setup"
$CheckBox14.Top = 130
$CheckBox14.Width = 138
;checkbox 15
$CheckBox15 = $TabPage1.Controls.CheckBox()
$CheckBox15.BackColor = 212,208,200
$CheckBox15.CheckAlign = 16
$CheckBox15.Height = 30
$CheckBox15.Left = 300
$CheckBox15.Text = "Thunderbird"
$CheckBox15.Top = 150
$CheckBox15.Width = 138
;checkbox 16
$CheckBox16 = $TabPage1.Controls.CheckBox()
$CheckBox16.BackColor = 212,208,200
$CheckBox16.CheckAlign = 16
$CheckBox16.Height = 30
$CheckBox16.Left = 300
$CheckBox16.Text = "shockwave"
$CheckBox16.Top = 170
$CheckBox16.Width = 138
$TextBox = $TabPage3.Controls.TextBox()
$TextBox.Dock = Fill
$TextBox.Multiline = "True"
$TextBox.ScrollBars = Vertical
$TextBox.Text = ""
$TextBox.WordWrap = "True"
ReadFile ($ShellCMD + "\bin\info.txt")
$TextBoxUsername.SetFocus
$Form.Show
While $Form.Visible
$= Execute($Form.DoEvents())
;Variabelen
;7zip
$App1 = $shellcmd + "\autoit\7zipauto.exe"
$App1Name = "7zip"
;adobe 9.1
$App2 = $shellcmd + "\autoit\adobereaderauto.exe"
$App2Name = "Adobe Reader 9.1"
;filezilla
$App3 = $shellcmd + "\autoit\filezilla.exe"
$App3Name = "Filezilla 3.2.4.1"
;firefox
$App4 = $shellcmd + "\autoit\firefoxauto.exe"
$App4Name = "Firefox 3.0.0.10"
;MC voor Windows
$App5 = $shellcmd + "\autoit\mcauto.exe"
$App5Name = "MC voor Windows"
;Audiacity
$App6 = $shellcmd + "\autoit\audiacityauto.exe"
$App6Name = "Audiacity"
;Open Office 3.1
$App7 = $shellcmd + "\autoit\oo3auto.exe"
$App7Name = "Open Office 3.1"
;JAVA runtime
$App8 = $shellcmd + "\autoit\java.exe"
$App8Name = "Java V6 update 14"
;VLC
$App9 = $shellcmd + "\autoit\vlcplayer.exe"
$App9Name = "VLC 1.0.1"
;Inkscape
$App10 = $shellcmd + "\autoit\inkscapeauto.exe"
$App10Name = "Inkscape 0.46"
;notepad++
$App11 = $shellcmd + "\autoit\nppauto.exe"
$App11Name = "Notepad++"
;flash player 10
$App12 = $shellcmd + "\autoit\flashall.exe"
$App11Name = "flash player 10"
;NVU
$App13 = $shellcmd + "\autoit\nvuauto.exe"
$App11Name = "NVU WYSIWYG editor"
;Malware Bytes
$App14 = $shellcmd + "\autoit\malwarebytes.exe"
$App14Name = "MalwareBytes"
;Thunderbird
$App15 = $shellcmd + "\autoit\thunderbirdauto.exe"
$App15Name = "Thunderbird"
;Shockwave
$App16 = $shellcmd + "\exe\shockwave\shockwavep.exe"
$App16Name = "shockwave"
;****************************************************************************************
;* *
;* TABPAGE 2 *
;* *
;****************************************************************************************
;hwinfo
$util1 = ".\exe\hwinfo\hwinfo.exe"
$util1name = "HWinfo"
;Totalcmd
$util2 = $ShellCMD + "exe\totalcmd\TOTALCMD.EXE"
$util2name = "Totalcmd"
;Clamav
$util3 = $ShellCMD + "exe\clamav\ClamWinPortable\ClamWinPortable.exe"
$util3name = "clamav"
;MalwareByte Portable
$util4 = $ShellCMD + "autoit\malwarep.exe"
$util4name = "MalwareP"
;Norton Symnrt
$util5 = $ShellCMD + "autoit\rnav.exe"
$util5name = "RemoveNAV"
;execute
$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1
;****************************************************************************************
;* *
;* Functies checkboxen tabpage 1 *
;* *
;****************************************************************************************
Function SelectAll()
For $C = 1 to 16
$ = Execute("$CheckBox"+$C+".checked = 'True'")
Next
EndFunction
Function SelectNone ()
For $C = 1 to 16
$ = Execute("$CheckBox"+$C+".checked = 'false'")
Next
EndFunction
Function RunApps ()
If $CheckBox1.CheckState = 1
Shell ("$App1")
endif
If $CheckBox2.CheckState = 1
Shell ("$App2")
EndIf
If $CheckBox3.CheckState = 1
Shell ("$App3")
EndIf
If $CheckBox4.CheckState = 1
Shell ("$App4")
EndIf
If $CheckBox5.CheckState = 1
Shell ("$App5")
EndIf
If $CheckBox6.CheckState = 1
Shell ("$App6")
EndIf
If $CheckBox7.CheckState = 1
Shell ("$App7")
EndIf
If $CheckBox8.CheckState = 1
Shell ("$App8")
EndIf
If $CheckBox9.CheckState = 1
Shell ("$App9")
EndIf
If $CheckBox10.CheckState = 1
Shell ("$App10")
endif
If $CheckBox11.CheckState = 1
Shell ("$App11")
EndIf
If $CheckBox12.CheckState = 1
Shell ("$App12")
EndIf
If $CheckBox13.CheckState = 1
Shell ("$App13")
EndIf
If $CheckBox14.CheckState = 1
Shell ("$App14")
EndIf
If $CheckBox15.CheckState = 1
Shell ("$App15")
endif
If $CheckBox16.CheckState = 1
Shell ("$App16")
EndIf
messagebox ("Installatie voltooid", "Update Complete!")
endfunction
;****************************************************************************************
;* *
;* Functies TABPAGE 2 *
;* *
;****************************************************************************************
function Hwinfo ()
Shell ("$util1")
EndFunction
function Totalcmd ()
Shell ("$util2")
EndFunction
function clamav ()
Shell ("$util3")
EndFunction
function MalwareP ()
Shell ("$util4")
EndFunction
function RNAV ()
Shell ("$util5")
EndFunction
debug off
Function CloseForm ()
Quit
EndFunction
;****************************************************************************************
;* *
;* Functies TABPAGE 3 *
;* *
;****************************************************************************************
$TextBoxUsername.SetFocus
$Form.Show
Function ReadFile($FilePathName)
Dim $Text,$Line
If Open(1,$FilePathName,2)=0
Do
$Line = ReadLine(1)
$Error = @error
$Text = $Text + $Line + @CRLF
Until Not($Error = 0)
EndIf
$TextBox.Text = $Text
EndFunction
|
|
|