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

Beiträge von Xenobiologist

  • Listview sortieren nach anklicken einer Spalte

    • Xenobiologist
    • 21. August 2014 um 10:27

    Für die andere Frage, guck mal hier :_GUICtrlListView_RegisterSortCallBack

  • Programm zum wechseln des Soundausgangs bei einer Asus Xonar Essence STX - Richtiger Befehl?

    • Xenobiologist
    • 6. August 2014 um 12:10

    Versuch mal ohne upx zu kompilieren, oder mach eine false-positive Meldung bei dem AV.

  • Programm zum wechseln des Soundausgangs bei einer Asus Xonar Essence STX - Richtiger Befehl?

    • Xenobiologist
    • 6. August 2014 um 11:31

    Ja, ein Skript reicht. Ich würde einfach Teamspeak durch dein Skript starten.
    Ja, wenn du ein Schleife machst, die sagen wir alle 1000 ms überprüft ob der Prozess noch da ist (ProcessExists) dann erzeugt das etwas CPU-Last, aber die solltest du nicht bemerken.
    Falls die ID sich ändert, dann kannst du es auch mal versuchen ohne die ID. Also mit "".
    Warum a3x Dateien, warum nicht exe?

  • Programm zum wechseln des Soundausgangs bei einer Asus Xonar Essence STX - Richtiger Befehl?

    • Xenobiologist
    • 6. August 2014 um 08:56

    Ich würde sagen, so ist es schon besser.
    Aber du kannst natürlich auslesen, was gerade ausgewählt ist und dann mit ControlSend auch up und down an das Control senden.
    Musst du mal ein wenig ausprobieren.

  • CMD, StringSplit und die Sache mit dem sauber programmieren

    • Xenobiologist
    • 5. August 2014 um 11:56

    Siht doch okay aus. Hier noch ne Variante:

    Spoiler anzeigen
    [autoit]

    #include <Constants.au3>
    #include <Array.au3>
    #include <StringConstants.au3>
    _GetHostedNetworkSetting()

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

    Func _GetHostedNetworkSetting()
    ;Wir wollen hier Modus, SSID-Name, Maximale Clientanzahl, Authentifizierung, Verschlüsselung.
    Local $sOutput = _CMDRead("netsh wlan show hostednetwork") ;Ausführen des Consolenbefehls
    Local $re = StringRegExp($sOutput, '\:\s+(.*)', 3)
    _ArrayDisplay($re) ;Fertiger Array
    Return $re
    EndFunc

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

    Func _CMDRead($command)
    Local $line

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

    $CMD = Run(@ComSpec & " /c " & $command, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

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

    While 1
    $line &= StdoutRead($CMD)
    If @error Then ExitLoop
    Wend
    Return $line
    EndFunc

    [/autoit]
  • Suchfunktion in meine GUI integrieren

    • Xenobiologist
    • 14. Mai 2014 um 17:00

    Es gäbe viele Möglichkeiten.
    Z.B. den ersten Treffer markieren und dort hinspringen. Bei Klick zum nächsten Treffer springen.
    Vorteil, die Liste können immer bestehen bleiben.

    Beim Filtern müsste die Listview neuerstellt oder Items ausgeblendet werden.

    Wird immer über alle Spalten gesucht?
    Was möchtest du denn?

  • Bild in ein geschütztes Verzeichnis kopieren

    • Xenobiologist
    • 26. Februar 2014 um 09:43

    Also RunAs mit AutoIt Befehlen wird nicht funktionieren, denke ich.
    Du musst entweder deine Skript als Admin ausführen.
    Siehe : #RequireAdmin

    Oder ein Programm (z.B. eine exe Datei) per RunAs ausrufen.

    Das zweite wäre glaube ich für dich am einfachsten.

    Also eine AutoScript.exe erstellen, die einfach nur das Kopieren macht.
    Dann eine Zweite, die die erste mit RunAs ... aufruft.

  • Access (.accdb) Datenbank auslesen etc.

    • Xenobiologist
    • 25. Februar 2014 um 16:19

    Im Englischen Forum gibt es eine UDF dazu. (Water)
    (leider ist es gerade down)

  • Erkennungsfunktion

    • Xenobiologist
    • 25. Februar 2014 um 16:18

    ControlGetText
    StringInStr
    ControlSend oder ControlSetText

    in der Form, oder wenn jemand etwas tippt?

  • Problem: 2 Browserfenster sollen auf 2 Monitoren beim Starten fullscreen öffnen

    • Xenobiologist
    • 29. November 2013 um 11:26

    Hier eine kleine Hilfe, den Rest schaffst du allein.

    Spoiler anzeigen
    [autoit]

    ; 2 Urls auf 2 Monitoren
    #Region ;************ Includes ************
    #Include <Array.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>
    #EndRegion ;************ Includes ************

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

    Global $url = 'www.autoit.de'
    Global $url1 = 'www.autoitscript.com'
    Global $aScreenResolution

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

    $aScreenResolution = _DesktopDimensions()

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

    ConsoleWrite("Example of _DesktopDimensions():" & @CRLF & _
    "Number of monitors = " & $aScreenResolution[1] & @CRLF & _
    "Primary Width = " & $aScreenResolution[2] & @CRLF & _
    "Primary Height = " & $aScreenResolution[3] & @CRLF & _
    "Secondary Width = " & $aScreenResolution[4] & @CRLF & _
    "Secondary Height = " & $aScreenResolution[5] & @CRLF)

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

    $pid = Run('"c:\Program Files (x86)\Mozilla Firefox\firefox.exe "' & $url)
    ConsoleWrite($pid & ' ' & ProcessExists('firefox.exe')& @CRLF)
    Sleep(1500)
    $re = _WinGetHandleByPID(ProcessExists('firefox.exe'))
    ;~ ConsoleWrite(@error & @CRLF)
    ;~ _ArrayDisplay($re)
    WinMove($re[1][1], '', 100, 100) ; an Position 100, 100 verschieben
    Sleep(1000)
    WinMove($re[1][1], '', $aScreenResolution[2], 0)

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

    ; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
    ; #FUNCTION# ====================================================================================================================
    ; Name ..........: _DesktopDimensions
    ; Description ...: Returns an array containing information about the primary and virtual monitors.
    ; Syntax ........: _DesktopDimensions()
    ; Return values .: Success - Returns a 6-element array containing the following information:
    ; $aArray[0] = Number of elements.
    ; $aArray[1] = Total number of monitors.
    ; $aArray[2] = Width of the primary monitor.
    ; $aArray[3] = Height of the primary monitor.
    ; $aArray[4] = Total width of the desktop including the width of multiple monitors. Note: If no secondary monitor this will be the same as $aArray[2].
    ; $aArray[5] = Total height of the desktop including the height of multiple monitors. Note: If no secondary monitor this will be the same as $aArray[3].
    ; Author ........: guinness
    ; Remarks .......: WinAPI.au3 must be included i.e. #include <winapi.au3>
    ; Related .......: @DesktopWidth, @DesktopHeight, _WinAPI_GetSystemMetrics
    ; Example .......: Yes
    ; ===============================================================================================================================
    Func _DesktopDimensions()
    Local $aReturn[6] = [5, _
    _WinAPI_GetSystemMetrics($SM_CMONITORS), _ ; Number of monitors.
    _WinAPI_GetSystemMetrics($SM_CXSCREEN), _ ; Width or Primary monitor.
    _WinAPI_GetSystemMetrics($SM_CYSCREEN), _ ; Height or Primary monitor.
    _WinAPI_GetSystemMetrics($SM_CXVIRTUALSCREEN), _ ; Width of the Virtual screen.
    _WinAPI_GetSystemMetrics($SM_CYVIRTUALSCREEN)] ; Height of the Virtual screen.
    Return $aReturn
    EndFunc ;==>_DesktopDimensions

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

    Func _WinGetHandleByPID($vProcess, $nShow = 1)
    ; Get Window Handle by PID
    ; Author Hubertus
    ; derived from Smoke_N's script with the same name,
    ; but to handle more than one process with the same name
    ; and to return handle of newest window ($nShow = 2).
    ;
    ; $vProcess = Processname(e.g. "Notepad.exe") or Processnumber(e.g. 4711 )
    ; $nShow = -1 "All (Visble or not)", $nShow = 0 "Not Visible Only", $nShow = 1 "Visible Only", $nShow = 2 "return handle of newest window "
    ; @error = 0 Returns array of matches. Array[0][0] and @extended shows number of matches.
    ; @error = 0 and $nShow = 2 return handle of newest window
    ; Array[n][0] shows windows title. Array[n][1] shows windows handle. n = 1 to @extended
    ; @error = 1 Process not found.
    ; @error = 2 Window not found.
    If Not ProcessExists($vProcess) Then Return SetError(1, 0, 0) ; no matching process
    Local $iWinList, $aWinList = WinList()
    Local $iResult, $aResult[UBound($aWinList)][2]
    Local $iProcessList, $aProcessList = ProcessList($vProcess)
    If $aProcessList[0][0] = 0 Then Local $aProcessList[2][2] = [[1, 0],["", $vProcess]]
    For $iWinList = 1 To $aWinList[0][0]
    For $iProcessList = 1 To $aProcessList[0][0]
    If WinGetProcess($aWinList[$iWinList][1]) = $aProcessList[$iProcessList][1] Then
    If $nShow > -1 And Not $nShow = (2 = BitAND(WinGetState($aWinList[$iWinList][1]), 2)) Then ContinueLoop
    $iResult += 1
    $aResult[$iResult][0] = $aWinList[$iWinList][0]
    $aResult[$iResult][1] = $aWinList[$iWinList][1]
    EndIf
    Next
    Next
    If $iResult = 0 Then Return SetError(2, 0, 0) ; no window found
    ReDim $aResult[$iResult + 1][2]
    $aResult[0][0] = $iResult
    If $nShow = 2 Then Return SetError(0, $iResult, $aResult[1][1])
    Return SetError(0, $iResult, $aResult)
    EndFunc ;==>_WinGetHandleByPID

    [/autoit]
  • Abfrageproblem von einem Kontextmenü

    • Xenobiologist
    • 23. August 2013 um 12:12

    Gib dir doch mal mit consoleWrite aus, welche Werte in deinen Vars stehen und wie weit du kommst.
    Springt der überhaupt in Zeile 192 durch CW bestätigen lassen und dann weiter ...
    Ergebnis des Ping ...
    $whoIsWho[$l][1]
    $whoIsWho[$l][0]
    $realIP

  • Ca. 500 € Laptop Kaufberatung

    • Xenobiologist
    • 15. August 2013 um 18:15

    Vielen DANK an alle!

  • Ca. 500 € Laptop Kaufberatung

    • Xenobiologist
    • 14. August 2013 um 16:18

    Formulieren wir es anders. Er möchte für ca. 500 bis maximal 600 € das Optimum herausholen.
    Ja Minimum 15 ".
    Nein, sonst keine Wünsche.

    http://www.amazon.de/S56CM-XX079H-Ultrabook-Intel-3317U-NVIDIA/dp/B0099XG2V0/ref=sr_1_1?s=computers&ie=UTF8&qid=1376489778&sr=1-1&keywords=notebook+ssd+15+zoll

  • Ca. 500 € Laptop Kaufberatung

    • Xenobiologist
    • 14. August 2013 um 15:43

    Hallo zusammen,

    ein Freund bat mich um Rat für den Kauf eines Notebooks.
    Er nutzt es fast nur für Office & surfen etc. Braucht also keine schnelle Grafikkarte.
    15 " Display.
    Einen Nummernblock
    Robust (da öfter mal im Rucksack)
    Preis ca. 500 €
    Betriebssystem hat er bereits.

    Habt ihr einen guten Vorschlag?

    Bin über Hilfe dankbar.

    So long,
    Mega

    Vorschlag 1: http://www.lapstore.de/a.php/shop/lap…64-A26_-_Campus
    Vorschlag 2: http://www.amazon.de/S56CM-XX079H-Ultrabook-Intel-3317U-NVIDIA/dp/B0099XG2V0/ref=sr_1_1?s=computers&ie=UTF8&qid=1376489778&sr=1-1&keywords=notebook+ssd+15+zoll

  • USB Spannung absenken via Software / Autoit möglich ?

    • Xenobiologist
    • 6. August 2013 um 15:42

    Jepp, aus Münster.
    Danke Oscar, damit sollte die Frage erledigt sein.
    Geht nicht, gibt es halt manchmal doch :D

  • USB Spannung absenken via Software / Autoit möglich ?

    • Xenobiologist
    • 5. August 2013 um 13:56

    Guck doch mal ob du es ohne Autoit schaffst.
    Wenn ja, dann guckst du ob das was du tun musstest automatisieren kannst.

  • Einlesen einer CSV-Datei

    • Xenobiologist
    • 5. August 2013 um 13:24

    Texte sollten in "" stehen in denen dann das Trennzeichen vorkommen darf.

    Spoiler anzeigen
    [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _ParseCSV
    ; Description ...: Reads a CSV-file
    ; Syntax.........: _ParseCSV($sFile, $sDelimiters=',', $sQuote='"', $iFormat=0)
    ; Parameters ....: $sFile - File to read or string to parse
    ; $sDelimiters - [optional] Fieldseparators of CSV, mulitple are allowed (default: ,;)
    ; $sQuote - [optional] Character to quote strings (default: ")
    ; $iFormat - [optional] Encoding of the file (default: 0):
    ; |-1 - No file, plain data given
    ; |0 or 1 - automatic (ASCII)
    ; |2 - Unicode UTF16 Little Endian reading
    ; |3 - Unicode UTF16 Big Endian reading
    ; |4 or 5 - Unicode UTF8 reading
    ; Return values .: Success - 2D-Array with CSV data (0-based)
    ; Failure - 0, sets @error to:
    ; |1 - could not open file
    ; |2 - error on parsing data
    ; |3 - wrong format chosen
    ; Author ........: ProgAndy
    ; Modified.......:
    ; Remarks .......:
    ; Related .......: _WriteCSV
    ; Link ..........:
    ; Example .......:
    ; ===============================================================================================================================
    Func _ParseCSV($sFile, $sDelimiters=',;', $sQuote='"', $iFormat=0)
    Local Static $aEncoding[6] = [0, 0, 32, 64, 128, 256]
    If $iFormat < -1 Or $iFormat > 6 Then
    Return SetError(3,0,0)
    ElseIf $iFormat > -1 Then
    Local $hFile = FileOpen($sFile, $aEncoding[$iFormat]), $sLine, $aTemp, $aCSV[1], $iReserved, $iCount
    If @error Then Return SetError(1,@error,0)
    $sFile = FileRead($hFile)
    FileClose($hFile)
    EndIf
    If $sDelimiters = "" Or IsKeyword($sDelimiters) Then $sDelimiters = ',;'
    If $sQuote = "" Or IsKeyword($sQuote) Then $sQuote = '"'
    $sQuote = StringLeft($sQuote, 1)
    Local $srDelimiters = StringRegExpReplace($sDelimiters, '[\\\^\-\[\]]', '\\\0')
    Local $srQuote = StringRegExpReplace($sQuote, '[\\\^\-\[\]]', '\\\0')
    Local $sPattern = StringReplace(StringReplace('(?m)(?:^|[,])\h*(["](?:[^"]|["]{2})*["]|[^,\r\n]*)(\v+)?',',', $srDelimiters, 0, 1),'"', $srQuote, 0, 1)
    Local $aREgex = StringRegExp($sFile, $sPattern, 3)
    If @error Then Return SetError(2,@error,0)
    $sFile = '' ; save memory
    Local $iBound = UBound($aREgex), $iIndex=0, $iSubBound = 1, $iSub = 0
    Local $aResult[$iBound][$iSubBound]
    For $i = 0 To $iBound-1
    Select
    Case StringLen($aREgex[$i])<3 And StringInStr(@CRLF, $aREgex[$i])
    $iIndex += 1
    $iSub = 0
    ContinueLoop
    Case StringLeft(StringStripWS($aREgex[$i], 1),1)=$sQuote
    $aREgex[$i] = StringStripWS($aREgex[$i], 3)
    $aResult[$iIndex][$iSub] = StringReplace(StringMid($aREgex[$i], 2, StringLen($aREgex[$i])-2), $sQuote&$sQuote, $sQuote, 0, 1)
    Case Else
    $aResult[$iIndex][$iSub] = $aREgex[$i]
    EndSelect
    $aREgex[$i]=0 ; save memory
    $iSub += 1
    If $iSub = $iSubBound Then
    $iSubBound += 1
    ReDim $aResult[$iBound][$iSubBound]
    EndIf
    Next
    If $iIndex = 0 Then $iIndex=1
    ReDim $aResult[$iIndex][$iSubBound]
    Return $aResult
    EndFunc

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _WriteCSV
    ; Description ...: Writes a CSV-file
    ; Syntax.........: _WriteCSV($sFile, Const ByRef $aData, $sDelimiter, $sQuote, $iFormat=0)
    ; Parameters ....: $sFile - Destination file
    ; $aData - [Const ByRef] 0-based 2D-Array with data
    ; $sDelimiter - [optional] Fieldseparator (default: ,)
    ; $sQuote - [optional] Quote character (default: ")
    ; $iFormat - [optional] character encoding of file (default: 0)
    ; |0 or 1 - ASCII writing
    ; |2 - Unicode UTF16 Little Endian writing (with BOM)
    ; |3 - Unicode UTF16 Big Endian writing (with BOM)
    ; |4 - Unicode UTF8 writing (with BOM)
    ; |5 - Unicode UTF8 writing (without BOM)
    ; Return values .: Success - True
    ; Failure - 0, sets @error to:
    ; |1 - No valid 2D-Array
    ; |2 - Could not open file
    ; Author ........: ProgAndy
    ; Modified.......:
    ; Remarks .......:
    ; Related .......: _ParseCSV
    ; Link ..........:
    ; Example .......:
    ; ===============================================================================================================================
    Func _WriteCSV($sFile, Const ByRef $aData, $sDelimiter=',', $sQuote='"', $iFormat=0)
    Local Static $aEncoding[6] = [2, 2, 34, 66, 130, 258]
    If $sDelimiter = "" Or IsKeyword($sDelimiter) Then $sDelimiter = ','
    If $sQuote = "" Or IsKeyword($sQuote) Then $sQuote = '"'
    Local $iBound = UBound($aData, 1), $iSubBound = UBound($aData, 2)
    If Not $iSubBound Then Return SetError(2,0,0)
    Local $hFile = FileOpen($sFile, $aEncoding[$iFormat])
    If @error Then Return SetError(2,@error,0)
    For $i = 0 To $iBound-1
    For $j = 0 To $iSubBound-1
    FileWrite($hFile, $sQuote & StringReplace($aData[$i][$j], $sQuote, $sQuote&$sQuote, 0, 1) & $sQuote)
    If $j < $iSubBound-1 Then FileWrite($hFile, $sDelimiter)
    Next
    FileWrite($hFile, @CRLF)
    Next
    FileClose($hFile)
    Return True
    EndFunc

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

    ; === EXAMPLE ===================================================
    ;~ #include<Array.au3>
    ;~ $aResult = _ParseCSV(@ScriptDir & '\test.csv', "\", '$', 4)
    ;~ _ArrayDisplay($aResult)
    ;~ _WriteCSV(@ScriptDir & '\written.csv', $aResult, ',', '"', 5)
    ; ===============================================================

    [/autoit]
  • Songliste bearbeiten

    • Xenobiologist
    • 29. Juli 2013 um 13:24

    Hallo, nicht das es mit Autoit schwierig wäre dein Ziel umzusetzen, aber warum machst du es nicht mit Excel?
    In Excel dauert es 10 Sekunden und du bist fertig. 8o

  • Das etwas andere Problem.

    • Xenobiologist
    • 26. Juli 2013 um 15:55

    Hab gerade mal etwas probiert. So ist es bei mir gleich schnell

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.8.1
    Author: ThirtySix

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

    Script Function:
    MouseMove

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

    #ce ----------------------------------------------------------------------------

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

    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Misc.au3>

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

    Opt("GuiOnEventMode", 1)

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

    #region ### START Koda GUI section ### Form=
    $MouseMove = GUICreate("MouseMove", 227, 124, 461, 286)
    GUISetBkColor(0x9DB9EB)

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

    $Done = GUICtrlCreateButton("Done", 16, 14, 75, 25)
    $Info = GUICtrlCreateButton("Info", 16, 78, 75, 25)

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

    $PressedKey = GUICtrlCreateCombo("", 104, 16, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
    GUICtrlSetData(-1, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
    GUICtrlSendMsg($PressedKey, 0x1703, 0, "Function")

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

    $PosDir = GUICtrlCreateCombo("", 104, 48, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
    GUICtrlSetData(-1, "Up|Down|Left|Right|Combo")
    GUICtrlSendMsg($PosDir, 0x1703, 0, "Direction")

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

    $Far = GUICtrlCreateCombo("", 104, 80, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE))
    GUICtrlSetData(-1, "1|2|5|10|25|50|75|100|150|250|350|500|750|1000|2000|5000|")
    GUICtrlSendMsg($Far, 0x1703, 0, "Distance")

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

    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    GUICtrlSetOnEvent($Done, "_Done")
    GUICtrlSetOnEvent($Info, "_Info")

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

    Global $WKey, $AKey, $SKey, $DKey, $UpKey, $DownKey, $LeftKey, $RightKey, $xKey, $Key, $Dir, $pos, $x, $y, $DLL = DllOpen("user32.dll")

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

    While 1
    ;~ If _IsPressed($xKey, $DLL) Then
    ;~ $pos = MouseGetPos()
    ;~ If $Dir = "Up" Or $Dir = "Left" Then
    ;~ MouseMove($pos[0] - $x, $pos[1] - $y)
    ;~ EndIf
    ;~ If $Dir = "Down" Or $Dir = "Right" Then
    ;~ MouseMove($pos[0] + $x, $pos[1] + $y)
    ;~ EndIf
    ;~ EndIf

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

    If _IsPressed($WKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0], $pos[1] - $y, 1)
    ConsoleWrite('! W' & $y & @CRLF)
    EndIf
    If _IsPressed($AKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0] - $x, $pos[1], 1)
    ConsoleWrite('! S' & @CRLF)
    EndIf
    If _IsPressed($SKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0], $pos[1] + $y, 1)
    ConsoleWrite('! A' & $y & @CRLF)
    EndIf
    If _IsPressed($DKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0] + $x, $pos[1], 1)
    ConsoleWrite('! D' & $x & @CRLF)
    EndIf

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

    If _IsPressed($UpKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0], $pos[1] - $y)
    EndIf
    If _IsPressed($LeftKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0] - $x, $pos[1])
    EndIf
    If _IsPressed($DownKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0], $pos[1] + $y)
    EndIf
    If _IsPressed($RightKey, $DLL) Then
    $pos = MouseGetPos()
    MouseMove($pos[0] + $x, $pos[1])
    EndIf
    WEnd

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

    Func _Done()
    If GUICtrlRead($Done) = "Done" Then
    If GUICtrlRead($PressedKey) = "" Or GUICtrlRead($PosDir) = "" Or GUICtrlRead($Far) = "" Then
    MsgBox(0, "error", "First: Setup" & @CRLF & "Then: Done")
    Else
    $Key = GUICtrlRead($PressedKey)
    $Dir = GUICtrlRead($PosDir)
    $Farcheck = GUICtrlRead($Far)
    GUICtrlSetData($Done, "Reset")

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

    If $Key = "M1" Then $xKey = 01
    If $Key = "M2" Then $xKey = 02
    If $Key = "M3" Then $xKey = 04
    If $Key = "Shift" Then $xKey = 10
    If $Key = "CTRL" Then $xKey = 11

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

    If $Key = "W" Then $xKey = 57
    If $Key = "A" Then $xKey = 41
    If $Key = "S" Then $xKey = 53
    If $Key = "D" Then $xKey = 44

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

    If $Key = "Up" Then $xKey = 26
    If $Key = "Down" Then $xKey = 28
    If $Key = "Left" Then $xKey = 25
    If $Key = "Right" Then $xKey = 27

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

    If $Key = "Combo WASD" Then
    $WKey = 57
    $AKey = 41
    $SKey = 53
    $DKey = 44
    GUICtrlSetData($PosDir, "Combo")
    $Dir = "ALL"
    EndIf

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

    If $Key = "Combo ARROW" Then
    $UpKey = 26
    $DownKey = 28
    $LeftKey = 25
    $RightKey = 27
    GUICtrlSetData($PosDir, "Combo")
    $Dir = "ALL"
    EndIf

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

    If $Dir = "Up" Or $Dir = "Down" Then $y = $Farcheck
    If $Dir = "Left" Or $Dir = "Right" Then $x = $Farcheck

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

    If $Dir = "ALL" Then
    $x = $Farcheck
    $y = $Farcheck
    EndIf

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

    GUICtrlSetState($PosDir, $GUI_DISABLE)
    GUICtrlSetState($PressedKey, $GUI_DISABLE)
    GUICtrlSetState($Far, $GUI_DISABLE)

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

    ;~ MsgBox(0,"",$WKey&"=W "&$AKey&"=A "&$SKey&"=S "&$DKey&"=D "&$UpKey&"=up "&$DownKey&"=down "&$LeftKey&"=left "&$RightKey&"=right "&$xKey&"=xkey "&$Key&"=key "&$Dir&"=dir "&$x&"=x "&$y&"=y "&$Farcheck&"=FC")
    EndIf
    Else
    $x = ""
    $y = ""
    $Key = ""
    $WKey = ""
    $AKey = ""
    $SKey = ""
    $DKey = ""
    $UpKey = ""
    $DownKey = ""
    $LeftKey = ""
    $RightKey = ""
    $Dir = ""
    $xKey = ""
    $Farcheck = ""
    GUICtrlSetData($Done, "Done")
    GUICtrlSetData($PressedKey, "")
    GUICtrlSetData($PressedKey, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
    GUICtrlSetData($PosDir, "")
    GUICtrlSetData($PosDir, "Up|Down|Left|Right|Combo")
    GUICtrlSetData($Far, "")
    GUICtrlSetData($Far, "1|2|5|10|25|50|75|100|150|250|350|500|750|1000|2000|5000|")
    GUICtrlSetState($PosDir, $GUI_ENABLE)
    GUICtrlSetState($PressedKey, $GUI_ENABLE)
    GUICtrlSetState($Far, $GUI_ENABLE)
    EndIf
    EndFunc ;==>_Done

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

    Func _Info()
    MsgBox(0, "MouseMove", "Coded by ThirtySix")
    EndFunc ;==>_Info

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

    Func _Exit()
    DllClose($DLL)
    Exit
    EndFunc ;==>_Exit

    [/autoit]
  • MsgBox ohne Fokus

    • Xenobiologist
    • 15. Juli 2013 um 08:56

    Ja, es gibt bereits eine MsgBoxEx Version im englischen Forum.
    Aber ein einfachsten ist es, eine kleine eigene GUI zu bauen.
    Ggf. würde ich mir die TOAST UDF von Melba auch mal ansehen.

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™