Jump to content
Sign in to follow this  
heinda

Button not show - only after mouse over

Recommended Posts

heinda

Is there somebody who can help me? I made this script (warning - i am a newbie) and the buttons in section "Sprache auswählen" are only shown after a mouse over (over the buttons) - upper right side under the logo.

How can I make them visible all the time without mouse over?

; AutoIt Version: 3.0
; Language:       Multilanguage
; Platform:       WinXP
; Author:         Daniel Heinrich (Daniel.Heinrich@hella.com)
;
; Script Function:
;   Update Message for Lotus Notes

#include <GuiConstantsEx.au3>
#include <guimenu.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#Include <GuiButton.au3>

Opt("TrayIconHide", 1) 

$progdir = "c:\notes\"
$datadir = "c:\notes\data\"

;Prüft, ob Lotus Notes 8.5 bereits installiert ist.
If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes","Version") = "080500" Then
    MsgBox(64, "CA Software-Delivery", "Notes Basic Client 8.5 already installed", 60)
    ;Exit
EndIf


; GUI
$gui = GuiCreate("CA Software Delivery - Lotus Notes 8.5", 400, 400)

$menu = _GUICtrlMenu_GetSystemMenu($gui)
_GUICtrlMenu_EnableMenuItem($menu, $SC_CLOSE, 1, False)

GuiSetIcon(@ProgramFilesDir & "\CA\DSM\Bin\CAF.exe", 0)

; BUTTON
$Status = GuiCtrlCreateButton("Start Installation", 10, 360, 100, 30)




;Sprache auswählen
dim $English = GuiCtrlCreateButton("English", 310, 150, 30, 20, $BS_BITMAP )
GUICtrlSetImage (-1, "Englisch.bmp")

dim $German = GuiCtrlCreateButton("German", 340, 150, 30, 20, $BS_BITMAP )
GUICtrlSetImage (-1, "Germany.bmp")

dim $Spanish = GuiCtrlCreateButton("Spanish", 370, 150, 30, 20, $BS_BITMAP )
GUICtrlSetImage (-1, "Spanien.bmp")






; Countdown - Timer
$Timelabel = GUICtrlCreateLabel("Time left: ", 310, 360, 43, 17)
$Label1 = GUICtrlCreateLabel("59:59", 360, 360, 43, 17)

; PIC
GuiCtrlCreatePic("CA_Hella_logo.jpg",0,0, 400,150)
GuiCtrlSetColor(-1,0xffffff)

; Software Distribution Message
$infotxt = GUICtrlCreateLabel("Sehr geehrte Damen und Herren," & @crlf & @crlf & "mit dieser Meldung erhalten Sie das Softwarepaket Lotus Notes 8.5. Es ist erforderlich, dass Sie bevor Sie diese Meldung bestätigen, evtl. laufende Notes Sessions beenden. Sie haben 60 Minuten Zeit Lotus Notes zu schließen, um dann anschließend diese Meldung zu bestätigen. Sie werden nach Beendigung der Installation mit einer Meldung über die erfolgreiche Installation informiert" & @crlf & @crlf & "Bei Fragen stehen wir Ihnen gerne unter der -1600 zur Verfügung." & @crlf & @crlf & "Mit freundlichem Gruß"  & @crlf &  "IL UserSupport - 1600", 10, 150, 390, 200)




; GUI MESSAGE LOOP
GUISetState(@SW_SHOW)
$time = TimerInit()


$progdir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes","Path")
$datadir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes","DataPath")

$inifile = $datadir & "notes.ini"

If FileExists($inifile) Then
    $datadir = IniRead($inifile, "Notes", "Directory", $datadir)
Else
    $progdir = "c:\notes\"
    $datadir = "c:\notes\data\"
EndIf   


While 1

; Timer-Section
$nMsg = GUIGetMsg()
    Select 
        Case $nMsg = $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $Status
            GUICtrlSetData($Label1, "")
            GUICtrlSetData($Timelabel, "")
            GUICtrlSetState($Status,$GUI_DISABLE)
            $progressbar1 = GUICtrlCreateProgress (190,360,180,20)
            If FileExists("C:\Notes\nsd.exe") Then
                    GUICtrlSetData($infotxt, @crlf & @crlf & @crlf & @crlf & "Update in Progress - Please Wait!")
                    RunWait("C:\Notes\nsd.exe -kill -nolog -noinfo", "C:\Notes", @SW_HIDE) ;evtl ErrorCode abfangen!
                    $InfoLabel = GUICtrlCreateLabel("Starting Client Installation...", 190, 330, 200, 17)
                    GUICtrlSetData ($progressbar1,10)
                    RunWait(@ComSpec & " /c " & 'start /wait .\basic-client\setup.exe /s /v"/L*v c:\temp\install.log /qn PROGDIR=\"'&$progdir&'" DATADIR=\"'&$datadir&'" TRANSFORMS=hella.mst"', "", @SW_HIDE)
                    GUICtrlSetData($InfoLabel, "Installing Language-Packs...")
                    GUICtrlSetData ($progressbar1,50)
                    RunWait(@ComSpec & " /c " & 'start /wait .\mui-g1\setup.exe /s /v"/qn ADDLOCAL=German,Spanish INITIALUILANG=de"', "", @SW_HIDE)
                    GUICtrlSetData($InfoLabel, "Copy Dictionaries...")
                    GUICtrlSetData ($progressbar1,70)
                    RunWait(@ComSpec & " /c " & 'copy /Y .\dictionaries\*.dic c:\notes\data', "", @SW_HIDE)
                    GUICtrlSetData($InfoLabel, "Installation Complete")
                    GUICtrlSetData ($progressbar1,100)
                    RunWait(@ComSpec & " /c " & '.\bin\sendit.cmd c:\temp\install.log"', "", @SW_HIDE)
                    MsgBox(64, "CA Software-Delivery", "Update complete", 60)
                    exit
                Else
                    GUICtrlSetData($infotxt, @crlf & @crlf & @crlf & @crlf & "Installation in Progress - Please Wait!")
                    $InfoLabel = GUICtrlCreateLabel("Starting Client Installation...", 190, 330, 200, 17)
                    GUICtrlSetData ($progressbar1,10)
                    RunWait(@ComSpec & " /c " & 'start /wait .\basic-client\setup.exe /s /v"/L*v c:\temp\install.log /qn PROGDIR=\"'&$progdir&'" DATADIR=\"'&$datadir&'" TRANSFORMS=hella.mst"', "", @SW_HIDE)
                    GUICtrlSetData($InfoLabel, "Installing Language-Packs...")
                    GUICtrlSetData ($progressbar1,50)
                    RunWait(@ComSpec & " /c " & 'start /wait .\mui-g1\setup.exe /s /v"/qn ADDLOCAL=German,Spanish INITIALUILANG=de"', "", @SW_HIDE)
                    GUICtrlSetData($InfoLabel, "Copy Dictionaries...")
                    GUICtrlSetData ($progressbar1,70)
                    RunWait(@ComSpec & " /c " & 'copy /Y .\dictionaries\*.dic c:\notes\data', "", @SW_HIDE)
                    GUICtrlSetData($InfoLabel, "Installation Complete")
                    GUICtrlSetData ($progressbar1,100)
                    RunWait(@ComSpec & " /c " & '.\bin\sendit.cmd c:\temp\install.log"', "", @SW_HIDE)
                    MsgBox(64, "CA Software-Delivery", "Install complete", 60)
                    exit
            EndIf
    EndSelect
    $new = (60 * 60 * 1000) - TimerDiff($time)
    $seconds = Round($new / 1000)
    $newMin = Floor($seconds / 60)
    $newSec = Mod($seconds, 60)
    If $newSec < 10 Then $newSec = "0" & $newSec
    If ($newMin > 0 Or Number($newSec) > 0) Then 
        GUICtrlSetData($Label1, $newMin & ":" & $newSec)
    Else
        GUICtrlSetData($Label1, "0:00")
            GUICtrlSetData($Label1, "")
            GUICtrlSetData($Timelabel, "")
            GUICtrlSetState($Status,$GUI_DISABLE)
            $progressbar1 = GUICtrlCreateProgress (190,360,180,20)
            If FileExists("C:\Notes\nsd.exe") Then
                GUICtrlSetData($infotxt, @crlf & @crlf & @crlf & @crlf & "Update in Progress - Please Wait!")
                RunWait("C:\Notes\nsd.exe -kill -nolog -noinfo", "C:\Notes", @SW_HIDE) ;evtl ErrorCode abfangen!
                $InfoLabel = GUICtrlCreateLabel("Starting Client Installation...", 190, 330, 200, 17)
                GUICtrlSetData ($progressbar1,10)
                RunWait(@ComSpec & " /c " & 'start /wait .\basic-client\setup.exe /s /v"/L*v c:\temp\install.log /qn PROGDIR=\"'&$progdir&'" DATADIR=\"'&$datadir&'" TRANSFORMS=hella.mst"', "", @SW_HIDE)
                GUICtrlSetData($InfoLabel, "Installing Language-Packs...")
                GUICtrlSetData ($progressbar1,50)
                RunWait(@ComSpec & " /c " & 'start /wait .\mui-g1\setup.exe /s /v"/qn ADDLOCAL=German,Spanish INITIALUILANG=de"', "", @SW_HIDE)
                GUICtrlSetData($InfoLabel, "Copy Dictionaries...")
                GUICtrlSetData ($progressbar1,70)
                RunWait(@ComSpec & " /c " & 'copy /Y .\dictionaries\*.dic c:\notes\data', "", @SW_HIDE)
                GUICtrlSetData($InfoLabel, "Installation Complete")
                GUICtrlSetData ($progressbar1,100)
                RunWait(@ComSpec & " /c " & '.\bin\sendit.cmd c:\temp\install.log"', "", @SW_HIDE)
                MsgBox(64, "CA Software-Delivery", "Update complete", 60)
                exit
            Else
                GUICtrlSetData($infotxt, @crlf & @crlf & @crlf & @crlf & "Installation in Progress - Please Wait!")
                $InfoLabel = GUICtrlCreateLabel("Starting Client Installation...", 190, 330, 200, 17)
                GUICtrlSetData ($progressbar1,10)
                RunWait(@ComSpec & " /c " & 'start /wait .\basic-client\setup.exe /s /v"/L*v c:\temp\install.log /qn PROGDIR=\"'&$progdir&'" DATADIR=\"'&$datadir&'" TRANSFORMS=hella.mst"', "", @SW_HIDE)
                GUICtrlSetData($InfoLabel, "Installing Language-Packs...")
                GUICtrlSetData ($progressbar1,50)
                RunWait(@ComSpec & " /c " & 'start /wait .\mui-g1\setup.exe /s /v"/qn ADDLOCAL=German,Spanish INITIALUILANG=de"', "", @SW_HIDE)
                GUICtrlSetData($InfoLabel, "Copy Dictionaries...")
                GUICtrlSetData ($progressbar1,70)
                RunWait(@ComSpec & " /c " & 'copy /Y .\dictionaries\*.dic c:\notes\data', "", @SW_HIDE)
                GUICtrlSetData($InfoLabel, "Installation Complete")
                GUICtrlSetData ($progressbar1,100)
                RunWait(@ComSpec & " /c " & '.\bin\sendit.cmd c:\temp\install.log"', "", @SW_HIDE)
                MsgBox(64, "CA Software-Delivery", "Install complete", 60)
                exit
            EndIf
    EndIf
WEnd

Share this post


Link to post
Share on other sites
Authenticity

It's because the label with the long text is upon these buttons. Move the buttons upward or lower the label a little bit.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.