Hi,
ich habe zwar schon etliches in autoit hingebracht, aber sagt hat jemand schon einen Bildschirmschoner in Autoit gescriptet?. Meine Suche ergab nichts. Gruss Jan
Bildschirmschoner in Autoit erstellen?
-
- [ offen ]
-
janrenzlow -
1. März 2008 um 12:24 -
Geschlossen -
Erledigt
-
-
- Offizieller Beitrag
Hi!
Einfach normale Exe erstellen, dann umbenennen als "*.scr" und zu den anderen scr-Dateien kopieren.
peethebee
-
Hi
pethebee - das hab ich auch gefunden. Aber wie bekomme ich ein Fenster hin, dass sich über die Taskleiste legt? Gruss Jan -
so denke ich:
[autoit]$gui = GUICreate("Test", -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit] -
[autoit]
GUICreate("", @DesktopWidth,@DesktopHeight+50,-1,-1,$WS_POPUP,bitor($WS_EX_TOPMOST ,$WS_EX_TOOLWINDOW ))
[/autoit]
würd ich es machen
aber btw, wo sind denn bitteschon all die "*.src" file? -
Zitat
aber btw, wo sind denn bitteschon all die "*.src" file?
@SystemDir
[/autoit]Gruß
Greenhorn -
Die heißen *.scr und liegen in C:\WINDOWS\system32
So hier mal mein Bsp:Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#region - GUI Create
[/autoit] [autoit][/autoit] [autoit]
$gui = GUICreate("SCR", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUPWINDOW+$WS_MAXIMIZE);,$WS_EX_TOPMOST)
GUISetBkColor(0x000000)
WinSetTrans($gui,"",150)
;GUICtrlCreateAvi(
GUISetState()
#endregion
$mouse = MouseGetPos()
#region - GUI Create
$gui = GUICreate("Disk Eraser", 355, 150,-1,-1,$WS_CAPTION,$WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)
$avi = GUICtrlCreateAvi(@SystemDir & "\shell32.dll",163, 0,0)
GUICtrlSetState (-1, 1)
GUISetBkColor(0x000000)
GUICtrlCreateLabel("Die Polizei hat versucht, ihre Daten zu kopieren. Um sie zu schützen, werden nun alle Daten vernichtet.",10,60,335,150)
GUICtrlSetColor(-1,0xFFFFFF)
$progress = GUICtrlCreateProgress(10,100,335,15)
Dim $i = 0
GUISetState()
#endregion
AdlibEnable("_Progress")
#region - GUI SelectLoop
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
;~ Case $msg =
;~ Case $msg =
;~ Case $msg =
EndSelect
If Abs(MouseGetPos(0)-$mouse[0]) > 100 Then Exit
If Abs(MouseGetPos(1)-$mouse[1]) > 100 Then Exit
WEnd
#endregionFunc _Progress()
[/autoit]
$i += 1
If $i > 100 Then $i = 0
GUICtrlSetData($progress,$i)
EndFunc -
Zitat
Die heißen *.scr und liegen in C:\WINDOWS\system32
, also ich find keine in system 32 nur nen srcclient.dll
aber naja hab mal eine src dort hineinkopiert, aber wie kann ich die jetzt als screensaver auswählen? -
Anscheinend hat Johannes die Antwort schon bekommen ...
[autoit]
http://www.autoitscript.com/forum/index.php?s=&showtopic=65474&view=findpost&p=486536#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]
;first edition of an screen saver
$font='Arial'
$textcolor = 0xff0000GUICreate('', -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
; paradies.jpg exists under W2K, XP has other filenames, the directory is the same
$pic1 = GUICtrlCreatePic(@WindowsDir & '\Web\Wallpaper\paradies.jpg', 0, 0, @DesktopWidth, @DesktopHeight)
$label1=GUICtrlCreateLabel ('This is only a sample of a text for a screen saver', 10, 80, @DesktopWidth -20, @DesktopHeight-180, $SS_CENTERIMAGE )
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor ( -1, $textcolor)GUICtrlSetFont (-1, 36, 400, 1, $font)
[/autoit][autoit][/autoit][autoit]
GUISetState (@SW_SHOW)While 1
[/autoit]
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend -
Hi, damit der Bildschirmschoner funktioniert, muss er ja irgendwie in Bewegung bleiben. Ich wollte die Schriftgrösse oder - die Farbe ändern. Aber es wird nichts angezeigt. Was mache ich flasch ? Gruss Johannes
[autoit]#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]
#include <File.au3>;first edition of an screen saver
[/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]
$ininame='bschoner.ini'$font=IniRead($ininame, 'Configuration', 'Schrift', 'Arial')
[/autoit][autoit][/autoit][autoit]
$textcolor=IniRead($ininame, 'Configuration', 'Textfarbe', 0xff0000)
$fontsize=IniRead($ininame, 'Configuration', 'Schriftgrösse', 24)
$txtdatei=IniRead($ininame, 'Configuration', 'Textdatei', 'bschoner.txt')
$nachKTag=IniRead($ininame, 'Configuration', 'NachKalenderTag', 'nein')
$letzteBildnr=IniRead($ininame, 'Configuration', 'letzteBildnr', 1)
$LastCall=IniRead($ininame, 'Configuration', 'letzterAufruf', 1)$fontsizeNow = $fontsize
[/autoit][autoit][/autoit][autoit]
If FileExists($txtdatei) then
$ZeilenAnzahl=_FileCountLines ( $txtdatei)
$h=FileOpen($txtdatei,0)
MsgBox(4096,'','SELECT',1)
Select
Case $nachKTag='ja' and $ZeilenAnzahl >= 365
$txt=FileReadLine($h, @YDAY)
Case $nachKTag='ja' and $ZeilenAnzahl < 365 and @YDAY <= $ZeilenAnzahl
If $LastCall = @YDAY Then
$txt=FileReadLine($h, @YDAY)
Else
$txt=FileReadLine($h, @YDAY)
IniWrite($ininame, 'Configuration', 'letzterAufruf', @YDAY)
EndIf
Case Else
$i=@YDAY
Do
$i=$i-$ZeilenAnzahl
Until $i <= $Zeilenanzahl
$txt=FileReadLine($h, $i)
EndSelect
FileClose ($h)
Else
$txt='Dies ist nur ein Beispieltext für den Bildschirmschoner'
EndIfGUICreate('', -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
; paradies.jpg exists under W2K, XP has other filenames, the directory is the same
$Bild1 = GUICtrlCreatePic(@WindowsDir & '\Web\Wallpaper\paradies.jpg', 0, 0, @DesktopWidth, @DesktopHeight)
$Bez=GUICtrlCreateLabel ($txt, 30, 80, @DesktopWidth -60, @DesktopHeight-180, BitOr($SS_CENTERIMAGE, $SS_CENTER) )
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor ( -1, $textcolor)GUICtrlSetFont (-1, $fontsize, 400, 1, $font)
[/autoit][autoit][/autoit][autoit]
GUISetState (@SW_SHOW)While 1
[/autoit][autoit][/autoit][autoit]
$msg = GUIGetMsg()If $fontsizeNow = $fontsize then
[/autoit]
GUICtrlSetColor ($Bez, $textcolor)
;GUICtrlSetFont ($Bez, $fontsize + 10, 400, 1, $font)
$fontsizeNow = $fontsize + 1
EndIf
If $fontsize = $fontsizeNow then
GUICtrlSetColor ($Bez, 0x00FF00)
;GUICtrlSetFont ($Bez, $fontsize, 400, 1, $font)
$fontsize = $fontsize
EndIf
Sleep (1000)
$a=MsgBox(4096,'','Jetzt sollte sich am Textformat etwas ändern. Beenden mit OK',2)
If $a=1 then Exit
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend -
Das ganze Testen an der Schriftgröße. Machs z.B. so:
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <File.au3>;first edition of an screen saver
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$ininame='bschoner.ini'$font=IniRead($ininame, 'Configuration', 'Schrift', 'Arial')
[/autoit] [autoit][/autoit] [autoit]
$textcolor=IniRead($ininame, 'Configuration', 'Textfarbe', 0xff0000)
$fontsize=IniRead($ininame, 'Configuration', 'Schriftgrösse', 24)
$txtdatei=IniRead($ininame, 'Configuration', 'Textdatei', 'bschoner.txt')
$nachKTag=IniRead($ininame, 'Configuration', 'NachKalenderTag', 'nein')
$letzteBildnr=IniRead($ininame, 'Configuration', 'letzteBildnr', 1)
$LastCall=IniRead($ininame, 'Configuration', 'letzterAufruf', 1)$fontsizeNow = $fontsize
[/autoit] [autoit][/autoit] [autoit]
If FileExists($txtdatei) then
$ZeilenAnzahl=_FileCountLines ( $txtdatei)
$h=FileOpen($txtdatei,0)
MsgBox(4096,'','SELECT',1)
Select
Case $nachKTag='ja' and $ZeilenAnzahl >= 365
$txt=FileReadLine($h, @YDAY)
Case $nachKTag='ja' and $ZeilenAnzahl < 365 and @YDAY <= $ZeilenAnzahl
If $LastCall = @YDAY Then
$txt=FileReadLine($h, @YDAY)
Else
$txt=FileReadLine($h, @YDAY)
IniWrite($ininame, 'Configuration', 'letzterAufruf', @YDAY)
EndIf
Case Else
$i=@YDAY
Do
$i=$i-$ZeilenAnzahl
Until $i <= $Zeilenanzahl
$txt=FileReadLine($h, $i)
EndSelect
FileClose ($h)
Else
$txt='Dies ist nur ein Beispieltext für den Bildschirmschoner'
EndIfGUICreate('', -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit] [autoit][/autoit] [autoit]
; paradies.jpg exists under W2K, XP has other filenames, the directory is the same
$Bild1 = GUICtrlCreatePic(@WindowsDir & '\Web\Wallpaper\turquoise.jpg', 0, 0, @DesktopWidth, @DesktopHeight)
GUICtrlSetState(-1,$GUI_DISABLE)
$Bez=GUICtrlCreateLabel ($txt, 30, 80, @DesktopWidth -60, @DesktopHeight-180, BitOr($SS_CENTERIMAGE, $SS_CENTER) )
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor ( -1, $textcolor)$grosklein = 1
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont (-1, $fontsize, 400, 1, $font)
GUISetState (@SW_SHOW)
$fontsizeMax = $fontsize +100
AdlibEnable("_fontsize",500)
While 1
$msg = GUIGetMsg()
[/autoit] [autoit][/autoit] [autoit]
;~ EndIf
;~ Sleep (1000)
;$a=MsgBox(4096,'','Jetzt sollte sich am Textformat etwas ändern. Beenden mit OK',2)
;If $a=1 then Exit
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WendFunc _fontsize()
[/autoit] [autoit][/autoit] [autoit]
If $fontsizeNow > $fontsizeMax then $grosklein = -1
If $fontsizeNow < $fontsize then $grosklein = 1$fontsizeNow += 10*$grosklein
[/autoit]
GUICtrlSetFont ($Bez, $fontsizeNow, 400, 1, $font)
EndFunc -
HI progandy, danke für die schnelle und schöne Lösung. Leider fackert das Label bei jeder Umstellung kurz auf - ähnlich wie das Problem in der Hilfe bei SplashTextOn - geht das ganze nicht etwas smoother zu gestalten ohne dieses Flackern - ansonsten 1a Arbeit. Gruss J.
-
Du könntest das Hintergrundbild rausnehmen ... Die Transparenz flackert halt. Aber dann siehts nicht mehr so schön aus
-
Ich versuche gerade das ganze etwas abwechslungsreicher zu gestallten.
Die beiden angegebenen Bilder sollen sich alle 10 Sekunden, wenn der Bildschirmschoner aktiv ist, getauscht werden. Aber irgendwie kommt:
1.) immer das gleiche Bild
2.) kann man nicht mehr aus der Schleife kommen.Wo ist das Problem?
LG, Lina.
[autoit]#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]
;first edition of an screen saver
$font='Arial'
$textcolor = 0xff0000GUICreate('', -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit][autoit][/autoit][autoit]
;$pic1 = GUICtrlCreatePic(@WindowsDir & '\Web\Wallpaper\paradies.jpg', 0, 0, @DesktopWidth, @DesktopHeight)GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
GUICtrlSetColor ( -1, $textcolor)GUICtrlSetFont (-1, 36, 400, 1, $font)
[/autoit][autoit][/autoit][autoit]
GUISetState (@SW_SHOW)While 1
[/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]
While 2
$pic1 = GUICtrlCreatePic('bild1.jpg', 0, 0, @DesktopWidth, @DesktopHeight)
sleep(10000)
$pic2 = GUICtrlCreatePic('bild2.bmp', 0, 0, @DesktopWidth, @DesktopHeight)
WEnd$msg = GUIGetMsg()
[/autoit]
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend -
ich denke mal die 10000 millsekunden werden das problem sein!
und warum guicreatepic? änder doch einfach die daten des bereits erstellten pics!
[autoit]#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]
;first edition of an screen saver
$font='Arial'
$textcolor = 0xff0000GUICreate('', -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit][autoit][/autoit][autoit]
$pic1 = GUICtrlCreatePic(@WindowsDir & '\Web\Wallpaper\paradies.jpg', 0, 0, @DesktopWidth, @DesktopHeight)GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
GUICtrlSetColor ( -1, $textcolor)GUICtrlSetFont (-1, 36, 400, 1, $font)
[/autoit][autoit][/autoit][autoit]
GUISetState (@SW_SHOW)While 1
[/autoit]
While 2
GUICtrlSetImage($pic1,"bild1.bmp")
GUISetState(@SW_SHOW) ; um das neue bild anzuzeigen
for $i = 1 to 10
$msg = GUIGetMsg() ; das gehört hier ind die schleife nicht auserhalb! daher deine endlos schleife!
If $msg == $GUI_EVENT_CLOSE Then Exit
sleep(1000) ; damit "$GUI_EVENT_CLOSE" öfter verabreitet wird!
next
GUICtrlSetImage($pic1,"bild2.bmp")
GUISetState(@SW_SHOW) ; um das neue bild anzuzeigen
WEnd
Wend -
Hallo azunai.
Bekomme dann folgende Meldung:
GUICtrlSetImage($hPIC,
~~~~~~~~~~~~~~~~~~~~~^
E:\test.au3 - 1 error(s), 1 warning(s)LG, Lina.
-
habs schon editiert
war bei dir $pic1 nicht $hpic -
So funktioniert es nun:
[autoit]#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]
;first edition of an screen saver
$font='Arial'
$textcolor = 0xff0000GUICreate('', -1, -1, 0, 0, BitOr($WS_POPUP, $WS_MAXIMIZE))
[/autoit][autoit][/autoit][autoit]
$pic1 = GUICtrlCreatePic('bild1.bmp', 0, 0, @DesktopWidth, @DesktopHeight)GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
GUICtrlSetColor ( -1, $textcolor)GUICtrlSetFont (-1, 36, 400, 1, $font)
[/autoit][autoit][/autoit][autoit]
GUISetState (@SW_SHOW)While 1
[/autoit]
While 2
GUICtrlSetImage($pic1,"bild1.bmp")
GUISetState(@SW_SHOW) ; um das neue bild anzuzeigen
for $i = 1 to 10
$msg = GUIGetMsg() ; das gehört hier ind die schleife nicht auserhalb! daher deine endlos schleife!
If $msg == $GUI_EVENT_CLOSE Then Exit
sleep(1000) ; damit "$GUI_EVENT_CLOSE" öfter verabreitet wird!
next
GUICtrlSetImage($pic1,"bild2.bmp")
GUISetState(@SW_SHOW) ; um das neue bild anzuzeigen
sleep(1000)
WEnd
WendLG und DANKE !!!!
Lina.
-
-
@ azunai
Das was ich noch nicht hinbekommen habe ist die Schleife durch einmal drücken von ESC abzubrechen, aber sonst läuft es gut.
Witziger BS azunai
LG, Lina.
-