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. $var

Beiträge von $var

  • Text automatisch vergrößern

    • $var
    • 20. November 2012 um 18:45

    Hier ein Beispiel. Schaut aber nicht schön aus, finde ich...

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)
    Opt('GUIOnEventMode', 1)
    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $i_WIDTH = 400, $i_HEIGHT = 300
    Global $h_GUI, $h_Graphic

    [/autoit] [autoit][/autoit] [autoit]

    $h_GUI = GUICreate('', $i_WIDTH, $i_HEIGHT)
    $h_Graphic = _GDIPlus_GraphicsCreateFromHWND($h_GUI)
    GUISetOnEvent(-3, '_Exit', $h_GUI)
    GUISetState(@SW_SHOW, $h_GUI)

    [/autoit] [autoit][/autoit] [autoit]

    While True
    For $i = 10 To 70
    _GDIPlus_GraphicsClear($h_Graphic, 0xFFFFFFFF)
    _GDIPlus_GraphicsDrawStringCustom($h_Graphic, '$var', $i_WIDTH / 2, 100, $i, 0xFF000000, 1, 0, 'Tahoma')
    Sleep(50)
    Next
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    _GDIPlus_GraphicsDispose($h_Graphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ===================================================================
    ; Name ..........: _GDIPlus_GraphicsDrawStringCustom
    ; Description ...: Draw a customized string
    ; AutoIt Version : v3.3.6.1
    ; Syntax ........: _GDIPlus_GraphicsDrawStringCustom ($h_Graphics, $s_String, $n_X, $n_Y, $n_Size, $b_Color[, $i_Align = 0[, $i_Weight = 0[, $s_Font = 'Arial']]])
    ; Parameter(s): .: $h_Graphics - Handle to a Graphics object
    ; $s_String - String to be drawn
    ; $n_X - X coordinate where the string will be drawn
    ; $n_Y - Y coordinate where the string will be drawn
    ; $n_Size - Font size to use for drawing
    ; $b_Color - Alpha, Red, Green and Blue components
    ; $i_Align - The alignment can be one of the following:
    ; |0 - The text is aligned to the left
    ; |1 - The text is centered
    ; |2 - The text is aligned to the right
    ; $i_Weight - The style of the typeface. Can be a combination of the following:
    ; |0 - Normal weight or thickness of the typeface
    ; |1 - Bold typeface
    ; |2 - Italic typeface
    ; |4 - Underline
    ; |8 - Strikethrough
    ; $s_Font - Name of the Font Family
    ; Return Value ..: Success - True
    ; Failure - False
    ; Author(s) .....: $var
    ; ==============================================================================
    Func _GDIPlus_GraphicsDrawStringCustom ($h_Graphics, $s_String, $n_X, $n_Y, $n_Size, $b_Color, $i_Align = 0, $i_Weight = 0, $s_Font = 'Arial')
    Local $a_CreateSolidFill, $a_CreateStringFormat, $a_CreateFontFamilyFromName, $a_CreateFont, $t_Struct, $p_Layout, $a_Return
    $a_CreateSolidFill = DllCall ($ghGDIPDll, 'int', 'GdipCreateSolidFill', 'int', $b_Color, 'dword*', 0)
    $a_CreateStringFormat = DllCall ($ghGDIPDll, 'int', 'GdipCreateStringFormat', 'int', 0, 'word', 0, 'ptr*', 0)
    $a_CreateFontFamilyFromName = DllCall ($ghGDIPDll, 'int', 'GdipCreateFontFamilyFromName', 'wstr', $s_Font, 'ptr', 0, 'handle*', 0)
    $a_CreateFont = DllCall ($ghGDIPDll, 'int', 'GdipCreateFont', 'handle', $a_CreateFontFamilyFromName[3], 'float', $n_Size, 'int', $i_Weight, 'int', 3, 'ptr*', 0)
    $t_Struct = DllStructCreate ($tagGDIPRECTF)
    $p_Layout = DllStructGetPtr ($t_Struct)
    DllStructSetData ($t_Struct, 'X', $n_X)
    DllStructSetData ($t_Struct, 'Y', $n_Y)
    DllStructSetData ($t_Struct, 'Width', 0)
    DllStructSetData ($t_Struct, 'Height', 0)
    DllCall ($ghGDIPDll, 'int', 'GdipSetStringFormatAlign', 'handle', $a_CreateStringFormat[3], 'int', $i_Align)
    $a_Return = DllCall ($ghGDIPDll, 'int', 'GdipDrawString', 'handle', $h_Graphics, 'wstr', $s_String, 'int', -1, 'handle', $a_CreateFont[5], _
    'ptr', $p_Layout, 'handle', $a_CreateStringFormat[3], 'handle', $a_CreateSolidFill[2])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteFont', 'handle', $a_CreateFont[5])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteFontFamily', 'handle', $a_CreateFontFamilyFromName[3])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteStringFormat', 'handle', $a_CreateStringFormat[3])
    DllCall ($ghGDIPDll, 'int', 'GdipDeleteBrush', 'handle', $a_CreateSolidFill[2])
    Return $a_Return[0] = 0
    EndFunc ;==> _GDIPlus_GraphicsDrawStringCustom

    [/autoit]

    Die Funktion in Zeile 18 kann natürlich auch durch die standard-Func _GDIPlus_GraphicsDrawString ersetzt werden.

  • OK-Click falls Fenster erscheint

    • $var
    • 14. November 2012 um 17:31

    Beispiel:

    Spoiler anzeigen
    [autoit]

    Global Const $s_Title = 'Aut2Exe v3 - AutoIt Script to EXE Converter'

    [/autoit] [autoit][/autoit] [autoit]

    While Not WinExists($s_Title)
    Sleep(5000)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ControlClick($s_Title, '', 1021)

    [/autoit]

    Das Prog checkt alle fünf Sekunden, ob ein Fenster mit dem Titel Aut2Exe v3 - AutoIt Script to EXE Converter (Aut2exe.exe) existiert.
    Falls ja, wird auf den Browse-Button (Control-ID: 1021) geklickt.

    Den exakten Titel und die benötigte Control-ID kannst du mit dem AutoIt Window Info-Tool herausfinden und dementsprechend im Script ersetzen.

  • Bilder vergleich

    • $var
    • 12. November 2012 um 12:27

    Mein Fehler. Zeile 5 sollte so aussehen:

    [autoit]

    Global Const $a_Img = _FileListToArray($s_Path, '*', 1)

    [/autoit]
  • Bilder vergleich

    • $var
    • 12. November 2012 um 11:45

    Mal so auf die Schnelle getippt... Nicht getestet.

    Spoiler anzeigen
    [autoit]

    #include <ImageSearch.au3>
    #include <File.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global Const $s_Path = @ScriptDir & '\Images' ; Pfad zu dem Ordner mit den 100 Grafiken. Ohne Backslash!
    Global Const $a_Img = _FileListToArray($s_Path, '', 1)
    Global $i_X, $i_Y, $f = False

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To $a_Img[0]
    If _ImageSearchArea($s_Path & '\' & $a_Img[$i], 1, 979, 315, 1018, 339, $i_X, $i_Y, 30) Then
    MsgBox(64, 'Die Grafik wurde gefunden', $s_Path & '\' & $a_Img[$i])
    $f = True
    ExitLoop
    EndIf
    Next
    If Not $f Then MsgBox(16, '', 'Es wurde keine Grafik gefunden.')

    [/autoit]
  • Script reagiert zu langsam

    • $var
    • 9. November 2012 um 19:46

    Funktioniert bei mir wunderbar und ohne irgendwelche Verzögerungen:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Local $Button1
    Local $Button2
    Local $Input1
    Local $Input2
    Local $Input3
    Local $passwort1
    Local $passwort2

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 239, 65, 491, 237)
    $Input1 = GUICtrlCreateInput("", 8, 8, 137, 21, $ES_PASSWORD)
    $Input2 = GUICtrlCreateInput("", 8, 32, 137, 21, $ES_PASSWORD)
    $Input3 = GUICtrlCreateInput("", 8, 32, 137, 21, $ES_PASSWORD)
    GUICtrlSetState(-1, $GUI_HIDE)
    $Button1 = GUICtrlCreateButton("Setzen", 152, 32, 75, 25)
    $Button2 = GUICtrlCreateButton("Eingabe", 152, 32, 75, 25)
    GUICtrlSetState(-1, $GUI_HIDE)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button1
    pwsetzen()

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button2
    pweingabe()

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    process()
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func process()
    If ProcessExists("taskmgr.exe") Then
    ProcessClose("taskmgr.exe")
    Sleep(50)
    WinActivate("Form1")
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func pwsetzen()
    $passwort1 = GUICtrlRead($Input1)
    $Passwort2 = GUICtrlRead($Input2)
    If $passwort1 = $passwort2 Then
    _desktopkill()
    GUICtrlSetState($Input1, $GUI_HIDE)
    GUICtrlSetState($Input2, $GUI_HIDE)
    GUICtrlSetState($Button1, $GUI_HIDE)
    GUICtrlSetState($Input3, $GUI_SHOW)
    GUICtrlSetState($Button2, $GUI_SHOW)
    Else
    MsgBox(0, "falsches Passwort","Die Passwörter stimmen nicht überein, bitte setzen Sie ein neues Passwort!")
    GUICtrlSetData($Input1, "")
    GUICtrlSetData($Input2, "")
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func pweingabe()
    If GUICtrlRead($Input3) = $passwort2 Then
    MsgBox(0,"Richtig","Das war das richtige Passwort!")
    _desktopshow()
    Else
    MsgBox(0,"Falsch","Das war das falsche Passwort!")
    GUICtrlSetData($Input3, "")
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _desktopkill()
    Opt('WINTITLEMATCHMODE', 4)
    ControlHide('classname=Shell_TrayWnd', '', '')
    ControlHide('classname=Progman', '', '')
    winsetstate("Start", "", @SW_HIDE)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _desktopshow()
    Opt('WINTITLEMATCHMODE', 4)
    ControlShow('classname=Shell_TrayWnd', '', '')
    ControlShow('classname=Progman', '', '')
    winsetstate("Start", "", @SW_SHOW)
    EndFunc

    [/autoit]
  • Script reagiert zu langsam

    • $var
    • 9. November 2012 um 19:32

    Das Sleep(50) und WinActivate("Form1") in die If-Bedingung packen, oder ganz entfernen. Das meine ich. ;)

  • Script reagiert zu langsam

    • $var
    • 9. November 2012 um 19:25

    Schau dir mal die Funktion process an...

  • GUI im Hintergrund nach Inputbox

    • $var
    • 6. November 2012 um 11:55
    [autoit]

    Case $scan
    GUISetState(@SW_DISABLE, $GUI)
    GUIctrlsetdata($inputfeld,InputBox("Scan", "Bitte das Testhilfsmittel jetzt scannen!"))
    GUISetState(@SW_ENABLE, $GUI)
    WinActivate($GUI); <!--

    [/autoit]

    Das sollte die GUI wieder in den Vordergrund bringen...

  • Zeilenumbruch bei bestimmter Zeichenfolge im String hinzufügen

    • $var
    • 31. Oktober 2012 um 14:34
    [autoit]

    Global $s_Result, $s_String = '"TH03","hier","LabIng"," -","Textth0003""TH04","Testprogramm""""","blah","na sowas0004.pdf","http//pics/th0004.jpg""TH05","klack,"LabIng","asdh","lksajf äa"'
    $s_Result = StringReplace($s_String, '"TH', @LF & '"TH')
    MsgBox(0, '', $s_Result)

    [/autoit]

    Hm? ^^

  • Zufällig Farben Generieren lassen?

    • $var
    • 15. Oktober 2012 um 21:43
    [autoit]

    Global $a_Farben[8] = ['rot', 'grün', 'blau', 'gelb', 'schwarz', 'weiß', 'lila', 'pink']

    [/autoit][autoit][/autoit][autoit]

    While MsgBox(1, '', $a_Farben[Random(0, 7, 1)]) = 1
    WEnd

    [/autoit]

    So etwas? oO

  • Zufällig Farben Generieren lassen?

    • $var
    • 15. Oktober 2012 um 21:10

    Von mir auch noch etwas... :)

    Spoiler anzeigen
    [autoit]

    GUICreate('')
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    GUISetBkColor(_RandomColor())
    Global $i_Timer = TimerInit()

    [/autoit] [autoit][/autoit] [autoit]

    While GUIGetMsg() <> -3
    If TimerDiff($i_Timer) >= 2000 Then
    GUISetBkColor(_RandomColor())
    $i_Timer = TimerInit()
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _RandomColor()
    Return '0x' & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndFunc

    [/autoit]
  • Autoit if Fehler

    • $var
    • 13. Oktober 2012 um 23:52

    Ja, jetzt schreiben wir hier genau dasselbe.

    Vielleicht meldet sich hier ja noch jemand, der mehr dazu sagen kann. Bis dahin sehe ich es als Fehler an. :P

  • Autoit if Fehler

    • $var
    • 13. Oktober 2012 um 23:48

    Vergleiche mit "==" stimmen soweit. Aber darum geht es nicht.

    Wenn ein String hinreichend 0 entspricht und 0=False ist, dann müsste der Vergleich eines Strings mit False True ergeben.
    Ein String ist also gleichzeitig True und 0. Aber True <> 0...

    Die Logik verstehe ich nicht.


    Ich will jetzt wirklich keinem auf die Nerven gehen - finde es nur interessant.

  • Autoit if Fehler

    • $var
    • 13. Oktober 2012 um 23:31

    Das hast du jetzt aber schnell wegeditiert... :P

    Zitat von minx

    Da 'ajugdaid' nicht True ist

    Ist es doch.

    [autoit]

    MsgBox(0, '', True = 'string') ; True

    [/autoit]


    Allgemein verstehe ich es zwar (glaube ich), aber in diesem Fall ergibt es gar keinen Sinn:

    [autoit]

    MsgBox(0, '', 0 = False) ; True

    [/autoit][autoit][/autoit][autoit]

    MsgBox(0, '', 0 = 'string') ; True
    MsgBox(0, '', False = 'string') ; False

    [/autoit]

    Im Endeffekt hat man dann ein (un)logisches True = False.

  • Autoit if Fehler

    • $var
    • 13. Oktober 2012 um 23:18
    Zitat von minx

    0 ist falsch
    "ajugdaid" ist ebenfalls falsch

    ALLES was ncith True ist (oder 1) ist nicht wahr

    Sollte ein Vergleich mit False dann nicht ebenfalls True sein?

    [autoit]

    MsgBox(0, '', 0 = 'ajugdaid') ; True
    MsgBox(0, '', False = 'ajugdaid') ; False

    [/autoit]

    Ist er irgendwie nicht...

  • Server Client, ExistVerbindung?

    • $var
    • 10. Oktober 2012 um 22:24

    Wenn du ein Array verwendest, kannst du 'beliebig' viele Clients connecten lassen.
    Der Umgang damit erfordert aber etwas Erfahrung und natürlich logisches Denken. ;)

  • Server Client, ExistVerbindung?

    • $var
    • 10. Oktober 2012 um 22:15

    Du musst immer @error nach TCPSend und TCPRecv prüfen.
    Ist dieser nicht 0, wurde der Client oder Server beendet bzw. ist aus irgendeinem Grund nicht erreichbar.

    Clientside müsstest du dann mit TCPConnect einen neuen Verbindungsversuch machen. Vom Server aus, TCPAccept...

  • Gui_Event_Close mit mehreren GUIs

    • $var
    • 9. Oktober 2012 um 22:32
    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $h_GUI, $h_Child, $a_Msg

    [/autoit] [autoit][/autoit] [autoit]

    $h_GUI = GUICreate('parent', 400, 300)
    $h_Child = GUICreate('child', 300, 200, -1, -1, Default, Default, $h_GUI)
    GUISetState(@SW_SHOW, $h_GUI)
    GUISetState(@SW_SHOW, $h_Child)

    [/autoit] [autoit][/autoit] [autoit]

    While True
    $a_Msg = GUIGetMsg(1) ; <!--
    Switch $a_Msg[0]
    Case $GUI_EVENT_CLOSE
    Switch $a_Msg[1]
    Case $h_GUI
    Exit
    Case $h_Child
    GUIDelete($h_Child)
    EndSwitch
    EndSwitch
    WEnd

    [/autoit]
  • Gui vergrößern

    • $var
    • 8. Oktober 2012 um 22:54

    Stimmt. Ich komme auch auf unschöne 12%.
    Ein kleines Sleep in der Schleife hilft da natürlich aus:

    Spoiler anzeigen
    [autoit]

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

    [/autoit] [autoit][/autoit] [autoit]

    Opt('GUIOnEventMode', 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $f = True
    $Form1 = GUICreate("Form1", 335, 270, -1, -1,$WS_EX_TOOLWINDOW)
    $Group1 = GUICtrlCreateGroup("details", 8, 248, 313, 201)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Edit1 = GUICtrlCreateEdit("", 16, 272, 297, 169, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
    GUICtrlSetData(-1, "Edit1")
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("altes zeug", 8, 48, 313, 121)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Edit2 = GUICtrlCreateEdit("", 16, 72, 297, 89, BitOR($ES_READONLY,$WS_VSCROLL))
    GUICtrlSetData(-1, StringFormat("-> test"))
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Label1 = GUICtrlCreateLabel("Testlabel", 8, 16, 319, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Button1 = GUICtrlCreateButton("v v v v details anzeigen v v v v", 8, 216, 313, 17)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Button2 = GUICtrlCreateButton("Schließen", 128, 176, 75, 25, $BS_DEFPUSHBUTTON)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')
    GUICtrlSetOnEvent($Button2, '_Exit')
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While Sleep(250)
    If $f And _MouseOver() Then
    Local $size = WinGetPos($Form1)
    GUICtrlSetData($Button1, "^ ^ ^ ^ details schließen ^ ^ ^ ^")
    For $i = 270 To 490 Step 5
    WinMove($Form1, "", $size[0], $size[1], 335, $i) ;490 / 270
    Sleep(1)
    Next
    $f = Not $f
    ElseIf Not $f And Not _MouseOver() Then
    Local $size = WinGetPos($Form1)
    GUICtrlSetData($Button1, "v v v v details anzeigen v v v v")
    For $i = 490 To 270 Step - 5
    WinMove($Form1, "", $size[0], $size[1], 335, $i) ;490 / 270
    Sleep(1)
    Next
    $f = Not $f
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _MouseOver()
    Local $aInfo = GUIGetCursorInfo($Form1)
    Return $aInfo[4] = $Button1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc

    [/autoit]

    Habe übrigens noch das "[active]" durch $Form1 ersetzt, da es sonst zu Fehlern führen würde...

  • Gui vergrößern

    • $var
    • 8. Oktober 2012 um 22:40
    Spoiler anzeigen
    [autoit]

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

    [/autoit] [autoit][/autoit] [autoit]

    Opt('GUIOnEventMode', 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $f = True
    $Form1 = GUICreate("Form1", 335, 270, -1, -1,$WS_EX_TOOLWINDOW)
    $Group1 = GUICtrlCreateGroup("details", 8, 248, 313, 201)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Edit1 = GUICtrlCreateEdit("", 16, 272, 297, 169, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
    GUICtrlSetData(-1, "Edit1")
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("altes zeug", 8, 48, 313, 121)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Edit2 = GUICtrlCreateEdit("", 16, 72, 297, 89, BitOR($ES_READONLY,$WS_VSCROLL))
    GUICtrlSetData(-1, StringFormat("-> test"))
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Label1 = GUICtrlCreateLabel("Testlabel", 8, 16, 319, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Button1 = GUICtrlCreateButton("v v v v details anzeigen v v v v", 8, 216, 313, 17)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
    $Button2 = GUICtrlCreateButton("Schließen", 128, 176, 75, 25, $BS_DEFPUSHBUTTON)
    GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')
    GUICtrlSetOnEvent($Button2, '_Exit')
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    If $f And _MouseOver() Then
    Local $size = WinGetPos("[active]")
    GUICtrlSetData($Button1, "^ ^ ^ ^ details schließen ^ ^ ^ ^")
    For $i = 270 To 490 Step 5
    WinMove($Form1, "", $size[0], $size[1], 335, $i) ;490 / 270
    Sleep(1)
    Next
    $f = Not $f
    ElseIf Not $f And Not _MouseOver() Then
    Local $size = WinGetPos("[active]")
    GUICtrlSetData($Button1, "v v v v details anzeigen v v v v")
    For $i = 490 To 270 Step - 5
    WinMove($Form1, "", $size[0], $size[1], 335, $i) ;490 / 270
    Sleep(1)
    Next
    $f = Not $f
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _MouseOver()
    Local $aInfo = GUIGetCursorInfo($Form1)
    Return $aInfo[4] = $Button1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc

    [/autoit]

    Öffnet sich, wenn du über den Anzeigen-Button fährst.
    Sieht beim Schließen aber ziemlich komisch aus... Vielleicht hat hier ja jemand eine Idee dazu.

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™