Zitataber einen netten "Virus" ( also ein Nervprogramm ) könnt man damit schon machen.....
Pssst! Nicht so laut... Musstest du jetzt die ganzen Script-Kiddies auf dumme Ideen bringen? ![]()
Zitataber einen netten "Virus" ( also ein Nervprogramm ) könnt man damit schon machen.....
Pssst! Nicht so laut... Musstest du jetzt die ganzen Script-Kiddies auf dumme Ideen bringen? ![]()
Zitateine Frage habe ich aber: Wie bekommt man das programm nun aus der Registry? Oder soll man das nicht....
Naja, du kannst es manuell mit dem Registry Editor entfernen (Run -> "regedit" -> Enter). Oder du machst einen Uninstaller mit AutoIt der die entsprechenden Änderungen des Programms wieder rückgängig macht.
Du kannst ja mal mit dieser Funktion experimentieren...
;===============================================================================
; Function Name: GetExtProperty($sPath,$iProp)
; Description: Returns an extended property of a given file.
; Parameter(s): $sPath - The path to the file you are attempting to retrieve an extended property from.
; $iProp - The numerical value for the property you want returned. If $iProp is is set
; to -1 then all properties will be returned in a 1 dimensional array in their corresponding order.
; The properties are as follows:
; Name = 0
; Size = 1
; Type = 2
; DateModified = 3
; DateCreated = 4
; DateAccessed = 5
; Attributes = 6
; Status = 7
; Owner = 8
; Author = 9
; Title = 10
; Subject = 11
; Category = 12
; Pages = 13
; Comments = 14
; Copyright = 15
; Artist = 16
; AlbumTitle = 17
; Year = 18
; TrackNumber = 19
; Genre = 20
; Duration = 21
; BitRate = 22
; Protected = 23
; CameraModel = 24
; DatePictureTaken = 25
; Dimensions = 26
; Width = 27
; Height = 28
; Company = 30
; Description = 31
; FileVersion = 32
; ProductName = 33
; ProductVersion = 34
; Requirement(s): File specified in $spath must exist.
; Return Value(s): On Success - The extended file property, or if $iProp = -1 then an array with all properties
; On Failure - 0, @Error - 1 (If file does not exist)
; Author(s): Simucal ([email='Simucal@gmail.com'][/email])
; Note(s):
;
;===============================================================================
Func _GetExtProperty($sPath, $iProp)
Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty
$iExist = FileExists($sPath)
If $iExist = 0 Then
SetError(1)
Return 0
Else
$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
$oShellApp = ObjCreate ("shell.application")
$oDir = $oShellApp.NameSpace ($sDir)
$oFile = $oDir.Parsename ($sFile)
If $iProp = -1 Then
Local $aProperty[35]
For $i = 0 To 34
$aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i)
Next
Return $aProperty
Else
$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
If $sProperty = "" Then
Return 0
Else
Return $sProperty
EndIf
EndIf
EndIf
EndFunc ;==>_GetExtProperty
Soweit ich das sehen kann, müsste man dazu die komplette Funktion umschreiben... Es sei denn man zeichnet einfach ein Rechteck in der Hintergrundfarbe der GUI über den alten Text bei jedem aufruf von _WM_MOVE. Allerdings würde das dann nicht funktionieren wenn du ein Bild darunter hast.
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#include <winapi.au3>
Global $Mouse_X_Pos = 0 , $visible = True , $i=1
$orientation = "rechts"
$aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
if $aTaskbar_Pos = 0 Then
$taskbar = 0
Else
$taskbar = $aTaskbar_Pos[3]
EndIf
if $orientation = "rechts" Then
$guiWith = 200
$guiHight = 600
$posLeft = @DesktopWidth - $guiWith
$posTop = (@DesktopHeight-$taskbar-$guiHight)/2
EndIf
_GDIPlus_Startup()
Global Const $iPI = 3.1415926535897932384626433832795
$gui = GUICreate("sidebar", $guiWith, $guiHight, $posLeft, $posTop, $WS_POPUP , $WS_EX_TOPMOST) ;;; BitOR($WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS)
GUISetBkColor(0xA6CAF0)
$LabelLeft = GUICtrlCreateLabel("", 0, 0, 20, $guiHight)
GUICtrlSetBkColor(-1, 0x3399FF)
GUICtrlSetState($LabelLeft,$GUI_DISABLE)
$LabelTop = GUICtrlCreateLabel("", 20, 0, $guiWith-20, 10)
GUICtrlSetBkColor(-1, 0x3399FF)
$LabelBottom = GUICtrlCreateLabel("", 20, $guiHight-10, $guiWith-20, 10)
GUICtrlSetBkColor(-1, 0x3399FF)
$Button1 = GUICtrlCreateButton("Tool 1", 30, 20, $guiWith-40, 25, 0)
GUICtrlSetBkColor(-1, 0x3399FF)
$Button2 = GUICtrlCreateButton("Tool 2", 30, 55, $guiWith-40, 25, 0)
GUICtrlSetBkColor(-1, 0x3399FF)
GUISetState(@SW_SHOW)
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
GUIRegisterMsg($WM_MOVE, '_WM_MOVE')
_ReDrawAngledText("Ausblenden")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_GDIPlus_GraphicsDispose ($hGraphics)
_GDIPlus_ShutDown ()
Exit
EndSwitch
checkresolution()
checkmousepos()
WEnd
Func checkresolution()
$aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
if $aTaskbar_Pos = 0 Then
$newtaskbar = 0
Else
$newtaskbar = $aTaskbar_Pos[3]
EndIf
$newPosLeft = @DesktopWidth - $guiWith
$newPosTop = (@DesktopHeight-$newtaskbar-$guiHight)/2
if $newPosLeft <> $posLeft or $newPosTop <> $posTop or $newtaskbar <> $taskbar Then
ConsoleWrite( @CRLF & "reschange: " & $visible )
$posLeft = $newPosLeft
$posTop = $newPosTop
$taskbar = $newtaskbar
WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,5)
_ReDrawAngledText("Ausblenden")
$visible = True
EndIf
EndFunc
Func checkmousepos()
$curMouse_X_Pos = MouseGetPos(0)
if $curMouse_X_Pos <> $Mouse_X_Pos Then
$Mouse_X_Pos = $curMouse_X_Pos
if $Mouse_X_Pos < $posLeft And $visible = True Then
ConsoleWrite( @CRLF & "hide: " & $Mouse_X_Pos )
WinMove($gui,"",$posLeft+$guiWith-20,$posTop,$guiWith,$guiHight,5)
_ReDrawAngledText("Einblenden")
$visible = False
EndIf
if $Mouse_X_Pos >= @DesktopWidth-20 And $visible = False then
ConsoleWrite( @CRLF & "show: " & $Mouse_X_Pos )
WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,5)
_ReDrawAngledText("Ausblenden")
$visible = True
EndIf
EndIf
EndFunc
; #FUNCTION# ================================================================
; Name...........: GDIPlus_SetAngledText
; Description ...: Adds text to a graphic object at any angle.
; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
; Parameters ....: $hGraphic - The Graphics object to receive the added text.
; $nText - Text string to be displayed
; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
; $nFontSize - The font size to be used (default = "" or Blank = 12 )
; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
; or Default = Blank = 0xFFFF00FF )
; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
; Return values .: 1
; Author ........: Malkey
; Modified.......:
; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
; Link ..........;
; Example .......; Yes
; ========================================================================================
Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
$nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0, $iARGB_BG = 0xFF3399FF)
Local $x, $y, $iX, $iY, $iWidth, $iHeight
Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
; Default values
If $iAngle = "" Then $iAngle = 0
If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
If $nFontSize = "" Then $nFontSize = 12
If $iARGB = "" Then ; Randomize ARGB color
$iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
EndIf
$hFormat = _GDIPlus_StringFormatCreate(0)
$hFamily = _GDIPlus_FontFamilyCreate($nFontName)
$hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
$tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
$aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
$iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
$iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))
;Later calculations based on centre of Text rectangle.
If $iAnchor = 0 Then ; Reference to middle of Text rectangle
$iX = $iCentreX
$iY = $iCentreY
Else ; Referenced centre point moved to top left corner of text string.
$iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
$iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
EndIf
;Rotation Matrix
$hMatrix = _GDIPlus_MatrixCreate()
_GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
_GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
;x, y are display coordinates of center of width and height of the rectanglular text box.
;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
;Parametric equations for a circle, and adjustments for centre of text box
$x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
$y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)
;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
;text box point before rotation. (before translation of the matrix)
$iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
$iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)
$hBrush = _GDIPlus_BrushCreateSolid($iARGB)
$hBrushBG = _GDIPlus_BrushCreateSolid($iARGB_BG)
$tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
_GDIPlus_GraphicsFillRect($hGraphic, $iXt, $iYt, $iWidth, $iHeight, $hBrushBG)
_GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)
; Clean up resources
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_BrushDispose($hBrushBG)
$tLayout = ""
Return 1
EndFunc ;==>GDIPlus_SetAngledText
Func _ReDrawAngledText($labelLefttext)
GDIPlus_SetAngledText($hGraphics, $labelLefttext, 10, $guiHight/2, 270, "", 12, 0xFF0000FF)
EndFunc
Func _WM_MOVE($handle)
If $handle = $gui Then
;_ReDrawAngledText()
$redraw = _WinAPI_UpdateWindow($gui) ; notwendig damit Buttons beim ein/ausblenden gezeichnet werden
ConsoleWrite(@CRLF & "Redraw: " & $redraw)
ConsoleWrite(@CRLF & "counter: " & $i)
$i+=1
EndIf
EndFunc
Ich hab mal einfach eine Hintergrundfarbe als möglichen Parameter in die Funktion eingefügt.
Du müsstest dann mit GDI+ o.Ä. ständig das nächste Bild mit immer weniger Transparenz auf das aktuelle Bild draufzeichnen und das Resultat als neuen Desktophintergrund setzen. Allerdings ist das nicht sehr performant und könnte das System eventuell verlangsamen. Animierte Wallpapers sind eigentlich nur mit DirectX etc. (gut) zu realisieren. Ich werde mal schauen ob man das noch irgendwie besser realisieren kann. Aber wenn eine niedrige Framerate nicht so tragisch ist, kannst du es so machen wie ich es beschrieben habe zu den einzelnen Punkten findet man über die Forensuche auch Beispiele.
@Marsi Wow. Hammer Script exe mann. ![]()
ZitatAnstelle einer eigenen GUI nur für das Bild könntest du aber auch die funktion SplashImageOn() verwenden. Ist zwar wohl das gleiche in grün, aber du hast keine Arbeit damit.
Wobei man da immer noch einen Rand sieht. Aber das ist ja dann Geschmackssache.
ZitatDu meinst "GUIGetCursorInfo" ohne "Ctrl" oder?
Ups... Ja natürlich. ![]()
Ja das wäre durchaus möglich.
Mit GUICtrlGetCursorInfo kannst du herausfinden über welchem Control sich der Cursor zurzeit befindet. Das Bild kannst du dann z.B. in einer ChildGUI mit $WS_POPUP als Stil per Pic Control anzeigen lassen.
GUICtrlRead ($input01 & $input02 & $input03)
[/autoit]
Ist kompletter Schwachsinn... Du kannst nur ein Control zur selben Zeit mit GUICtrlRead auslesen.
Diesen ausgelesenen Wert musst du dann einer Variable zur späteren Verwendung zuweisen.
Also: $iSleep1 = GUICtrlRead($Input1).
Diese Variablen kannst du dann in Kombination mit Sleep verwenden.
PS: Ich hoffe das ist nicht dein ganzes Script, falls doch -> AutoIt Tutorial durchlesen und die Hilfe konsultieren.
ZitatPS: falls ich was falsches gesagt habe, nich böse sein, bin noch nich so lange in der Szene^^
Nein keine Sorge ^^. Ich hab mir nur Gedanken wegen dem Wort Bot gemacht, da Bots für Spiele etc. bei uns nicht erwünscht sind ;).
Was willst du denn damit machen? Auf ein bestimmtes Control klicken? Dann bist du nämlich mit ControlClick besser bedient, da das unabhängig von der Auflösung funktioniert.
Der Fehler liegt nicht im Script... Ich habe es gerade eben getestet, und es funktioniert problemlos.
Zitatda ja so mancher alles als "bot" bezeichnet habe ich das Thema erstmal freigegeben.
Muss ja kein Bot in unserem Sinne sein.
gemäß dem Sinn nach: In dubio pro reo (lat.)
Deswegen frage ich ja nur ;). Er muss die Frage ja nicht beantworten.
Wofür ist denn der Bot, wenn ich fragen darf? ![]()
ZitatNaja, das hilft weder mir noch anderen.
Es hilft weder dir noch anderen, wenn du hier über ein Script diskutierst das nur du und ich kennen.
ZitatKannst du mir nicht einfach sagen, wo genau mein Fehler liegt
Das habe ich bereits getan, sowohl in der PN als auch per Beitrag. Du verwendest keinen der Vorschläge aus dem Forum in deinem Script um den Inhalt der Textdatei aufzuteilen und in das Editfeld einzulesen. Und dann wunderst du dich wieso es keinen Unterschied macht?
Was spricht dagegen einfach Win + L zu verwenden?
[autoit] ZitatKannst du mir dann erklären, wie man das bei deinem ersten Beitrag ("Du möchtest an mehreren Stellen nacheinander automatisiert die Maus etwas anklicken lassen?") macht???
MouseClick
[/autoit]Na dann. Herzlich Willkommen im Forum
.
Die UDF findet man übrigens hier.
ZitatWo liegt denn der Fehler?
In deinem Script, das du mir aus irgendeinem Grund per PN geschickt hast, verwendest du die hier vorgeschlagenen Möglichkeiten an falscher Stelle und beschwerst dich dann das es in dem Edit Control falsch angezeigt wird. :pinch:
ZitatDieser Thread ist ausschließlich an die deutschen Entwickler von Autoit gerichtet....
Aha... Ähm, du kannst es höchstens auf der englischen AutoIt Webseite vorschlagen, aber selbst dann bezweifle ich, dass das als neuer Befehl aufgenommen werden würde.
Wozu gibt es denn includes? ![]()