mauszeiger ändern

  • hey ho
    hab gestern so übercooooooles programm gefunden des heißt aston damit kann man bisschen den style von windows verändern....

    so jetzt die frage: kann man mit autoit den mauszeiger dauerhaft ändern??
    like: systemsteuerung->Maus->Zeiger+ändern nur automatisch????

    wär cool wenn mir jemand helfen könnte..
    der snoozer

    • Offizieller Beitrag

    Hi,

    ich hatte mal vor langer Zeit dies probiert:

    Spoiler anzeigen
    [autoit]

    #include<Array.au3>
    #include <math.au3>
    HotKeySet("{esc}", "end")
    HotKeySet("1", "moveRandom")
    HotKeySet("2", "moveButterfly")

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

    Global Const $OCR_APPSTARTING = "AppStarting"
    Global Const $OCR_NORMAL = 32512
    Global Const $OCR_CROSS = 32515
    Global Const $OCR_HAND = 32649
    Global Const $OCR_IBEAM = 32513
    Global Const $OCR_NO = 32648
    Global Const $OCR_SIZEALL = 32646
    Global Const $OCR_SIZENESW = 32643
    Global Const $OCR_SIZENS = 32645
    Global Const $OCR_SIZENWSE = 32642
    Global Const $OCR_SIZEWE = 32644
    Global Const $OCR_UP = 32516
    Global Const $OCR_WAIT = 32514
    Dim $mouseFuncs = 0
    Dim $cursorArray
    $cursorArray = _ArrayCreate ("3dgarro.cur")

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

    $search = FileFindFirstFile(@WindowsDir & "\cursors\*.*")
    If $search = -1 Then
    MsgBox(0, "Error", "No Cursors found!")
    Exit
    EndIf

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

    While 1
    $cursor = FileFindNextFile($search)
    If @error Then ExitLoop
    _ArrayAdd($cursorArray, $cursor)
    WEnd
    FileClose($search)

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

    While 1
    If Random(0, 1, 1) = 1 Then
    changeCursor()
    EndIf
    Sleep(1500)
    WEnd

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

    Func changeCursor()
    $nr = Random($cursorArray[0], UBound($cursorArray) - 1, 1)
    _SetCursor(@WindowsDir & "\cursors\" & $cursorArray[$nr], $OCR_NORMAL)
    EndFunc ;==>changeCursor

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

    Func _SetCursor($s_file, $i_cursor)
    Local $newhcurs, $lResult
    $newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file)
    If Not @error Then
    $lResult = DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor)
    If Not @error Then
    $lResult = DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0])
    Else
    MsgBox(0, "Error", "Failed SetSystemCursor")
    EndIf
    Else
    MsgBox(0, "Error", "Failed LoadCursorFromFile")
    EndIf
    EndFunc ;==>_SetCursor

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

    Func end()
    exit (0)
    EndFunc ;==>end

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

    Func restoreCursor()
    Run("control panel")
    Sleep(200)
    Send("m" & "{Enter}")
    Sleep(200)
    Send("+{Tab}" & "{RIGHT}")
    Sleep(200)
    Send("{Enter}")
    Sleep(50)
    WinClose("Systemsteuerung") ; <- German -> "control panel"
    EndFunc ;==>restoreCursor

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

    Func moveRandom()
    While 1
    MouseMove(Random(0, @DesktopWidth, 1), Random(0, @DesktopHeight, 1))
    If Random(0, 1, 1) = 1 Then
    changeCursor()
    EndIf
    WEnd
    EndFunc ;==>moveRandom

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

    Func moveButterfly()
    Global Const $PI = 3.1415926535897932384626433832795
    Dim $t
    Dim $expr
    For $theta = 0 To 924 * $PI;ALSO MAKE THE LOOP GO LONGER
    $t = _Radian ($theta)
    $expr = Exp(Cos($t)) - 2 * Cos(4 * $t) - Sin($t / 12) ^ 5
    $x = 400 + 100 * Cos($t) * $expr
    $y = 400 + 100 * Sin($t) * $expr
    ConsoleWrite($x & "," & $y & @LF);Use for debugging with SciTE
    If Random(0, 80, 1) = 1 Then
    changeCursor()
    EndIf
    MouseMove($x, $y, 1)
    Next
    EndFunc ;==>moveButterfly

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

    Func OnAutoItStart()
    ;saveCurrentCursor()
    EndFunc ;==>OnAutoItStart

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

    Func OnAutoItExit()
    restoreCursor()
    EndFunc ;==>OnAutoItExit

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

    Func saveCurrentCursor()
    ;DllCall...
    EndFunc ;==>saveCurrentCursor

    [/autoit]

    So long,

    Mega

  • hey ho meger
    thx erstmal dafür :)
    aber irgendwie wird der mauszeiger den ich haben will gar nicht angezeigt.....
    naja ich such mal im englischen forum.....hoff aber noch dass hier jemand ne lösung hat :rolleyes:
    snoozy