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

Beiträge von UEZ

  • AutoIt Windows Screenshooter v1.84 Build 2019-08-18

    • UEZ
    • 19. Januar 2011 um 11:21

    Hi Leute,

    die Zoom Funktion über das Mausrad funktioniert leider nicht in AutoIt Windows Screenshooter v1.08 Build 2011-01-18 Final und ich kann den Fehler nicht sehen!

    Im Prinzip habe ich diese Funktion benutzt:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    Opt("GUIOnEventMode", 1)
    Global $hGUI

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

    $hGUI = GUICreate("Test Wheel")

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

    GUISetState()
    GUIRegisterMsg($WM_MOUSEWHEEL, "WM_MOUSEWHEEL")
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

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

    While Sleep(10000)
    WEnd

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

    Func WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    If _WinAPI_HiWord($wParam) > 0 Then
    ConsoleWrite("Scrolled up " & @LF)
    Else
    ConsoleWrite("Scrolled down " & @LF)
    EndIf
    Return "GUI_RUNDEFMSG"
    EndFunc ;==>WM_MOUSEWHEEL

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

    Func _Exit()
    GUIDelete($hGUI)
    Exit
    EndFunc

    [/autoit]

    Über das Touchpad gehts, aber nicht über das Mausrad! ?(

    Sieht jemand den Fehler?

    Gruß,
    UEZ

  • Speichern eines arrays in einer Text datei

    • UEZ
    • 18. Januar 2011 um 22:49

    Kann _FileWriteFromArray() ein 2D Array in eine Datei schreiben?

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    #include <File.au3>

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

    Dim $array[20][6]
    $x = 1
    For $i = 0 To UBound($array) - 1
    For $j = 0 To UBound($array, 2) - 1
    $array[$i][$j] = $x
    $x += 1
    Next
    Next

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

    _FileWriteFromArray(@ScriptDir & "\2DArray_.txt", $array)

    [/autoit]

    Gruß,
    UEZ

  • Speichern eines arrays in einer Text datei

    • UEZ
    • 18. Januar 2011 um 22:36

    Probier's mal damit:

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    Dim $array[20][6]
    $x = 1
    For $i = 0 To UBound($array) - 1
    For $j = 0 To UBound($array, 2) - 1
    $array[$i][$j] = $x
    $x += 1
    Next
    Next

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

    $string = ""
    For $i = 0 To UBound($array) - 1
    For $j = 0 To UBound($array, 2) - 1
    $string &= "$array[" & $i & "][" & $j & "] = " & $array[$i][$j] & @LF
    Next
    Next

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

    $hFile = FileOpen(@ScriptDir & "\2DArray.txt", 2)
    FileWrite($hFile, $string)
    FileClose($hFile)
    Exit

    [/autoit]

    Gruß,
    UEZ

  • Mathe: Aus Textaufgabe 2 Gleichungen erstellen und ausrechnen

    • UEZ
    • 18. Januar 2011 um 22:11

    Excel tut's auch ;)

    AspirinJunkie: Klasse Mathe Demo! :thumbup:

    Gruß,
    UEZ

    PS: "Ich bin zu alt für den Scheiß."

  • Mathe: Aus Textaufgabe 2 Gleichungen erstellen und ausrechnen

    • UEZ
    • 18. Januar 2011 um 21:11

    40 Schüler haben teilgenommen.

    Gruß,
    UEZ

  • Happy Birthday Oscar :)

    • UEZ
    • 18. Januar 2011 um 16:54
    Code
    ,--,                                                 
          ,--.'|                                                 
       ,--,  | :               ,-.----.   ,-.----.               
    ,---.'|  : '               \    /  \  \    /  \              
    |   | : _' |               |   :    | |   :    |             
    :   : |.'  |    ,--.--.    |   | .\ : |   | .\ :       .--,  
    |   ' '  ; :   /       \   .   : |: | .   : |: |     /_ ./|  
    '   |  .'. |  .--.  .-. |  |   |  \ : |   |  \ :  , ' , ' :  
    |   | :  | '   \__\/: . .  |   : .  | |   : .  | /___/ \: |  
    '   : |  : ;   ," .--.; |  :     |`-' :     |`-'  .  \  ' |  
    |   | '  ,/   /  /  ,.  |  :   : :    :   : :      \  ;   :  
    ;   : ;--'   ;  :   .'   \ |   | :    |   | :       \  \  ;  
    |   ,/       |  ,     .-./ `---'.|    `---'.|        :  \  \ 
    '---'         `--`---'       `---`      `---`         \  ' ; 
                                                           `--`  
    
    
                                                                                                
                                                      _______                                   
    /|         .--.                       .           \  ___ `'.                                
    ||         |__|                     .'|            ' |--.\  \               .-.          .- 
    ||         .--. .-,.--.       .|   <  |            | |    \  '               \ \        / / 
    ||  __     |  | |  .-. |    .' |_   | |            | |     |  '     __        \ \      / /  
    ||/'__ '.  |  | | |  | |  .'     |  | | .'''-.     | |     |  |  .:--.'.       \ \    / /   
    |:/`  '. ' |  | | |  | | '--.  .-'  | |/.'''. \    | |     ' .' / |   \ |       \ \  / /    
    ||     | | |  | | |  '-     |  |    |  /    | |    | |___.' /'  `" __ | |        \ `  /     
    ||\    / ' |__| | |         |  |    | |     | |   /_______.'/    .'.''| |         \  /      
    |/\'..' /       | |         |  '.'  | |     | |   \_______|/    / /   | |_        / /       
    '  `'-'`        |_|         |   /   | '.    | '.                \ \._,\ '/    |`-' /        
                                `'-'    '---'   '---'                `--'  `"      '..'
    Alles anzeigen

    und Alles Gute!

    Gruß,
    UEZ

  • AutoIt Windows Screenshooter v1.84 Build 2019-08-18

    • UEZ
    • 17. Januar 2011 um 22:15

    Habe jetzt das Verschieben und Zoomen des Vorschaufensters hinzugefügt!

    Also wer Interesse hat, einfach im Post#1 downloaden.

    Falls jemand einen Bug findet, bitte Reporten!

    Gruß,
    UEZ

  • Icon einfügen (Compile Script with options) Win7

    • UEZ
    • 17. Januar 2011 um 20:33

    Probiere es mal damit:

    [autoit]


    #AutoIt3Wrapper_Icon=icon.ico

    [/autoit]

    Gruß,
    UEZ

  • Alle Zeilen aus einer Datei lesen

    • UEZ
    • 17. Januar 2011 um 16:37

    Wird die Datei serial.txt überhaupt heruntergeladen?

    [autoit]


    $hDownload = InetGet("ftp://ftp.mozilla.org/README", @TempDir & "\Mozilla-README.txt", 1)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $hDownload = ' & $hDownload & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    InetClose($hDownload)
    $file = FileRead(@TempDir & "\Mozilla-README.txt")
    MsgBox(0, "Test", $file)

    [/autoit]


    Gruß,
    UEZ

  • Öffnen mit Parametern

    • UEZ
    • 17. Januar 2011 um 15:21

    Wie sieht dein Code aus? Alles andere ist reine Spekulation!

    Gruß,
    UEZ

  • Alle Zeilen aus einer Datei lesen

    • UEZ
    • 17. Januar 2011 um 15:17

    $file = FileRead("Datei")

    Gruß,
    UEZ

  • WinXP - Wie lange sollte der AutoIt Support noch gehen?

    • UEZ
    • 17. Januar 2011 um 14:44

    Das Auge isst doch mit! Mir persönlich gefällt die Schnick-Schnack Oberfläche in Win7 sehr und das Ding läuft absolut stabil, ist schnell und hat eine Menge netter Features! Was will ich mehr? Was hat XP was Win7 nicht hat?

    Da meine CPU (Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz) die meiste Zeit ehe nur "rumdübelt", so kann sie wenigstens ein bisschen Beschäftigung gebrauchen und die Aero Oberfläche berechnen!

    Jeder hat seine Vorlieben bzgl. Aussehen und Funktionalität eines BS. Ich würde auch lieber neue "Autos" fahren, wenn ich sie mir leisten könnte, als meine alte Kiste, die auch "stabil" läuft, optisch keinen Schnick-Schnack aufweißt, die mich von A nach B bringt, etc.

    Über Geschmack kann man eben streiten...

    Andy: was läuft denn bei dir im Garten rum? 8o

    Gruß,
    UEZ

  • auflistung der dateien

    • UEZ
    • 16. Januar 2011 um 20:56

    Versuch's mal damit:

    Spoiler anzeigen
    [autoit]


    #include <GUIComboBox.au3>
    #include <GuiConstantsEx.au3>
    #include <Constants.au3>

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

    $ordner = FileSelectFolder("Bitte ein Ordner auswählen", "")
    If @error Then Exit

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

    $hGUI = GUICreate("ComboBox", 440, 40)
    $hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
    GUISetState()

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

    _GUICtrlComboBox_BeginUpdate($hCombo)
    _GUICtrlComboBox_AddDir($hCombo, $ordner & "\*")
    _GUICtrlComboBox_EndUpdate($hCombo)
    _GUICtrlComboBox_SetCurSel($hCombo, 0)

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

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()

    [/autoit]

    Gruß,
    UEZ

  • herausfinden, ob beliebige Taste gedrückt wurde (bzw. welche zuletzt gedrückt wurde)

    • UEZ
    • 16. Januar 2011 um 20:40

    Da gibt es von Eukalyptus was feines bzgl. der Tastaturabfrage:

    Spoiler anzeigen
    [autoit]


    $hGui = GUICreate("Example 1 - Press any key to exit...", 400, 100)
    GUISetState()
    $sKeyboardState = _WinAPI_GetKeyboardState(1)
    While _WinAPI_GetKeyboardState(1) = $sKeyboardState
    Sleep(100)
    WEnd
    GUIDelete($hGui)

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

    Sleep(500)

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

    $hGui = GUICreate('Example 2 - Press "A" to exit...', 400, 200)
    GUISetState()
    $aKeyboardStateOld = _WinAPI_GetKeyboardState()
    While 1
    $aKeyboardState = _WinAPI_GetKeyboardState()
    If $aKeyboardState[65] <> $aKeyboardStateOld[65] Then ExitLoop
    Sleep(100)
    WEnd
    GUIDelete($hGui)

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

    Sleep(500)

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

    $hGui = GUICreate('Example 3 - Type...', 400, @DesktopHeight - 100)
    $hLabel = GUICtrlCreateLabel("", 2, 2, 396, @DesktopHeight - 104)
    GUISetState()
    While GUIGetMsg() <> -3
    $aKeyboardState = _WinAPI_GetKeyboardState()
    $sKeys = "I" & @TAB & "CHR" & @TAB & "State" & @TAB & "Toogle" & @LF
    For $i = 10 To 90
    $sKeys &= $i & @TAB & Chr($i) & @TAB & BitAND($aKeyboardState[$i], 0xF0) & @TAB & BitAND($aKeyboardState[$i], 0x0F) & @LF
    Next
    GUICtrlSetData($hLabel, $sKeys)
    Sleep(100)
    WEnd

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _WinAPI_GetKeyboardState
    ; Description ...: Returns the status of the 256 virtual keys
    ; Syntax.........: _WinAPI_GetKeyboardState($iFlag=0)
    ; Parameters ....: $iFlag - Return Type
    ; 0 Returns an array[256]
    ; 1 Returns a string
    ; Return values .: Success - Array[256] or String containing status of 256 virtual keys
    ; Failure - False
    ; Author ........: Eukalyptus
    ; Modified.......:
    ; Remarks .......: If the high-order bit is 1, the key is down; otherwise, it is up.
    ; If the key is a toggle key, for example CAPS LOCK, then the low-order bit is 1
    ; when the key is toggled and is 0 if the key is untoggled
    ; Related .......: _IsPressed
    ; Link ..........;
    ; Example .......;
    ; ===============================================================================================================================
    Func _WinAPI_GetKeyboardState($iFlag = 0)
    Local $aDllRet, $lpKeyState = DllStructCreate("byte[256]")
    $aDllRet = DllCall("User32.dll", "int", "GetKeyboardState", "ptr", DllStructGetPtr($lpKeyState))
    If @error Then Return SetError(@error, 0, 0)
    If $aDllRet[0] = 0 Then
    Return SetError(1, 0, 0)
    Else
    Switch $iFlag
    Case 0
    Local $aReturn[256]
    For $i = 1 To 256
    $aReturn[$i - 1] = DllStructGetData($lpKeyState, 1, $i)
    Next
    Return $aReturn
    Case Else
    Return DllStructGetData($lpKeyState, 1)
    EndSwitch
    EndIf
    EndFunc ;==>_WinAPI_GetKeyboardState

    [/autoit]

    Gruß,
    UEZ

  • [Spiel] MiniTD

    • UEZ
    • 15. Januar 2011 um 23:51

    Ist sehr gut geworden! Gefällt mir sehr gut! :thumbup:

    Gruß,
    UEZ

  • Jpg zu ico

    • UEZ
    • 15. Januar 2011 um 15:21

    name22 was schneller!

    Hier im Prinzip die gleiche Funktion von smashly, aber mit einer Resize Funktion:

    Spoiler anzeigen
    [autoit]


    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    $file = FileOpenDialog("Ein Bild auswählen", "", "Bilder (*.jpg;*.bmp;*.png)")
    If @error Then Exit

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

    _GDIPlus_Startup ()
    $bild = Resize($file)
    $hIcon = _GDIPlus_BitmapCreateHICONFromBitmap($bild)
    _CreateIconFileFromHICON($hIcon, @ScriptDir & "\Test.ico")
    _WinAPI_DestroyIcon($hIcon)
    _GDIPlus_BitmapDispose($bild)
    Exit

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

    Func Resize($sFilename, $width = 64, $height = 64) ; code by UEZ 2011
    Local $hBitmap = _GDIPlus_BitmapCreateFromFile($sFilename)
    Local $iH = _GDIPlus_ImageGetHeight($hBitmap)
    Local $iW = _GDIPlus_ImageGetWidth($hBitmap)
    Local $hImage = _GDIPlus_BitmapCreateFromScan0($width, $height)
    Local $hContext = _GDIPlus_ImageGetGraphicsContext($hImage)
    If $iW < $width And $iH < $height Then
    $w = $width / 2 - $iW / 2
    $h = $height / 2 - $iH / 2
    _GDIPlus_GraphicsDrawImageRect($hContext, $hBitmap, $width / 2 - $iW / 2, $height / 2 - $iH / 2, $iW, $iH)
    Else
    If $iW > $iH Then
    $f = $iW / $width
    Else
    $f = $iH / $height
    EndIf
    $w = $iW / $f
    $h = $iH / $f
    _GDIPlus_GraphicsDrawImageRect($hContext, $hBitmap, $width / 2 - $w / 2, $height / 2 - $h / 2, $w, $h)
    EndIf
    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_BitmapDispose($hBitmap)
    Return SetError(0, 0, $hImage)
    EndFunc

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

    Func _CreateIconFileFromHICON($hIcon, $sOutIcon) ;code by smashly
    Local $aInfo, $sIco, $sBmp, $hCDC, $tBI, $tBits, $iSz, $sBD, $FO

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

    ; Start of single Icon Header 3 x 2 bytes = 6 bytes: 0000 Reserved / 0100 Icon / 0100 Numer of icons, total length will be 22 bytes for a single icon when finished
    $sIco = "0x000001000100"

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

    ; Start of the Bitmap data header 1 x 4bytes: length of the header will be 40 bytes when finished. Will be appended to the end of the icon header when finished
    $sBmp = "28000000"

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

    ; Get info about the HICON, this is mainly to get the pointers to the Color/Mask bitmaps data
    $aInfo = _WinAPI_GetIconInfo($hIcon)

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

    ; Create a memory Compatable DC
    $hCDC = _WinAPI_CreateCompatibleDC(0)

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

    ; Create a BITMAPINFO Struct to store the Bitmap Info, it needs to be inilialized by setting the struct size.
    $tBI = DllStructCreate($tagBITMAPINFO)
    DllStructSetData($tBI, "Size", DllStructGetSize($tBI))

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

    ; Pass a bitmap data pointer to the BITMAPINFO struct so we can recieve the details of the color bitmap data, we use it to write the headers
    _WinAPI_GetDIBits($hCDC, $aInfo[5], 0, 0, 0, DllStructGetPtr($tBI), 0)

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

    ; Now we have some the basic info to add to the Icon & Bitmap header so we'll add that to the headers.
    $sIco &= Hex(DllStructGetData($tBI, "Width"), 2) & Hex(DllStructGetData($tBI, "Height"), 2) & "00000100" & _RB(Hex(DllStructGetData($tBI, "BitCount"), 4))
    $sBmp &= _RB(Hex(DllStructGetData($tBI, "Width"))) & _RB(Hex(DllStructGetData($tBI, "Height") * 2)) & "0100" & _RB(Hex(DllStructGetData($tBI, "BitCount"), 4)) & "00000000"

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

    ; Get the size of the Bitmap data from the BITMAPINFO Struct, we'll use this in the headers further on.
    $iSz = DllStructGetData($tBI, "SizeImage")

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

    ; Create a struct to store the Bitmap data Bits of the first bitmap, reset the BITMAPINFO struct
    $tBits = DllStructCreate("byte[" & DllStructGetData($tBI, "SizeImage") & "]")

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

    ; Get the color bitmap dib bits into the $tBits struct.
    DllCall('gdi32.dll', 'int', 'GetBitmapBits', 'ptr', $aInfo[5], 'int', $iSz, 'ptr', DllStructGetPtr($tBits))

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

    ; Get GetBitmapBits returns Bottom to Top dib, so I turn it to Top to Bottom dib ;)
    ; ATM I'm only assuming that GetBitmapBits returns a Bottom to Top dib, maybe the bitmap bits you use could be Top Down already?.
    For $i = DllStructGetData($tBI, "SizeImage") + 1 To 0 Step -(DllStructGetData($tBI, "SizeImage") / DllStructGetData($tBI, "Height"))
    $sBD &= StringTrimLeft(BinaryMid(DllStructGetData($tBits, 1), $i, (DllStructGetData($tBI, "SizeImage") / DllStructGetData($tBI, "Height"))), 2)
    Next

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

    ;Clear the BITMAPINFO & $tBits Struct as we'll use the same variables again for the mask bitmap data
    $tBits = 0
    $tBI = 0

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

    ; Create a BITMAPINFO Struct to store the Bitmap Info again, it needs to be inilialized by setting the struct size.
    $tBI = DllStructCreate($tagBITMAPINFO)
    DllStructSetData($tBI, "Size", DllStructGetSize($tBI))

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

    ; Pass a bitmap data pointer to the BITMAPINFO struct so we can recieve the details of the bitmask bitmap data
    _WinAPI_GetDIBits($hCDC, $aInfo[4], 0, 0, 0, DllStructGetPtr($tBI), 0)

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

    ; We've finished with the Compatable DC, delete it.
    _WinAPI_DeleteDC($hCDC)

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

    ; Add the size of the of the color + bitmask bitmap data as we need this for both the Icon & Bitmap header
    $iSz += DllStructGetData($tBI, "SizeImage")

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

    ; combine the bitmap data size with the bitmap header, I'm padding the rest of the 40 byte bitmap header with 0's., that's the Bitmap header done
    $sBmp &= _RB(Hex($iSz)) & "00000000000000000000000000000000"

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

    ; Now add the size of the Bitmap data + bitmap header size and combine the icon header together with the bitmap header and color bitmap data
    $sIco &= _RB(Hex($iSz + 40)) & _RB(Hex("22")) & $sBmp & $sBD

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

    ; Create a struct to store the Bitmap dib Bits of the mask bitmap
    $tBits = DllStructCreate("byte[" & DllStructGetData($tBI, "SizeImage") & "]")

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

    ; Get the mask bitmap dib bits into the $tBits struct.
    DllCall('gdi32.dll', 'int', 'GetBitmapBits', 'ptr', $aInfo[4], 'int', DllStructGetData($tBI, "SizeImage"), 'ptr', DllStructGetPtr($tBits))

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

    ; Get GetBitmapBits returns Bottom to Top dib, so I turn it to a Top to Bottom dib and append the mask bitmap data to the icon
    For $i = DllStructGetData($tBI, "SizeImage") + 1 To 0 Step -(DllStructGetData($tBI, "SizeImage") / DllStructGetData($tBI, "Height"))
    $sIco &= StringTrimLeft(BinaryMid(DllStructGetData($tBits, 1), $i, (DllStructGetData($tBI, "SizeImage") / DllStructGetData($tBI, "Height"))), 2)
    Next

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

    ; Write the icon to a file.
    $FO = FileOpen($sOutIcon, 18)
    FileWrite($sOutIcon, Binary($sIco))
    FileClose($FO)

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

    ; Clear the structs
    $tBits = 0
    $tBI = 0
    EndFunc ;==>_CreateIconFileFromHICON

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

    Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = 0x0026200A, $pScan0 = 0)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[6]
    EndFunc ;==>_GDIPlus_BitmapCreateFromScan0

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

    Func _GDIPlus_BitmapCreateHICONFromBitmap($hBitmap)
    Local $hIcon
    $hIcon = DllCall($ghGDIPDll, "int", "GdipCreateHICONFromBitmap", "hwnd", $hBitmap, "int*", 0)
    If @error Then Return SetError(@error, 0, -1)
    Return SetError($hIcon[0], 0, $hIcon[2])
    EndFunc ;==>_GDIPlus_BitmapCreateHICONFromBitmap

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

    ; Reverse Byte String
    Func _RB($sByte)
    Local $aX = StringRegExp($sByte, "(.{2})", 3), $sX = ''
    For $i = UBound($aX) - 1 To 0 Step -1
    $sX &= $aX[$i]
    Next
    Return $sX
    EndFunc ;==>_RB

    [/autoit]

    Gruß,
    UEZ

  • Kontextmenü erkennt den Dateipfad

    • UEZ
    • 14. Januar 2011 um 16:15
    PHP
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Test Script]
    "Icon"="x:\Bla.ico Icon"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Test Script\command]
    @="X:\\meine Test.exe %1"

    Du müsstest in der Registry %1 einfügen, denn ansonsten öffnet er "nur" die Exe.

    Gruß,
    UEZ

  • Kontextmenü erkennt den Dateipfad

    • UEZ
    • 13. Januar 2011 um 20:47

    Kompiliere mal diesen Code als Mein Test.exe

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    #include <File.au3>
    #include <GuiEdit.au3>
    #include <GuiConstantsEx.au3>

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

    If $cmdline[0] > 0 Then
    $file = $cmdline[1]
    Dim $szDrive, $szDir, $szFName, $szExt
    $path = _PathSplit($file, $szDrive, $szDir, $szFName, $szExt)
    $Test_FILE = $szFName & $szExt
    $hGUI = GUICreate("Edit Create", 400, 300)
    $hEdit = _GUICtrlEdit_Create($hGUI, "", 2, 2, 394, 268)
    GUICtrlSetLimit($hEdit, 0x7FFF)
    GUISetState()
    For $i = 0 To UBound($path) - 1
    _GUICtrlEdit_AppendText($hEdit, $path[$i] & @CRLF)
    Next
    _GUICtrlEdit_AppendText($hEdit, @CRLF & @CRLF)
    $load_file = FileRead($file)
    _GUICtrlEdit_AppendText($hEdit, $load_file)

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

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
    EndIf

    [/autoit]

    und probiere mal aus, ob es jetzt funzt!

    Alternativ Skript kompilieren, Txt selektieren, RMT -> öffnen mit -> kompilierte Exe auswählen.

    Gruß
    UEZ

  • Stringmanipulation Japanisch

    • UEZ
    • 13. Januar 2011 um 11:33

    Probiere es mal damit:

    [autoit]


    $s = "車; クルマ [くるま] (S) [1] Rad. [2] Wagen; Auto; Karren; Fuhrwerk; Gefährt; Wagon; Taxi"
    $s1 = StringRegExpReplace($s, "(\[.+\])", '"TAB"')
    $s2 = StringRegExp($s, "\A(?U:.*(\[.+\]).*)", 3)
    $c = $s1 & ";" & '"TAB"' & $s2[0]
    MsgBox(0, "Test", $c)

    [/autoit]

    Du musst vorher in SciTE auf File->Encoding->UTF-8 gehen, damit du die Zeichen siehst!

    Gruß,
    UEZ

  • Sporadischer Fehler im Quelltext nach Kompilieren

    • UEZ
    • 13. Januar 2011 um 11:01

    Füge doch ein paar Checks mit IsArray() ein.

    Gruß,
    UEZ

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™