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. funkey

Beiträge von funkey

  • AutoIt in C++ Umgebung

    • funkey
    • 17. Dezember 2009 um 09:21

    Du meinst sowas wie FileInstall für C++. Sicherlich möglich glaube ich, aber keine ahnung wie. Hab sowas auch meines Wissens noch nicht gesehen, kann natürlch aber auch sein, dass man das gar nicht mitbekommt.

  • Prozesse Kontrollieren

    • funkey
    • 17. Dezember 2009 um 09:06
    Zitat von Hotrod_Todd

    Nun würd ich dieses Thema gerne Schließen, aber find nix wie`s geht.

    Einfach den ersten Beitrag editieren und auf gelöst stellen. ;)

  • Hallöchen!

    • funkey
    • 17. Dezember 2009 um 08:09

    Herlich willkommen im besten Forum der Welt. :rofl:

    Bist ja reichlich spät dran um dich hier vorzustellen, über 700 Posts und wir wussten noch nicht einmal mit wem wir es zu tun haben. :P
    BTW: Von mir existiert auch noch kein Thread in diesem Unterforum, ich denke aber, das werde ich jetzt nicht mehr nachholen. ;)

    Was mich absolut stört/nervt sind:
    - Raucher :rolleyes:

    Deswegen auch ein :thumbup: von mir! :D


    Mach hier weiter so wie bisher und such dir endlich mal einen Job!!

  • Wird es eine neue Autoit Final Version zu Weihnachten geben ?

    • funkey
    • 17. Dezember 2009 um 07:59

    Ich glaube, dass weiß noch niemand so genau. Ich könnte mir aber vorstellen, dass sie es versuchen, da es in letzter Zeit eine ziemliche Häufung von neuen Beta-Versionen gegeben hat. Sie wollen aber sicher keine verbugte Stable-Version in Umlauf bringen (so wie Version 3.2.12.0), um dann 3 Tabe danach noch einmal eine neue Stable-Version zu kompilieren.
    Hoffen wir das beste, ich freu mich vor allem auf die neuen Adlib-Funktionen.

  • Buttons mit Icon und Label

    • funkey
    • 16. Dezember 2009 um 19:01

    Ich danke euch für das Lob!
    Hab noch mal ein paar Parameter hinzugefügt, um das ganze etwas universeller zu gestalten.
    Siehe Post#1.

  • Buttons mit Icon und Label

    • funkey
    • 16. Dezember 2009 um 12:47

    Hab mich mal wieder an etwas versucht. Hab bei einem Programm wieder mal Buttons gesehen, die sowohl Icons als auch Text enthielten. Hab mir das mit dem Info-Tool angeschaut und der ClassName lautete BitBtn, also Bitmap-Button. Nun habe ich versucht, das ganze recht anwenderfreundlich in eine Funktion zu bringen und hier ist das Ergebnis.


    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <GDIPlus.au3>

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

    Local $hGUI = GUICreate("Funkey's BitBtn-Example", 1060, 270)
    Local $IcoPath = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Icons\au3.ico"

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

    $BitBtn1 = _GUICtrlCreateBitBtn("Explorer", 10, 10, 200, 25, "shell32.dll", 5)
    $BitBtn2 = _GUICtrlCreateBitBtn("Button2", 10, 40, 200, 35, "shell32.dll", 7)
    $BitBtn3 = _GUICtrlCreateBitBtn("Button3", 10, 80, 200, 55, "shell32.dll", 10, 20)
    $BitBtn4 = _GUICtrlCreateBitBtn("Button4", 10, 140, 200, 55, $IcoPath, 20)
    $BitBtn5 = _GUICtrlCreateBitBtn("Papierkorb", 10, 200, 200, 55, "shell32.dll", 32, 30, 20, 0, 20)

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

    $BitBtn6 = _GUICtrlCreateBitBtn("Explorer", 220, 10, 200, 25, "shell32.dll", 5, -1, 0, 1)
    $BitBtn7 = _GUICtrlCreateBitBtn("Button7", 220, 40, 200, 35, "shell32.dll", 7, -1, 0, 1)
    $BitBtn8 = _GUICtrlCreateBitBtn("Button8", 220, 80, 200, 55, "shell32.dll", 10, 20, 0, 1)
    $BitBtn9 = _GUICtrlCreateBitBtn("Button9", 220, 140, 200, 55, $IcoPath, 20, -1, 0, 1)
    $BitBtn10= _GUICtrlCreateBitBtn("Papierkorb", 220, 200, 200, 55, "shell32.dll", 32, 30, 20, 1, 20)

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

    $BitBtn11 = _GUICtrlCreateBitBtn("Explorer", 430, 10, 200, 25, "shell32.dll", 5, -1, 0, 2)
    $BitBtn12 = _GUICtrlCreateBitBtn("Button12", 430, 40, 200, 35, "shell32.dll", 7, -1, 0, 2)
    $BitBtn13 = _GUICtrlCreateBitBtn(@CR & @CR & "Button13", 430, 80, 200, 55, "shell32.dll", 10, 20, 0, 2)
    $BitBtn14 = _GUICtrlCreateBitBtn(@CR & @CR & "Button14", 430, 140, 200, 55, $IcoPath, 20, 30, 0, 2, 10)
    $BitBtn15 = _GUICtrlCreateBitBtn(@CR & "Papierkorb", 430, 200, 200, 55, "shell32.dll", 32, 20, 20, 2, 15)

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

    $BitBtn16 = _GUICtrlCreateBitBtn("Explorer", 640, 10, 200, 25, "shell32.dll", 5, -1, 0, 3)
    $BitBtn17 = _GUICtrlCreateBitBtn("Button17", 640, 40, 200, 35, "shell32.dll", 7, -1, 0, 3)
    $BitBtn18 = _GUICtrlCreateBitBtn("Button18", 640, 80, 200, 55, "shell32.dll", 10, 20, 0, 3, 15)
    $BitBtn19 = _GUICtrlCreateBitBtn("Button19", 640, 140, 200, 55, $IcoPath, 20, 35, 0, 3)
    $BitBtn20 = _GUICtrlCreateBitBtn("Papierkorb", 640, 200, 200, 55, "shell32.dll", 32, -1, 20, 3, 20)

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

    $BitBtn21 = _GUICtrlCreateBitBtn("", 850, 10, 200, 25, "shell32.dll", 5, -1, 0, 4)
    $BitBtn22 = _GUICtrlCreateBitBtn("", 850, 40, 200, 35, "shell32.dll", 7, -1, 0, 4)
    $BitBtn23 = _GUICtrlCreateBitBtn("", 850, 80, 200, 55, "shell32.dll", 10, 20, 0, 4)
    $BitBtn24 = _GUICtrlCreateBitBtn("", 850, 140, 200, 55, $IcoPath, 20, -1, 0, 4)
    $BitBtn25 = _GUICtrlCreateBitBtn("Papierkorb", 850, 200, 200, 55, "shell32.dll", 32, -1, 20, 4, 20)

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

    GUISetState()

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

    Local $msg
    While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
    For $i = 1 To 25
    If $msg = Eval("BitBtn" & $i) Then ConsoleWrite("$BitBtn"&$i& ": " & _BitBtnClick(Eval("BitBtn" & $i)) & @CR)
    Next
    Sleep(10)
    WEnd

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

    Func _GUICtrlCreateBitBtn($sText, $iLeft, $iTop, $iWidth, $iHeight, $sImg, $iIndex = 0, $iMaxIconHeight = -1, $iDist = 0, $nAllign = 0, $iFontSize = 8.5, $iFontWeight = Default)
    ;funkey 16.12.2009
    Local $iOffsetX, $iOffsetY, $LabelStyle = 0x201
    Local $a = _GetTextSize("a a", $iFontSize)
    Local $b = _GetTextSize("aa", $iFontSize)
    Local $SpaceLen = ($a[0] - $b[0]) / 5
    Local $aSize = _GetTextSize($sText, $iFontSize)
    Local $iIconHeight = $iMaxIconHeight
    If $iMaxIconHeight = -1 Or $iMaxIconHeight > $iHeight - 8 Then
    $iIconHeight = $iHeight - 8
    EndIf
    Local $iSpaces = Ceiling(($iIconHeight + $iDist) / $SpaceLen)
    Switch $nAllign
    Case 0 ;Icon is left
    $iOffsetX = $iWidth / 2 - $aSize[0] / 2 - $iIconHeight / 2 - $iDist / 2
    $iOffsetY = ($iHeight - $iIconHeight) / 2
    $sText = StringFormat("%" & $iSpaces + StringLen($sText) & "s", $sText)
    Case 1 ;Icon is right
    $iOffsetX = $iWidth / 2 + $aSize[0] / 2 - $iIconHeight / 2 + $iDist / 2
    $iOffsetY = ($iHeight - $iIconHeight) / 2
    $sText = StringFormat("%" & -$iSpaces - StringLen($sText) & "s", $sText)
    Case 2 ;Icon is on the top
    $iOffsetX = $iWidth / 2 - $iIconHeight / 2
    $iOffsetY = 4
    $LabelStyle = 0x1
    Case 3 ;Icon is on the bottom
    $iOffsetX = $iWidth / 2 - $iIconHeight / 2
    $iOffsetY = $iHeight - $iIconHeight -4
    $LabelStyle = 0x1
    Case 4 ;Icon is in the middle
    $iOffsetX = $iWidth /2 - $iIconHeight / 2 + $iDist / 2
    $iOffsetY = ($iHeight - $iIconHeight) / 2
    EndSwitch
    Local $hBtn = GUICtrlCreateLabel("", $iLeft, $iTop, $iWidth, $iHeight)
    GUICtrlCreateIcon($sImg, $iIndex, $iLeft + $iOffsetX, $iTop + $iOffsetY, $iIconHeight, $iIconHeight, 0)
    GUICtrlCreateLabel($sText, $iLeft, $iTop, $iWidth, $iHeight, $LabelStyle, 0x200)
    GUICtrlSetBkColor(-1, -2) ; $GUI_BKCOLOR_TRANSPARENT
    GUICtrlSetFont(-1, $iFontSize, $iFontWeight)
    GUICtrlSetState(-1, 32) ;$GUI_HIDE
    GUICtrlCreateLabel($sText, $iLeft, $iTop, $iWidth, $iHeight, $LabelStyle, 0x001)
    GUICtrlSetBkColor(-1, -2) ; $GUI_BKCOLOR_TRANSPARENT
    GUICtrlSetFont(-1, $iFontSize, $iFontWeight)
    Return $hBtn
    EndFunc ;==>_GUICtrlCreateBitBtn

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

    Func _BitBtnClick($IdBtn)
    ;funkey 16.12.2009
    Local $aInfo, $aInfoLast
    GUICtrlSetState($IdBtn + 3, 32) ;$GUI_HIDE
    GUICtrlSetState($IdBtn + 2, 16) ;$GUI_SHOW
    $aInfoLast = GUIGetCursorInfo()
    Do
    Sleep(10)
    $aInfo = GUIGetCursorInfo()
    If @error Then Return 0
    If $aInfo[4] <> $aInfoLast[4] Then ;if changing the hover-control
    If $aInfo[4] < $IdBtn Or $aInfo[4] > $IdBtn + 3 Then ;if not hovering the BitBtn
    GUICtrlSetState($IdBtn + 2, 32) ;$GUI_HIDE
    GUICtrlSetState($IdBtn + 3, 16) ;$GUI_SHOW
    Else
    GUICtrlSetState($IdBtn + 3, 32) ;$GUI_HIDE
    GUICtrlSetState($IdBtn + 2, 16) ;$GUI_SHOW
    EndIf
    EndIf
    $aInfoLast = $aInfo
    Until Not $aInfo[2]
    GUICtrlSetState($IdBtn + 2, 32) ;$GUI_HIDE
    GUICtrlSetState($IdBtn + 3, 16) ;$GUI_SHOW
    If $aInfo[4] <> $IdBtn + 2 And $aInfo[4] <> $IdBtn + 1 Then Return 0
    Return 1
    EndFunc ;==>_BitBtnClick

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

    Func _GetTextSize($nText, $iFontSize = 8.5, $sFont = 'Microsoft Sans Serif', $iFontAttributes = 0)
    ;Author: Bugfix
    ;Modified: funkey
    If $nText = '' Then Return
    Local $hGUI = GUICreate("Textmeter by Bugfix")
    _GDIPlus_Startup()
    Local $hFormat = _GDIPlus_StringFormatCreate(0)
    Local $hFamily = _GDIPlus_FontFamilyCreate($sFont)
    Local $hFont = _GDIPlus_FontCreate($hFamily, $iFontSize, $iFontAttributes, 3)
    Local $tLayout = _GDIPlus_RectFCreate(15, 171, 0, 0)
    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    Local $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    Local $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    GUIDelete($hGUI)
    Local $aSize[2] = [$iWidth, $iHeight]
    Return $aSize
    EndFunc ;==>_GetTextSize

    [/autoit]

    Edit: Einige Parameter hinzugefügt um Position und Größe des Icons und des Textes besser zu bestimmen.
    Edit: Text-Ausrichtung hinzugefügt.

  • ==> Variable must be of type "Object".:

    • funkey
    • 16. Dezember 2009 um 11:17

    Je nachdem was du tun willst, wenn kein Objekt erzeugt werden konnte.

    [autoit]

    If Not IsObj($objWMIService) Then Return

    [/autoit]
  • eine stelle einer variabel löschen ?

    • funkey
    • 16. Dezember 2009 um 10:54

    Hatte überlesen, dass danach auch noch ein Leerzeichen kommt, damit passt ojo's Antwort perfekt.

  • ==> Variable must be of type "Object".:

    • funkey
    • 16. Dezember 2009 um 10:52
    [autoit]

    If IsObj($objWMIService) Then ...

    [/autoit]
  • eine stelle einer variabel löschen ?

    • funkey
    • 16. Dezember 2009 um 10:37

    StringTrimLeft(" 30", 1)

  • Monochromzeichnen eines Bildes

    • funkey
    • 16. Dezember 2009 um 08:53

    Hatte mal zu einer Hilfestellung ein Beispiel umgewandelt. Hier kann man schön verfolgen wie das Bild umgewandelt wird, also eher zu Demo-Zwecken zu verwenden. Man kann hier aussuchen nach welchem Farbanteil (R,G,B) das Schwarz-Weiß-Bild erzeugt wird.

    Spoiler anzeigen
    [autoit]

    #cs **************************************************************************

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

    Ein Bild in schwarz weiß speichern und vergleichen

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

    http://www.autoit.de/index.php?page…77121#post77121

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

    #ce **************************************************************************

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

    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <Color.au3>
    #include <WinAPI.au3>

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

    $PATH = FileOpenDialog("Datei auswählen",@ScriptDir,"Bilder (*.bmp; *.jpg)",1)
    If @error Then Exit
    $CHOOSE = GUICreate("Wählen",100,60,-1,-1,0x16C80000)
    $COMBO = GUICtrlCreateCombo("",5,5,90,20)
    GUICtrlSetData($COMBO,"Rot-Anteil|Grün-Anteil|Blau-Anteil","Rot-Anteil")
    $SELECT = GUICtrlCreateButton("OK",5,30,90,20)
    GUISetState(@SW_SHOW,$CHOOSE)
    While 1
    $MSG = GUIGetMsg()
    If $MSG = $SELECT Then
    $CHANNEL = GUICtrlRead($COMBO)
    GUIDelete($CHOOSE)
    ExitLoop
    ElseIf $MSG = -3 Then
    Exit
    EndIf
    Sleep(15)
    WEnd

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

    $SAVE = FileSaveDialog("Speichern",@ScriptDir,"Bild (*.jpg)",16,"Bitmap_" & $CHANNEL & ".JPG")
    If @error Then
    Exit
    Else
    If StringRight($SAVE, 4) <> ".JPG" Then $SAVE &= ".JPG"
    EndIf

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

    _GDIPlus_Startup()
    $IMAGE = _GDIPlus_ImageLoadFromFile($PATH)
    $X = _GDIPlus_ImageGetWidth($IMAGE)
    $Y = _GDIPlus_ImageGetHeight($IMAGE)
    _GDIPlus_ImageDispose($IMAGE)

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

    $GUI = GUICreate("SW-Maker",$X,$Y,-1,-1,0x80000000)
    GUISetBkColor(0xFFFFFF)
    $PICTURE = GUICtrlCreatePic($PATH,0,0,$X,$Y)
    GUISetState(@SW_SHOW,$GUI)

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

    $DC = _WinAPI_GetDC($GUI)
    $C_DC = _WinAPI_CreateCompatibleDC($DC)
    $BITMAP = _WinAPI_CreateCompatibleBitmap($DC,$X,$Y)
    _WinAPI_SelectObject($C_DC,$BITMAP)
    _WinAPI_BitBlt ($C_DC,0,0,$X,$Y,$DC,0,0,$SRCCOPY)
    $BITS = DllStructCreate ("dword[" & ($X * $Y) & "]")
    DllCall ("gdi32", "int", "GetBitmapBits", "ptr", $BITMAP, "int", ($X * $Y * 4), "ptr", DllStructGetPtr ($BITS))
    GUICtrlDelete($PICTURE)

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

    For $CY = 0 To ($Y - 1)
    For $CX = 0 To ($X - 1)
    $INDEX = ($CY * $X) + $CX
    $COLOR = DllStructGetData ($BITS,1, $INDEX)
    $RED = Hex(_ColorGetRed($COLOR),2)
    $GREEN = Hex(_ColorGetGreen($COLOR),2)
    $BLUE = Hex(_ColorGetBlue($COLOR),2)
    If $CHANNEL = "Rot-Anteil" Then
    $COLOR = "0x" &$RED&$RED&$RED
    ElseIf $CHANNEL = "Grün-Anteil" Then
    $COLOR = "0x"&$GREEN&$GREEN&$GREEN
    ElseIf $CHANNEL = "Blau-Anteil" Then
    $COLOR = "0x"&$BLUE&$BLUE&$BLUE
    EndIf
    DllStructSetData ($BITS,1,$COLOR,$INDEX)
    Next
    DllCall ("gdi32", "int", "SetBitmapBits", "ptr", $BITMAP, "int", ($X * $Y * 4), "ptr", DllStructGetPtr ($BITS))
    _WinAPI_BitBlt ($DC,0,0,$X,$Y,$C_DC,0,0,$SRCCOPY)
    Next
    $HIMAGE = _GDIPlus_BitmapCreateFromHBITMAP($BITMAP)
    _GDIPlus_ImageSaveToFile($HIMAGE,$SAVE)
    _WinAPI_DeleteObject($HIMAGE)
    _WinAPI_DeleteObject($BITMAP)
    _GDIPlus_Shutdown()
    _WinAPI_ReleaseDC($GUI,$DC)

    [/autoit]
  • controlmove

    • funkey
    • 15. Dezember 2009 um 18:11

    Wieso erstellst du immer wieder neue Pic-Controls? Alle benötigten Controls immer am anfang erstellen und dann abändern oder anzeigen wie man es gerade braucht. Siehe dazu auch GuiCtrlSetImage.

  • AutoItX3.Control installieren

    • funkey
    • 15. Dezember 2009 um 12:44

    Du brauchst nur die dll zu registrieren. So in etwa

    Code
    regsvr32 AutoItX3.dll /s
  • CMD Ausgabe einlesen und weiter verarbeiten

    • funkey
    • 15. Dezember 2009 um 10:24

    Hätte es so versucht:

    Spoiler anzeigen
    [autoit]

    Local $pid = Run(@ComSpec & ' /c bcdedit.exe | findstr "systemroot"', @SystemDir, @SW_HIDE, 2)
    Local $line
    While 1
    $line &= StdoutRead($pid)
    If @error Then ExitLoop
    WEnd

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

    MsgBox(0, "", $line)

    [/autoit]
  • AutoIt-Fenster

    • funkey
    • 14. Dezember 2009 um 10:38

    Probier mal so:

    [autoit]

    GUICreate("Bildschirm-Lock", 1280, 1024, 0, 0, $WS_POPUP)

    [/autoit]
  • UDF-Database v0.1.1

    • funkey
    • 14. Dezember 2009 um 08:44

    Hallo Jautois!
    Dein Projekt gefällt mir außerordentlich gut!! :thumbup:


    Vorschläge von mir:
    Die UDF-Auswahl links könnte mit einem einfachen Klick erfolgen.
    Die Links zum Thread funktionieren bei mir nicht. (Der angeforderte Nachschlageschlüssel konnte in keinem aktiven Aktivierungskontext gefunden werden.)
    Der Link sollte einen anderen Cursor verwenden (GUICtrlSetCursor($Link, 0))
    Die Suche dauert relativ lang. Ist die Datenbank nur online?
    Ich würde das Register 'Search' weglassen und dafür bei 'Overview' einen Filter einbauen oder zumindest die Suche ohne den Search-Button realisieren.
    Das Programm beendet sich, wenn die Datenbank nicht erreichbar ist. Offline-Betrieb möglich? Es hat sich bei mir auch manchmal einfach so mit einem Datenbank-Fehler beendet.
    Wenn dann mehrere UDF's zur Verfügung stehen, dann wäre es vllt von Vorteil wenn die Gui in der Größe veränderbar wird. (Resizing, Größe und Position in einer Ini-Datei speichern)
    Beispiele zu den UDF's könnten auch noch eingebracht werden.


    So, das war's erst mal von mir :D . Und danke, dass meine OwnTab-UDF schon dabei ist!

    mfg funkey

  • Hallo schön euch zu lesen (Uservorstellung von Ubuntu)

    • funkey
    • 13. Dezember 2009 um 14:11

    Herzlich willkommen hier im Forum!!

    Zitat von Wikipedia

    Der Begriff Ubuntu kommt aus den Sprachen der afrikanischen Völker Zulu und Xhosa und steht für „Menschlichkeit“ und „Gemeinsinn“, aber auch für den Glauben an ein universelles Band des Teilens, das alles Menschliche verbindet

  • MsgBox() - Eigene Labels?

    • funkey
    • 11. Dezember 2009 um 17:32

    Da gibt es mehrere Möglichkeiten. Ich habe folgende Lösung verwendet:

    Spoiler anzeigen
    [autoit]

    _MsgBoxIndividual(4, "", "", "a", "b")

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

    Func _MsgBoxIndividual($flag, $title, $text, $btn_text1 = "OK", $btn_text2 = "Nein", $btn_text3 = "Vielleicht")
    ;funkey
    Local $str = "Local $x = Opt('WinWaitDelay',50)+WinWait('"&$title&"','')+" & _
    "ControlSetText('"&$title&"','"&$text&"','Button1','"&$btn_text1&"')+" & _
    "ControlSetText('"&$title&"','"&$text&"','Button2','"&$btn_text2&"')+" & _
    "ControlSetText('"&$title&"','"&$text&"','Button3','"&$btn_text3&"')"
    Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "' & $str & '"')
    Sleep(100)
    Return MsgBox($flag, $title, $text)
    EndFunc

    [/autoit]
  • Rechnen

    • funkey
    • 11. Dezember 2009 um 17:06
    [autoit]

    MsgBox(0,"", StringFormat("%.2f", 1.2345634633))

    [/autoit]

    Oder Round. Das zeigt aber bei ganzen Zahlen überhaupt keine Kommastellen an ;)

  • Bei Hover - Rand einer GDI-Grafik ändern

    • funkey
    • 11. Dezember 2009 um 14:41

    Du wirst wahrscheinlich deine Gründe habe, aber ich verwende GDI+ nur wenn es unbedingt sein muss (kenne mich da auch nicht besonders aus ;)).

    Spoiler anzeigen
    [autoit]

    #include <GUICtrlSetOnHover_UDF.au3>

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

    Opt("GUIOnEventMode", 1)

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

    $GUIMain = GUICreate("Test", 570, 200)
    GUISetOnEvent(-3, "Quit")

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

    GUISetState()

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

    $Label1 = GUICtrlCreateLabel("", 10, 10, 100, 100)
    GUICtrlSetBkColor(-1, 0)
    $Label2 = GUICtrlCreateLabel("", 12, 12, 96, 96)
    GUICtrlSetBkColor(-1, 0)

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

    _GUICtrl_SetOnHover($Label1, "_Hover_Proc", "_Leave_Hover_Func")

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

    While 1
    Sleep(100)
    WEnd

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

    Func _Hover_Proc($iCtrlID, $iParam)
    GUICtrlSetBkColor($Label1, 0xFF0000)
    EndFunc ;==>_Hover_Proc

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

    Func _Leave_Hover_Func($iCtrlID)
    GUICtrlSetBkColor($Label1, 0)
    EndFunc ;==>_Leave_Hover_Func

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

    Func Quit()
    Exit
    EndFunc ;==>Quit

    [/autoit]

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™