1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. MoveJockey

Beiträge von MoveJockey

  • .reg Datei/en hinzufügen

    • MoveJockey
    • 28. August 2017 um 12:48

    Hello,

    meine unattended Installation soll auch noch .reg Dateien "öffnen" bzw. hinzufügen können. Ich habe es schon mit Run & ShellExecute versucht, jedoch ohne Erfolg.

    So sieht mein Ansatz aus:

    ShellExecute("regedit.exe", "/s /PFAD")

    Vlt kennt sich ja jemand aus :thumbup:

  • Unattended Install If Schleife

    • MoveJockey
    • 28. August 2017 um 10:05

    ..

  • Loading screen einbinden

    • MoveJockey
    • 23. August 2017 um 09:34

    Hallo :)

    ich bin derzeit dabei ein GUI für eine unattended Install anzufertigen. Ein Loading Screen, bevor das Script/GUI lädt wäre natürlich besonders schick. Es wurde mit dem Koda Form Designer erstellt und enthält eigentlich nur Run & Controlclick Befehle. Ich habe in diesem Thread passende Loading Screens gefunden:

    GDI+ Animated Loading / Waiting Screens mit 32 Beispielen (Stand: 2014-05-06)

    Der ausgewählte Code:

    Code
    ;coded by UEZ build 2013-05-29, idea taken from http://www.alessioatzeni.com/wp-content/tutorials/html-css/CSS3-Loading-Animation/index.html;AutoIt v3.3.9.21 or higher needed!#include <WindowsConstants.au3>#include <GUIConstantsEx.au3>#include <Memory.au3>#include <GDIPlus.au3>#include <WindowsConstants.au3>
    
    
    Global Const $hDwmApiDll = DllOpen("dwmapi.dll")Global $sChkAero = DllStructCreate("int;")DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))Global $bAero = DllStructGetData($sChkAero, 1)Global $fStep = 0.02If Not $bAero Then $fStep = 1.25
    
    
    _GDIPlus_Startup()Global Const $STM_SETIMAGE = 0x0172; $IMAGE_BITMAP = 0Global $iW = 300, $iH = 120Global Const $hGUI = GUICreate("Increasing Balls", $iW, $iH, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST)GUISetBkColor(0)Global Const $iPic = GUICtrlCreatePic("", 0, 0, $iW, $iH)GUICtrlSetState(-1, $GUI_DISABLE)WinSetTrans($hGUI, "", 0)GUISetState()Global $hHBmp_BG, $hB, $iSleep = 20GUIRegisterMsg($WM_TIMER, "PlayAnim")DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0)
    
    
    Global $z, $iPercFor $z = 1 To 255 Step $fStep    WinSetTrans($hGUI, "", $z)Next
    
    
    Do    Switch GUIGetMsg()        Case $GUI_EVENT_CLOSE            GUIRegisterMsg($WM_TIMER, "")            _WinAPI_DeleteObject($hHBmp_BG)            _GDIPlus_Shutdown()            GUIDelete()            Exit    EndSwitchUntil False
    
    
    Func PlayAnim()    $hHBmp_BG = _GDIPlus_IncreasingBalls($iW, $iH, $iPerc, "Please wait..." & StringFormat("%05.2f %", Min($iPerc, 100)))    $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG)    If $hB Then _WinAPI_DeleteObject($hB)    _WinAPI_DeleteObject($hHBmp_BG)    $iPerc += 0.5    If $iPerc > 110 Then $iPerc = 0EndFunc   ;==>PlayAnim
    
    
    Func _GDIPlus_IncreasingBalls($iW, $iH, $iPerc, $sString = "Please wait...", $iRadius = 12, $iBalls = 5, $bHBitmap = True)    Local Const $iDiameter = $iRadius * 2
    
    
        Local $tPointF1 = DllStructCreate("float;float")    Local $pPointF1 = DllStructGetPtr($tPointF1)    Local $tPointF2 = DllStructCreate("float;float")    Local $pPointF2 = DllStructGetPtr($tPointF2)    DllStructSetData($tPointF1, 1, $iDiameter)    DllStructSetData($tPointF1, 2, 0)    DllStructSetData($tPointF2, 1, $iDiameter)    DllStructSetData($tPointF2, 2, $iDiameter)    Local $hBrushBall2 = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", 0xFF2287E7, "uint", 0xFF9BE6FE, "int", 1, "int*", 0)    $hBrushBall2 = $hBrushBall2[6]
    
    
        Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
    
    
        Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
    
    
        Local Const $hBmp_BG = _GDIPlus_BitmapCreateFromMemory(_Background())    Local $hBrushTexture = _GDIPlus_TextureCreate($hBmp_BG)    _GDIPlus_BitmapDispose($hBmp_BG)    _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iW, $iH, $hBrushTexture)
    
    
        Local Const $hBrushBall1 = _GDIPlus_BrushCreateSolid(0xFF040404)
    
    
        Local Const $fFontSize = 11, $iSize = 10 * $iRadius + 2 * $iBalls * $iRadius    Local $aPos[$iBalls + 2][4], $iArrayPos, $j = 1    Local Static $aCircle[$iBalls + 1]    For $i = 0 To $iBalls - 1        $aPos[($iBalls - 1) - $i][0] = ($iW / 2) - (($iDiameter + $iRadius) * ($i + 1)) + (($iBalls - 1) / 2 * ($iDiameter + $iRadius)) + $iDiameter        $aPos[($iBalls - 1) - $i][1] = ($iH - $iRadius) / 2        _GDIPlus_GraphicsFillEllipse($hCtxt, $aPos[($iBalls - 1) - $i][0], $aPos[($iBalls - 1) - $i][1], $iDiameter, $iDiameter, $hBrushBall1) ;draw background        $aPos[($iBalls - 1) - $i][2] = 100 / $iBalls        $iArrayPos = Int($iPerc / ($aPos[($iBalls - 1) - $i][2]))        $aPos[$iArrayPos][3] = ($iPerc - ($iArrayPos * ($aPos[($iBalls - 1) - $i][2]))) / $aPos[($iBalls - 1) - $i][2]        If $iArrayPos > 0 Then            For $j = 0 To $iArrayPos - 1                $aPos[$j][3] = 1            Next        EndIf    Next
    
    
        Local $fMax = 2, $hPen = _GDIPlus_PenCreate(0, 2)    For $i = 0 To $iBalls - 1        _GDIPlus_PenSetColor($hPen, 0x1000000 * Int(BitAND(BitShift(0xFF000000, 24), 0xFF) * ($fMax - $aCircle[$i])) + 0x2287E7)        _GDIPlus_GraphicsFillEllipse($hCtxt, $iRadius + $aPos[$i][0] - $iRadius * $aPos[$i][3], $iRadius + $aPos[$i][1] - $iRadius * $aPos[$i][3], $iDiameter * $aPos[$i][3], $iDiameter * $aPos[$i][3], $hBrushBall2)        If $aPos[$i][3] = 1 And $aCircle[$i] < $fMax Then ;draw balls according to percent            _GDIPlus_GraphicsDrawEllipse($hCtxt, $iRadius + $aPos[$i][0] - $iRadius * (1 + $aCircle[$i]), $iRadius + $aPos[$i][1] - $iRadius * (1 + $aCircle[$i]), $iDiameter * (1 + $aCircle[$i]), $iDiameter * (1 + $aCircle[$i]), $hPen)            $aCircle[$i] += 0.1        EndIf    Next
    
    
        If Not $iPerc Then        For $i = 0 To $iBalls - 1            $aCircle[$i] = 0        Next    EndIf
    
    
        Local Const $hFormat = _GDIPlus_StringFormatCreate()    Local Const $hFamily = _GDIPlus_FontFamilyCreate("Arial")    Local Const $hFont = _GDIPlus_FontCreate($hFamily, $fFontSize, 2)    Local Const $hBrushTxt = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)    Local Const $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)    Local Const $aInfo = _GDIPlus_GraphicsMeasureString($hCtxt, $sString, $hFont, $tLayout, $hFormat)    DllStructSetData($tLayout, "X", ($iW - DllStructGetData($aInfo[0], "Width")) / 2)    DllStructSetData($tLayout, "Y", $iH - $iH / 4)    _GDIPlus_GraphicsDrawStringEx($hCtxt, $sString, $hFont, $tLayout, $hFormat, $hBrushTxt)
    
    
        _GDIPlus_FontDispose($hFont)    _GDIPlus_FontFamilyDispose($hFamily)    _GDIPlus_StringFormatDispose($hFormat)    _GDIPlus_BrushDispose($hBrushTxt)    _GDIPlus_BrushDispose($hBrushTexture)
    
    
        _GDIPlus_GraphicsDispose($hCtxt)    _GDIPlus_BrushDispose($hBrushBall1)    _GDIPlus_BrushDispose($hBrushBall2)    _GDIPlus_PenDispose($hPen)
    
    
        If $bHBitmap Then        Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)        _GDIPlus_BitmapDispose($hBitmap)        Return $hHBITMAP    EndIf    Return $hBitmapEndFunc   ;==>_GDIPlus_IncreasingBalls
    
    
    Func Min($a, $b)    If $a < $b Then Return $a    Return $bEndFunc   ;==>Min
    
    
    ;Code below was generated by: 'File to Base64 String' Code Generator v1.12 Build 2013-03-27
    
    
    Func _Background($bSaveBinary = False, $sSavePath = @ScriptDir)    Local $Background    $Background &= 'iVBORw0KGgoAAAANSUhEUgAAAAQAAAAEAgMAAADUn3btAAAADFBMVEUaGhoTExMqKiofHx8rvcjDAAAAGUlEQVR4XgXAgRAAAAwCwNeY0+RyCqwTdX4IagG79dgjpgAAAABJRU5ErkJggg=='    Local $bString = Binary(_Base64Decode($Background))    If $bSaveBinary Then        Local $hFile = FileOpen($sSavePath & "\stressed_linen.jpg", 18)        FileWrite($hFile, $bString)        FileClose($hFile)    EndIf    Return $bStringEndFunc   ;==>_Background
    
    
    Func _Base64Decode($sB64String)    Local $a_Call = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0)    If @error Or Not $a_Call[0] Then Return SetError(1, 0, "")    Local $a = DllStructCreate("byte[" & $a_Call[5] & "]")    $a_Call = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $a, "dword*", $a_Call[5], "ptr", 0, "ptr", 0)    If @error Or Not $a_Call[0] Then Return SetError(2, 0, "")    Return DllStructGetData($a, 1)EndFunc   ;==>_Base64Decode
    Alles anzeigen

    Die Frage ist nun, an welcher Stelle mein GUI/Script platziert werden soll.
    Bin noch absoluter Anfänger in AutoIT :part:

  • Zwei Inputboxen (User & Password) senden

    • MoveJockey
    • 15. August 2017 um 10:39

    Die Threaderstellung wurde eher erledigt, und mit deiner Hilfe mein Problem :)

  • Zwei Inputboxen (User & Password) senden

    • MoveJockey
    • 15. August 2017 um 09:58

    Hallo,

    ich bin gerade bei meinen ersten Schritten bezüglich Autoit. Es handelt sich um eine Autoinstall von einem Programm (mit Mouseclick etc.). Ich möchte, bevor das Script läuft, gerne zwei Inputboxen erzeugen, wo man dann den Usernamen und Password, welcher per Send($xx) an entsprechender Stelle eingetragen wird. Leider funktioniert das nur mit einer Inputbox. Wie bekomme ich die andere ans laufen?

    LG

    Code
    $pcname = InputBox("TeamViewer Einrichtung","Bitte geben Sie den PC-Namen ein, den Sie einrichten möchten:", "")
    $tvpass = InputBox("TeamViewer Einrichtung","Bitte geben Sie das Passwort für den unbeaufsichtigen Zugriff ein:", "")
    
    
    Run ("\TeamViewer\TeamViewer_Setup.exe")
    AutoItSetOption("MouseCoordMode", 0)
    
    
    WinWait("Installation von TeamViewer 11")
    WinActivate("Installation von TeamViewer 11")
    MouseClick("left", 364, 364, 1, 0)
    sleep(300)
    MouseClick("left", 40, 158, 1, 0)
    sleep(300)
    MouseClick("left", 362, 362, 1, 0)
    sleep(300)
    MouseClick("left", 35, 289, 1, 0)
    sleep(300)
    MouseClick("left", 362, 362, 1, 0)
    WinWait("Unbeaufsichtigter Zugriff")
    WinActivate("Unbeaufsichtigter Zugriff")
    MouseClick("left", 305, 402, 1, 0)
    sleep(300)
    ControlSend("", "", "", $pcname)
    Send("{TAB}")
    Send($pass)
    Send("{TAB}")
    ControlSend("", "", "", $tvpass)
    sleep(300)
    MouseClick("left", 305, 402, 1, 0)
    sleep(300)
    MouseClick("left", 305, 402, 1, 0)
    WinWait("Kontozugehörigkeit")
    WinActivate("Kontozugehörigkeit")
    MouseClick("left", 164, 314, 1, 0)
    WinWait("Support")
    WinActivate("Support")
    MouseClick("left", 433, 334, 1, 0)
    Alles anzeigen

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™