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

  • einführung in autoit ..

    • funkey
    • 12. Dezember 2010 um 07:46

    So:

    Spoiler anzeigen
    [autoit]

    Opt("GuiOnEventMode", 1)

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

    GUICreate("Test")
    GUISetOnEvent(-3, "_Exit")

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

    Global $edit = GUICtrlCreateEdit("", 50, 50)
    Global $button = GUICtrlCreateButton("test", 50, 200)
    GUICtrlSetOnEvent($button, "test")

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

    GUISetState()

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

    While 1
    Sleep(20000)
    WEnd

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

    Func _Exit()
    Exit
    EndFunc

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

    Func test()
    Local $editread = GUICtrlRead($edit)
    MsgBox(0, "test", $editread)
    EndFunc

    [/autoit]

    Und übrigens: Es ist nahezu alles möglich in AutoIt ;)

  • Windows eigenen Progress-Dialog öffnen

    • funkey
    • 11. Dezember 2010 um 21:26
    Zitat von Paule

    Ich blicke immer noch nicht, wie ich damit eine Datei oder mehere kopiere.
    Hast Du ein Beispiel?

    Das ist nur der Windows-Dialog beim Kopieren, verschieben, löschen, downloaden, etc., da kannst du im Hintergrund eigentlich jede x-beliebige Funktion so anpassen, dass sie mit dem Progressbalken zusammenpasst.

    Hier ein Beispiel für einen Download

    Spoiler anzeigen
    [autoit]

    #include <AutoItObject.au3>
    #include <WinAPI.au3>
    #include "IProgressDialog.intfc"

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

    _AutoItObject_StartUp()

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

    Global $FileToDownload = "http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe"
    Global $FileDestination = @ScriptDir & "/autoit-v3-setup.exe"

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

    Global $oDlg = _AutoItObject_ObjCreate($sCLSID_IProgressDialog, $sIID_IProgressDialog, $dtagIProgressDialog)

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

    $oDlg.SetTitle("Downloading...")
    $oDlg.SetAnimation(Number(_WinAPI_GetModuleHandle("shell32.dll")), $AVI_DOWNLOAD)
    $oDlg.SetLine(1, "File Download", 0, 0)
    $oDlg.SetLine(2, "autoit-v3-setup.exe from http://www.autoitscript.com", 0, 0)
    $oDlg.StartProgressDialog(0, 0, $PROGDLG_NOMINIMIZE, 0)

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

    Global $FileSize = InetGetSize($FileToDownload)
    Global $hDownload = InetGet($FileToDownload, $FileDestination, 1, 1)
    Global $Loaded, $TimeConstant = 500 ; 50 Sekunden

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

    Do
    Sleep(50)
    $Loaded = InetGetInfo($hDownload, -1)
    $Canceled = $oDlg.HasUserCancelled()
    $oDlg.SetProgress($Loaded[0] / $FileSize * $TimeConstant, $TimeConstant)
    Until $Canceled[0] = 1 Or $Loaded[2]

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

    InetClose($hDownload)

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

    $oDlg.StopProgressDialog()

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

    If $Loaded[2] Then
    MsgBox(64, "Info", "Datei erfolgreich heruntergeladen")
    Else
    MsgBox(16, "Fehler", "Der Download wurde abgebrochen")
    EndIf

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

    _AutoItObject_Shutdown()

    [/autoit]
  • SB Sprüche

    • funkey
    • 11. Dezember 2010 um 14:12

    Toll gemacht! :thumbup::thumbup:
    War sicher eine Menge Arbeit.

  • Windows eigenen Progress-Dialog öffnen

    • funkey
    • 11. Dezember 2010 um 13:21

    Danke progandy.
    Sieht so aus, als ob ich mich mehr mir AutoItObject befassen müsste. Aber ich habs ja auch so hinbekommen.


    Paule:
    Das hättest du bestimmt selber geschafft!

    Spoiler anzeigen
    [autoit]

    #include <AutoItObject.au3>
    #include <WinAPI.au3>
    #include "IProgressDialog.intfc"

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

    _AutoItObject_StartUp()

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

    OnAutoItExitRegister("_OnExit")
    Func _OnExit()
    _AutoItObject_Shutdown()
    EndFunc

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

    Global $oDlg = _AutoItObject_ObjCreate($sCLSID_IProgressDialog, $sIID_IProgressDialog, $dtagIProgressDialog)

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

    Global $hParent = HWnd(0)
    Global $sTitle = "Downloading..."
    Global $dwFlags = $PROGDLG_NOMINIMIZE
    Global $hInstAnimation = _WinAPI_GetModuleHandle("shell32.dll")
    Global $idAnimation = $AVI_DOWNLOAD
    Global $dwCompleted = 0
    Global $dwTotal = 6000 ;1 Minuten alle 100ms ein Prozent
    Global $dwTimerAction = $PDTIMER_PAUSE
    Global $strCancelMsg = "Der Abbrechen-Button wurde gedrückt ;)"
    Global $dwLineNum = 1
    Global $strText = "Download the whole internet"
    Global $fCompactPath = 0
    Global $pvReserved = 0

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

    $oDlg.SetTitle($sTitle)
    $oDlg.SetAnimation(Number($hInstAnimation), $idAnimation)

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

    $oDlg.SetCancelMsg($strCancelMsg, $pvReserved)

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

    $oDlg.SetLine($dwLineNum, $strText, $fCompactPath, $pvReserved)

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

    $dwLineNum = 2
    $strText = 'From "Internet" to "PC"'

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

    $oDlg.SetLine($dwLineNum, $strText, $fCompactPath, $pvReserved)

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

    $oDlg.StartProgressDialog(Number($hParent), 0, $dwFlags, 0)

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

    AdlibRegister("_CountUp", 100)

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

    Do
    Sleep(10)
    $Canceled = $oDlg.HasUserCancelled()
    Until $Canceled[0] = 1 Or $dwCompleted = $dwTotal
    Sleep(2000)

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

    $oDlg.StopProgressDialog()

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

    Func _CountUp()
    $dwCompleted += 1
    $oDlg.SetProgress($dwCompleted, $dwTotal)
    EndFunc

    [/autoit]
  • Windows eigenen Progress-Dialog öffnen

    • funkey
    • 10. Dezember 2010 um 11:51

    Da heute einer (glaub Matthias) in der Shoutbox gefragt hat, ob man den Windows-Kopier-Dialog öffnen kann, habe ich nach einer Lösung gesucht und bin auch fündig geworden.

    Man benötigt dafür die objbase-UDF von progandy.

    Das ganze könnte manchmal ziemlich nützlich sein.

    Spoiler anzeigen
    [autoit]

    #include "objbase.au3"
    #include <WinAPI.au3>

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

    ;funkey 2010, Dec 10th
    ;http://msdn.microsoft.com/en-us/library/…8(v=VS.85).aspx

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

    Global Const $PROGDLG_NORMAL = 0x00000000 ;default normal progress dlg behavior
    Global Const $PROGDLG_MODAL = 0x00000001 ; the dialog is modal to its hwndParent (default is modeless)
    Global Const $PROGDLG_AUTOTIME = 0x00000002 ; automatically updates the "Line3" text with the "time remaining" (you cant call SetLine3 if you passs this!)
    Global Const $PROGDLG_NOTIME = 0x00000004 ; we dont show the "time remaining" if this is set. We need this if dwTotal < dwCompleted for sparse files
    Global Const $PROGDLG_NOMINIMIZE = 0x00000008 ; Do not have a minimize button in the caption bar.
    Global Const $PROGDLG_NOPROGRESSBAR = 0x00000010 ; Don't display the progress bar
    Global Const $PROGDLG_MARQUEEPROGRESS = 0x00000020 ; Vista and above only
    Global Const $PROGDLG_NOCANCEL = 0x00000040 ; Vista and above only

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

    Global Const $PDTIMER_RESET = 0x00000001
    Global Const $PDTIMER_PAUSE = 0x00000002
    Global Const $PDTIMER_RESUME = 0x00000003

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

    Global Const $AVI_SEARCH = 150
    Global Const $AVI_SEARCH_DOC = 151
    Global Const $AVI_SEARCH_PC = 152
    Global Const $AVI_MOVE = 160
    Global Const $AVI_COPY = 161
    Global Const $AVI_DELETE = 162
    Global Const $AVI_EMPTY_RECYCLEBIN = 163
    Global Const $AVI_DELETE_DIRECT = 164
    Global Const $AVI_COPY_DOC = 165
    Global Const $AVI_SEARCH_IE = 166
    Global Const $AVI_MOVE_OLD = 167
    Global Const $AVI_COPY_OLD = 168
    Global Const $AVI_DELETE_DIRECT_OLD = 169
    Global Const $AVI_DOWNLOAD = 170

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

    Global $CLSID_ProgressDialog = _GUID("{F8383852-FCD3-11d1-A6B9-006097DF5BD4}")
    Global $IID_ProgressDialog = _GUID("{EBBC7C04-315E-11d2-B62F-006097DF5BD4}")

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

    Global $Dialog_vTable = $IUnknown_vTable & _
    "ptr StartProgressDialog;ptr StopProgressDialog;ptr SetTitle;ptr SetAnimation;ptr HasUserCancelled;" & _
    "ptr SetProgress;ptr SetProgress64;ptr SetLine;ptr SetCancelMsg;ptr Timer"

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

    _OLEInitialize()

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

    Global $aObj = _ObjCoCreateInstance($CLSID_ProgressDialog, $IID_ProgressDialog, $Dialog_vTable)

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

    Global $hParent = HWnd(0)
    Global $sTitle = "Kopieren..."
    Global $dwFlags = $PROGDLG_NOMINIMIZE
    Global $hInstAnimation = _WinAPI_GetModuleHandle("shell32.dll")
    Global $idAnimation = $AVI_COPY
    Global $dwCompleted = 0
    Global $dwTotal = 600 ;1 Minuten alle 100ms ein Prozent
    Global $dwTimerAction = $PDTIMER_PAUSE
    Global $strCancelMsg = "Der Abbrechen-Button wurde gedrückt ;)"
    Global $dwLineNum = 1
    Global $strText = "Eine sehr große Datei.dat"
    Global $fCompactPath = 0
    Global $pvReserved = 0

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

    _ObjFuncCall($HRESULT, $aObj, "SetTitle", "wstr", $sTitle)
    _ObjFuncCall($HRESULT, $aObj, "SetAnimation", "handle", $hInstAnimation, "dword", $idAnimation)

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

    _ObjFuncCall($HRESULT, $aObj, "SetCancelMsg", "wstr", $strCancelMsg, "dword", $pvReserved)

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

    _ObjFuncCall($HRESULT, $aObj, "SetLine", "dword", $dwLineNum, "wstr", $strText, "long", $fCompactPath, "dword", $pvReserved)
    $dwLineNum = 2
    $strText = 'Von "Ordner" nach "Ordner_neu"'
    _ObjFuncCall($HRESULT, $aObj, "SetLine", "dword", $dwLineNum, "wstr", $strText, "long", $fCompactPath, "dword", $pvReserved)

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

    _ObjFuncCall($HRESULT, $aObj, "StartProgressDialog", "hwnd", $hParent, "ptr", 0, "dword", $dwFlags, "ptr", 0)

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

    ;~ _ObjFuncCall($HRESULT, $aObj, "Timer", "dword", $dwTimerAction, "dword", $pvReserved)

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

    AdlibRegister("_CountUp", 100)

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

    Do
    Sleep(10)
    $Canceled = _ObjFuncCall($HRESULT, $aObj, "HasUserCancelled")
    Until $Canceled[0] = 1 Or $dwCompleted = $dwTotal
    Sleep(2000)

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

    _ObjFuncCall($HRESULT, $aObj, "StopProgressDialog")
    _OLEUnInitialize()
    DllClose($OLE32)

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

    Func _CountUp()
    $dwCompleted += 1
    _ObjFuncCall($HRESULT, $aObj, "SetProgress", "dword", $dwCompleted, "dword", $dwTotal)
    EndFunc ;==>_CountUp

    [/autoit]

    Dateien

    objbase.au3 10,59 kB – 502 Downloads
  • Wert in GuiCtrlCreateCombo nicht veränderbar

    • funkey
    • 9. Dezember 2010 um 16:10

    Nimm den Style $CBS_DROPDOWNLIST für das Combo-Control.

  • Greenhorn hat Geburtstag.

    • funkey
    • 8. Dezember 2010 um 08:24

    Alles Gute zum Geburtstag Greenhorn!
    [Blockierte Grafik: http://gassermadness.com/ray/ray2/GreenHorn.jpg]

  • Happy Birthday "AutoIt.de"

    • funkey
    • 8. Dezember 2010 um 08:16

    Happy Birthday Lieblingsforum!

  • Änderung der Spaltenbreite eines Listviews erkennen

    • funkey
    • 7. Dezember 2010 um 19:55

    Probier mal $iCode mit -12

  • _GetCOMObjectControls - COM-Objekte für die Gui suchen

    • funkey
    • 6. Dezember 2010 um 19:31

    Hier wieder mal eine kleine Funktion, um COM-Objekte zu finden, welche dann in einer Gui dargestellt werden können.
    Hab leider noch wenig Zeit gehabt, um die Controls zu testen, hoffe aber, dass das eine oder andere nützliche Control zum Vorschein kommt.

    mfg funkey


    Spoiler anzeigen
    [autoit]

    #include <Array.au3>

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

    $aCOMObjects = _GetCOMObjectControls()
    _ArrayDisplay($aCOMObjects, "All")

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

    $aCOMObjects = _GetCOMObjectControls("Control0")
    _ArrayDisplay($aCOMObjects, "Control0")

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

    GUICreate("COM-Test", 620, 500)
    $oFileSearch = ObjCreate("CompatUI.SelectFile.1")
    $oSlider1 = ObjCreate("MSComctlLib.Slider.2")
    $oSlider2 = ObjCreate("Control0.Slider.1")
    $oCurve = ObjCreate("Control0.CurveEdit.1")
    $oStop = ObjCreate("Control0.StopButton.1")
    $oUndo = ObjCreate("Control0.UndoButton.1")

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

    GUICtrlCreateObj($oFileSearch, 10, 10, 600, 25)
    GUICtrlCreateObj($oSlider1, 10, 40, 200, 25)
    GUICtrlCreateObj($oSlider2, 10, 70, 20, 350)
    GUICtrlCreateObj($oCurve, 40, 70, 200, 200)
    GUICtrlCreateObj($oStop, 250, 70, 20, 20)
    GUICtrlCreateObj($oUndo, 280, 70, 20, 20)

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

    GUISetState()

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

    Do
    Sleep(10)
    Until GUIGetMsg() = -3

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

    Func _GetCOMObjectControls($sFilter = "")
    ;funkey
    Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
    Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ClassicCOMClassSetting where Control = True AND ProgId Like '%" & $sFilter & "%'", "WQL", 48)
    If Not IsObj($colItems) Then Return SetError(1, 0, "")
    Local $sRet
    For $objItem In $colItems
    $sRet &= $objItem.ProgId & @TAB
    $sRet &= $objItem.Caption & @CR
    Next
    Local $aTemp = StringSplit($sRet, @CR, 2)
    Local $aRet[UBound($aTemp) - 1][2]
    For $i = 0 To UBound($aTemp) - 2
    $aRet[$i][0] = StringLeft($aTemp[$i], StringInStr($aTemp[$i], @TAB, 0, -1) - 1)
    $aRet[$i][1] = StringTrimLeft($aTemp[$i], StringInStr($aTemp[$i], @TAB, 0, -1))
    Next
    Return $aRet
    EndFunc ;==>_GetCOMObjectControls

    [/autoit]
  • Happy Birthday Pee und Funkey

    • funkey
    • 5. Dezember 2010 um 10:32

    Auch ich möchte mich recht herzlich bei euch bedanken. Hatte gestern eine tolle Party ( :party: ) in meinem neuen Haus, und jetzt bin ich froh, dass alles vorbei ist. Ich hoffe auch, dass das kommende Jahr etwas ruhiger wird.
    peethebee : Nachträglich von mir auch noch alles Gute!!

  • UDF: Windows Explorer fernsteuern

    • funkey
    • 2. Dezember 2010 um 20:52

    Jetzt mal eine ganz blöde Frage! Warum machst du das ganze über den Explorer? Du kannst doch auch Dateien direkt mit AutoIt einsortieren, z.B. mit FileMove.
    Man kann ja eine einfache Gui machen, wo man den Quell und den Zielpfad einstellt, und dann wars das schon. Was hast du eigentlich genau vor?

  • Wert wird nicht in Textfeld übernommen

    • funkey
    • 2. Dezember 2010 um 13:34
    Zitat
    [autoit]

    $volumesize = InputBox("TrueCrypt Volume Größe", "Geben Sie die Volume Größe an.")
    winwaitclose("TrueCrypt Volume Größe")
    ControlSetText("TrueCrypt Volume Creation Wizard", "Volume Size", "[CLASS:#32770; INSTANCE:1]", $volumesize)

    [/autoit]

    Die Zeile mit WinWaitClose brauchst du nicht.
    "[CLASS:#32770; INSTANCE:1]": Diese Klasse sieht eher aus wie eine Fensterklasse und nicht die eines Controls. Ich würde eher auf sowas wie 'Edit' tippen, hab aber kein TrueCrypt installiert, um es zu testen.

  • transparents Bild

    • funkey
    • 30. November 2010 um 20:57
    Spoiler anzeigen
    [autoit]

    $hGui = GUICreate("Test", 200, 200)
    $hChildGui = GUICreate("Child", 180, 180, 10, 10, 0x80000000, 0x00000040, $hGui)
    $Pic1 = GUICtrlCreatePic(@WindowsDir & "\Angler.bmp", 0, 0, 180, 180)

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

    WinSetTrans($hChildGui, "", 0)
    GUISetState(@SW_SHOW, $hChildGui)
    GUISetState(@SW_SHOW, $hGui)

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

    For $i = 0 To 255
    WinSetTrans($hChildGui, "", $i)
    Next

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

    Do
    Until GUIGetMsg() = -3

    [/autoit]
  • transparents Bild

    • funkey
    • 30. November 2010 um 20:22

    Weiß nicht genau was du meinst, aber ich denke du brauchst eine ChildGui und WinSetTrans.

  • Excel: immer 3 zeilen auswählen, dann kopieren und in anderes Tabellenblatt transformiert einfügen

    • funkey
    • 29. November 2010 um 15:17

    Hier mal ein Beispiel:

    Spoiler anzeigen
    [autoit]

    #Include <Excel.au3>
    #Include <Array.au3>

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

    $xlsFile = @DesktopDir & "\Test.xlsx"
    $eintraege = 12
    $zusammengehoerig = 3

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

    $oExcel = _ExcelBookOpen($xlsFile)

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

    Local $aExcel[$zusammengehoerig]

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

    For $i = 0 To $eintraege - 1
    For $j = 1 To $zusammengehoerig
    $aExcel[$j - 1] = _ExcelReadCell($oExcel, $i * $zusammengehoerig + $j)
    Next
    _ExcelSheetActivate($oExcel, "Tabelle2")
    _ExcelWriteArray($oExcel, 1, $i + 1, $aExcel, 1)
    _ExcelSheetActivate($oExcel, "Tabelle1")
    Next

    [/autoit]

    Dateien

    Test.xlsx.rar 6,88 kB – 306 Downloads
  • ComPorts (serielle Ports) und dazugehörige Namen auflisten (WMI)

    • funkey
    • 29. November 2010 um 14:48

    Hier eine kleine Funktion, die alle vorhandenen COM-Ports auflistet.
    Vllt ist das ja mal für wen ganz nützlich.

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>

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

    Local $aComPort = _GetComPorts()
    _ArrayDisplay($aComPort)

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

    Local $sComPort = _GetComPorts("com1")
    If @error Then
    MsgBox(16, "Error " & @error, "No matching COM port found.")
    Else
    ConsoleWrite($sComPort & @CRLF)
    EndIf

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GetComPorts
    ; Description ...: Lists all com ports and their names to a 2D array, or returns only the name of the given com port
    ; Syntax.........: _GetComPorts($sComPort = "")
    ; Parameters ....: $sComPort - Either "" (blank) for array or a string like "1" or "COM1"
    ; Return values .: Success - Either an array or a string (depends on $sComPort)
    ; Failure - -1, sets @error
    ; |1 - No matching COM port found.
    ; Author ........: funkey
    ; Date ..........: 2010, Nov 29th
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ; ===============================================================================================================================
    Func _GetComPorts($sComPort = "")
    Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
    Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity WHERE Name LIKE '%(COM%" & StringReplace($sComPort, "COM", "") & ")'", "WQL", 48)
    Local $sRet = ""
    For $objItem In $colItems
    $sRet &= $objItem.Name & @CR
    Next
    If $sRet = "" Then Return SetError(1, 0, "")
    If $sComPort <> "" Then
    If Not StringInStr($sRet, $sComPort) Or Not StringIsInt(StringRight($sComPort, 1)) Then Return SetError(1, 0, "")
    $sRet = StringTrimRight($sRet, StringLen("COM" & StringReplace($sComPort, "COM", "")) + 4)
    Return $sRet
    EndIf
    Local $aTemp = StringSplit($sRet, @CR, 2)
    Local $aRet[UBound($aTemp) - 1][2]
    For $i = 0 To UBound($aTemp) - 2
    $aRet[$i][0] = StringTrimRight(StringTrimLeft($aTemp[$i], StringInStr($aTemp[$i], "(", 0, -1)), 1)
    $aRet[$i][1] = StringLeft($aTemp[$i], StringInStr($aTemp[$i], "(", 0, -1) - 2)
    Next
    Return $aRet
    EndFunc ;==>_GetComPorts

    [/autoit]
  • Fenster schließen geht nicht

    • funkey
    • 29. November 2010 um 11:22

    So sollte es doch eigentlich gehen?

    [autoit]

    ControlClick ("MicroStation V8 XM Edition Software Prerequisite Pack", "Der Installationsvorgang ist beendet", "Button1")

    [/autoit]
  • Happy Birthday, Der_Doc

    • funkey
    • 28. November 2010 um 09:32

    Alles Gute zum Geburtstag, Der_Doc!
    [Blockierte Grafik: http://th161.photobucket.com/albums/t228/yessaru/th_happy_birthday-2.gif]

  • Happy Birthday BugFix!

    • funkey
    • 28. November 2010 um 09:30

    Auch von mir alles, alles Gute zum Geburtstag, dem bestem Bugfixer aller Zeiten!! :thumbup:
    Feier schön! :party:

    [Blockierte Grafik: http://th50.photobucket.com/albums/f333/earthtwinkle/Happy%20Birthday/th_happy-birthday-054.gif]

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™