Weiß keiner eine lösung?
Beiträge von tobi_girst
-
-
Liebe AutoIt-Community!
Ich habe mir ein Script erstellt, welches sich über eine Toolbar (ein Ordner, den man an die Spitze des desktops geschoben hat und immer im Vordergrumgrund ist) die von mir handnachprogrammierte Ubuntu-Leiste legt.
Wenn ich das Startmenü, das ich unter Applications geschoben habe öffne, kommt natürlich automatisch der Vista-Aero-Schatten mit. Beim Ausblenden aber bleibt er da. Habe auch schon versucht, die Startmenü-GUI nachher wieder zu @SW_HIDEn, hat aber nix gemacht.
Hier der Code:Spoiler anzeigen
[autoit]HotKeySet ("^!{end}", "onautoitexit")
[/autoit] [autoit][/autoit] [autoit]
WinSetTrans ("[CLASS:BaseBar]", "", 0);visible:255
Global $off_enabled = 0
Global $date_enabled = 0
Global $time = @hour & ":" & @min & ":" & @sec & "; " & @mday & "." & @mon & "." & @year
$main = GUICreate ("TopBar", @desktopwidth, 36, 0, 0, 0x80000000, 0x00000080, WinGetHandle ("[CLASS:BaseBar]"))
$apps = GUICtrlCreateButton ("Applications", 3, 3, 110, 31)
$places = GUICtrlCreateButton ("Places (not yet set)", 113, 3, 110, 31)
$System = GUICtrlCreateButton ("System (not yet set)", 223, 3, 110, 31)
$net = GUICtrlCreateButton ("Firefox", 336, 3, 31, 31, 0x0040)
GUICtrlSetImage ($net, @ProgramFilesDir & "\Mozilla Firefox\firefox.exe", 1)
$mail = GUICtrlCreateButton ("Empathy", 367, 3, 31, 31, 0x0040)
GUICtrlSetImage ($mail, @ProgramFilesDir & "\Windows Mail\WinMail.exe", 1)
$term = GUICtrlCreateButton ("Terminal", 398, 3, 31, 31, 0x0040)
GUICtrlSetImage ($term, @SystemDir & "\cmd.exe", 1)
$date = GUICtrlCreateButton ($time, @desktopwidth-200, 3, 160, 31)
GUICtrlSetFont ($date, 8.5, 800)
$off = GUICtrlCreateButton ("Shutdown", @DesktopWidth-34, 3, 31, 31, 0x0040)
GUICtrlSetImage ($off, @SystemDir & "\shell32.dll", 28)GUISetState (@SW_SHOW, $main)
[/autoit] [autoit][/autoit] [autoit]$shtdwn = GUICreate ("Topbar-Shutdown", 150, 84, @DesktopWidth-150, 36, 0x80000000, 0x00000080)
[/autoit] [autoit][/autoit] [autoit]
$lockscreen = GUICtrlCreateButton ("Lock Screen", 1, 1, 148, 20)
$stnd = GUICtrlCreateButton ("Standby", 1, 21, 148, 20)
$lgf = GUICtrlCreateButton ("Log off", 1, 42, 148, 20)
$dwn = GUICtrlCreateButton ("Shut Down", 1, 63, 148, 20)$dategui = GUICreate ("Topbar-Date", 177, 160, @DesktopWidth-200, 36, 0x80000000, 0x00000080)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlCreateMonthCal ("Today: ", -2, -2)
GUICtrlCreateLabel ("Calendar4TopBar", 10, 10, 0, 0)
While 1
Switch GUIGetMsg ()
Case $apps
_appsgui ()
Case $places
;startmenu
Case $net
Run (@ProgramFilesDir & "\Mozilla Firefox\firefox.exe")
Case $mail
Run (@ProgramFilesDir & "\Windows Mail\WinMail.exe")
Case $term
Run (@SystemDir & "\cmd.exe")
Case $off
_shutdowngui ()
Case $date
_dategui ()
Case $lockscreen
Run(@ComSpec & " /C " & "%windir%\System32\rundll32.exe user32.dll,LockWorkStation", "", @SW_HIDE)
Case $stnd
ConsoleWrite ("1")
Case $lgf
ConsoleWrite (2)
Case $dwn
ConsoleWrite(3)
EndSwitch
If $time <> @hour & ":" & @min & ":" & @sec & "; " & @mday & "." & @mon & "." & @year Then
$time = @hour & ":" & @min & ":" & @sec & "; " & @mday & "." & @mon & "." & @year
GUICtrlSetData ($date, $time)
EndIf
$timer = TimerInit ()
If $off_enabled = 1 And WinActive ("", "Shut Down") = 0 Then
_shutdowngui ()
EndIf
If $date_enabled = 1 And WinActive ("", "Calendar4TopBar") = 0 Then
_dategui ()
EndIf
WEndFunc _shutdowngui ()
[/autoit] [autoit][/autoit] [autoit]
If $off_enabled = 1 Then
GUISetState (@SW_HIDE, $shtdwn)
$off_enabled = 0
Else
GUISetState (@SW_SHOW, $shtdwn)
$off_enabled = 1
GUISetState (@SW_HIDE, $dategui)
$date_enabled = 0
EndIf
EndFuncFunc _dategui ()
[/autoit] [autoit][/autoit] [autoit]
If $date_enabled = 1 Then
GUISetState (@SW_HIDE, $dategui)
$date_enabled = 0
Else
GUISetState (@SW_SHOW, $dategui)
$date_enabled = 1
GUISetState (@SW_HIDE, $shtdwn)
$off_enabled = 0
EndIf
EndFuncFunc _appsgui ()
[/autoit] [autoit][/autoit] [autoit]
WinMove (WinGetHandle ("[CLASS:DV2ControlHost]"), "", 0, 36)
WinSetState (WinGetHandle ("[CLASS:DV2ControlHost]"), "", @SW_SHOW)
GUISetState (@SW_HIDE, $shtdwn)
$off_enabled = 0
GUISetState (@SW_HIDE, $dategui)
$date_enabled = 0
EndFuncFunc onautoitexit ()
[/autoit]
WinSetTrans ("[CLASS:BaseBar]", "", 255)
WinSetState (WinGetHandle ("[CLASS:DV2ControlHost]"), "", @SW_SHOW)
Exit 0
EndFunc -
Kleine Anregung: Ich kenn much ja mit GDI+ nicht aus, aber geht das:
1. das Bild wird generwiert
2. Das Bild wird in einem anderen an einen beliebigen PLatz gesetzt (GUI)
3. Es gibt einen speziellen Anfangscode (iwe bei QR), mitdem das Auslese-script den code wieder findet, ausschneidet und zurückverwandelt!
mfg -
Es gibt ein Bsp. in der Hilfe (ich glaube zu run()), welches genau das ist, was du suchst.
mfg -
Ich habe AutoIt AUSSCHLIE?LICH durc die Beispiele im Forum und aus der Hilfe erlernt.
Wenn HansWurst php erlernen möchte, ist jedes Beispiel ein Schritt nach vorne.
mfg -
Mich hätte es interessiert...kannst du bitte das Script wieder posten?
mfg -
Zitat von Rapidshare
Diese Datei ist weder einem Premiumaccount, noch einem Collector's Account zugeordnet und kann deshalb insgesamt nur 10 mal heruntergeladen werden.
Dieses Limit ist erreicht.
Um diese Datei herunterladen zu können, muss der Anbieter entweder die Datei in seinen Collector's Account verschieben, oder die Datei erneut raufladen. Die Datei kann nachträglich in ein Collector's Account verschoben werden. Der Anbieter muss nur auf den Löschlink der Datei klicken, um mehr Informationen zu erhalten.
-
Ich glaube, du meinst das BIOS-Passwort. Wenn dein Rechner startet, kommt zuerst ein Bild, Text, etc. da müsste irgendwie stehen, mit welcher Taste du ins Setup kommst (Entf zB). Du musst danach suchen, wo du das Passwort einstellen kannst. Meistens in Security.
mfg tobi -
https://autoit.de/index.php?page=DownloadDB (Wurde aus dem Menü herausgenommen)
-
Raffinierte Lösung! Toll für einen UnInstaller!
mfg tobi -
-
Einen Bedankomat finde ich überflüssig und vorallem unpersönlich. Wenn etwas am Foruum fehlt, ist es ein Simplereply wie im the-coderz.de-Forum.
mfg tobi -
Fürs englische Forum?
Englisch = Weltsprache
Deutsch=! Weltsprache -
-
Ich bin jetzt zu faul, alles zu lesen, aber verstehe ich das richtig: es soll ein Android's Market, Ubuntu's SoftwareCenter, iPhone's AppStore für Windows werden?
mfg tobi_girst -
Das wird (bei meinem) auf die Lautsprecher übertragen!
mfg tobi_girst -
9
PS:der Tread hat mehr Antworten, als der DesktopRadio! -
Die Uhr find ich gut, aber sie stürtzt beim [x]-klicken ab!
Die Errormeldung unter Ubuntu 9.10 mit Wine:Spoiler anzeigen
>"C:\Programme\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "Z:\home\tobias\Desktop\GDIPlus DigitalUhr.au3"
Unhandled exception: page fault on read access to 0x42a00004 in 32-bit code (0x693b82fc).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
EIP:693b82fc ESP:008ce82c EBP:008ce854 EFLAGS:00010206( R- -- I - -P- )
EAX:00000002 EBX:693e6ff4 ECX:008ce890 EDX:693d6360
ESI:42a00000 EDI:004a5920
Stack dump:
0x008ce82c: 00414da6 004a5920 010b8b30 008cec78
0x008ce83c: 008ce87c 00414da6 009e0000 693b60ba
0x008ce84c: 693e6ff4 001e2248 008ce884 693d63af
0x008ce85c: 42a00000 004a5920 008ce850 008ce854
0x008ce86c: 008cfea8 00418b20 a67f7b47 693d636a
0x008ce87c: 008cec78 693a0000 008ce8c4 004120a1
Backtrace:
=>0 0x693b82fc GdipDeleteCustomLineCap+0x2c() in gdiplus (0x008ce854)
1 0x693d63af GdipDeletePen+0x4f() in gdiplus (0x008ce884)
2 0x004120a1 in autoit3 (+0x120a1) (0x008ce8c4)
3 0x004752ae in autoit3 (+0x752ae) (0x008cec38)
4 0x00406f92 in autoit3 (+0x6f92) (0x00000011)
5 0x00000000 (0x00000000)
0x693b82fc GdipDeleteCustomLineCap+0x2c in gdiplus: movl 0x4(%esi),%eax
Modules:
Module Address Debug info Name (126 modules)
PE 400000- 4c8000 Export autoit3
ELF 68000000-6813c000 Deferred libwine.so.1
ELF 6813c000-68155000 Deferred libpthread.so.0
ELF 68155000-68299000 Deferred libc.so.6
ELF 68299000-6829d000 Deferred libdl.so.2
ELF 6829d000-682b4000 Deferred libnsl.so.1
ELF 682b4000-682bf000 Deferred libnss_nis.so.2
ELF 682bf000-682cb000 Deferred libnss_files.so.2
ELF 682cb000-682e6000 Deferred wsock32<elf>
\-PE 682d0000-682e6000 \ wsock32
ELF 682e6000-68310000 Deferred ws2_32<elf>
\-PE 682f0000-68310000 \ ws2_32
ELF 68310000-68330000 Deferred iphlpapi<elf>
\-PE 68320000-68330000 \ iphlpapi
ELF 68330000-68344000 Deferred libresolv.so.2
ELF 68344000-6835e000 Deferred version<elf>
\-PE 68350000-6835e000 \ version
ELF 6835e000-68372000 Deferred lz32<elf>
\-PE 68360000-68372000 \ lz32
ELF 68372000-683f9000 Deferred winmm<elf>
\-PE 68380000-683f9000 \ winmm
ELF 683f9000-68545000 Deferred user32<elf>
\-PE 68410000-68545000 \ user32
ELF 68545000-6860f000 Deferred comctl32<elf>
\-PE 68550000-6860f000 \ comctl32
ELF 6860f000-68632000 Deferred mpr<elf>
\-PE 68620000-68632000 \ mpr
ELF 68632000-68689000 Deferred wininet<elf>
\-PE 68640000-68689000 \ wininet
ELF 68689000-686e6000 Deferred shlwapi<elf>
\-PE 686a0000-686e6000 \ shlwapi
ELF 686e6000-686fc000 Deferred psapi<elf>
\-PE 686f0000-686fc000 \ psapi
ELF 686fc000-68711000 Deferred userenv<elf>
\-PE 68700000-68711000 \ userenv
ELF 68711000-687c4000 Deferred comdlg32<elf>
\-PE 68720000-687c4000 \ comdlg32
ELF 687c4000-687f8000 Deferred winspool<elf>
\-PE 687d0000-687f8000 \ winspool
ELF 687f8000-688f4000 Deferred ole32<elf>
\-PE 68810000-688f4000 \ ole32
ELF 688f4000-68962000 Deferred rpcrt4<elf>
\-PE 68900000-68962000 \ rpcrt4
ELF 68962000-689e1000 Deferred libfreetype.so.6
ELF 689e1000-68a0e000 Deferred libfontconfig.so.1
ELF 68a0e000-68a35000 Deferred libexpat.so.1
ELF 68a35000-68ad4000 Deferred winex11<elf>
\-PE 68a40000-68ad4000 \ winex11
ELF 68ad4000-68add000 Deferred libsm.so.6
ELF 68add000-68af8000 Deferred libice.so.6
ELF 68af8000-68c27000 Deferred libx11.so.6
ELF 68c27000-68c2c000 Deferred libuuid.so.1
ELF 68c2c000-68c30000 Deferred libxau.so.6
ELF 68c30000-68c4e000 Deferred libxcb.so.1
ELF 68c4e000-68c53000 Deferred libxdmcp.so.6
ELF 68c53000-68c56000 Deferred libxinerama.so.1
ELF 68c56000-68c5f000 Deferred libxrandr.so.2
ELF 68c5f000-68c65000 Deferred libxfixes.so.3
ELF 68c65000-68c70000 Deferred libxcursor.so.1
ELF 68c70000-68ca8000 Deferred winealsa<elf>
\-PE 68c80000-68ca8000 \ winealsa
ELF 68caa000-68e3a000 Deferred shell32<elf>
\-PE 68cc0000-68e3a000 \ shell32
ELF 68e3d000-68e7d000 Deferred libpulse.so.0
ELF 68e7d000-68ec7000 Deferred libpulsecommon-0.9.19.so
ELF 68ec7000-68ecd000 Deferred libxtst.so.6
ELF 68ecd000-68ed6000 Deferred libwrap.so.0
ELF 68ed6000-68f42000 Deferred libsndfile.so.1
ELF 68f42000-68f7b000 Deferred libdbus-1.so.3
ELF 68f7b000-68fcb000 Deferred libflac.so.8
ELF 68fcb000-690c7000 Deferred libvorbisenc.so.2
ELF 690c7000-690f0000 Deferred libvorbis.so.0
ELF 690f0000-690f7000 Deferred libogg.so.0
ELF 690f7000-690fe000 Deferred libasound_module_pcm_pulse.so
ELF 690fe000-69117000 Deferred msacm32<elf>
\-PE 69100000-69117000 \ msacm32
ELF 69117000-6913d000 Deferred msacm32<elf>
\-PE 69120000-6913d000 \ msacm32
ELF 6913d000-69170000 Deferred uxtheme<elf>
\-PE 69140000-69170000 \ uxtheme
ELF 69170000-69190000 Deferred localspl<elf>
\-PE 69180000-69190000 \ localspl
ELF 69190000-691a9000 Deferred spoolss<elf>
\-PE 691a0000-691a9000 \ spoolss
ELF 691a9000-691ee000 Deferred libcups.so.2
ELF 691ee000-6921b000 Deferred libgssapi_krb5.so.2
ELF 6921b000-692c3000 Deferred libgnutls.so.26
ELF 692c3000-692cf000 Deferred libavahi-common.so.3
ELF 692cf000-692e0000 Deferred libavahi-client.so.3
ELF 692e0000-6930b000 Deferred libk5crypto.so.3
ELF 6930b000-6930f000 Deferred libcom_err.so.2
ELF 6930f000-69313000 Deferred libkeyutils.so.1
ELF 69313000-6938f000 Deferred libgcrypt.so.11
ELF 6938f000-69394000 Deferred libgpg-error.so.0
ELF 69394000-693ed000 Export gdiplus<elf>
\-PE 693a0000-693ed000 \ gdiplus
ELF 69866000-6986e000 Deferred libnss_compat.so.2
ELF 6aa2b000-6aa40000 Deferred system.drv16.so
PE 6aa30000-6aa40000 Deferred system.drv16
ELF 6b178000-6b18e000 Deferred libz.so.1
ELF 6bb2d000-6bb31000 Deferred libxcomposite.so.1
ELF 700ea000-700ff000 Deferred midimap<elf>
\-PE 700f0000-700ff000 \ midimap
ELF 70376000-70380000 Deferred libxrender.so.1
ELF 712ce000-712d4000 Deferred libxxf86vm.so.1
ELF 71aba000-71b81000 Deferred libasound.so.2
ELF 72b3e000-72b50000 Deferred libtasn1.so.3
ELF 7328e000-732b4000 Deferred libm.so.6
ELF 73792000-737ea000 Deferred advapi32<elf>
\-PE 737a0000-737ea000 \ advapi32
ELF 748c6000-748cf000 Deferred librt.so.1
ELF 75d92000-75da2000 Deferred libxext.so.6
ELF 77541000-775f3000 Deferred libkrb5.so.3
ELF 77c76000-77c7f000 Deferred libkrb5support.so.0
ELF 77d7e000-77e1e000 Deferred gdi32<elf>
\-PE 77d90000-77e1e000 \ gdi32
ELF 7a689000-7a6aa000 Deferred imm32<elf>
\-PE 7a690000-7a6aa000 \ imm32
ELF 7b779000-7b796000 Deferred ld-linux.so.2
ELF 7b800000-7b972000 Deferred kernel32<elf>
\-PE 7b820000-7b972000 \ kernel32
ELF 7bc00000-7bcb3000 Deferred ntdll<elf>
\-PE 7bc10000-7bcb3000 \ ntdll
ELF 7bf00000-7bf04000 Deferred <wine-loader>
ELF 7c65f000-7c744000 Deferred oleaut32<elf>
\-PE 7c680000-7c744000 \ oleaut32
Threads:
process tid prio (all id:s are in hex)
0000000e
00000034 0
0000002b 0
0000001d 0
0000001c 0
00000015 0
00000010 0
0000000f 0
00000019
00000022 0
00000021 0
0000001e 0
0000001b 0
0000001a 0
00000023
00000024 0
00000028
0000002d 0
0000002c 0
0000002a 0
00000029 0
0000002e
0000003f 0
0000002f 0
00000040 (D) C:\Programme\AutoIt3\AutoIt3.exe
00000013 0
00000041 0 <==
Backtrace:
=>0 0x693b82fc GdipDeleteCustomLineCap+0x2c() in gdiplus (0x008ce854)
1 0x693d63af GdipDeletePen+0x4f() in gdiplus (0x008ce884)
2 0x004120a1 in autoit3 (+0x120a1) (0x008ce8c4)
3 0x004752ae in autoit3 (+0x752ae) (0x008cec38)
4 0x00406f92 in autoit3 (+0x6f92) (0x00000011)
5 0x00000000 (0x00000000)
>Exit code: -1073741819 Time: 33.850
Ach ja: Es währe vielleicht geschickter, wenn du nur die Zahlen ändern würdest, die sich auch verändern (Also nicht 11:16:06 sondern nur 11:16:06)
mfg tobi_girst -
Wie wär's mit verkleinern?
-
Der Bildschirm wird vorher Minimiert
[autoit]Func OnAutoItStart ();$del = True)
[/autoit]
WinMinimizeAll ()
EndFunc
[autoit]
danach wieder angezeigtFunc OnAutoItExit ();$del = True)
[/autoit]
WinMinimizeAllUndo ()
EndFunc
Eigentlich sollte es damit doch die Pixel löschen.
Bin (wie immer) am Ubuntu und kanns nicht testen. Starte VM und teste gleich!
mfg tobi_girst-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
Habs gefixt! Zwar nicht professionell, aber es geht!
Spoiler anzeigen
[autoit]#NoTrayIcon
[/autoit] [autoit][/autoit] [autoit]
_scrnsav (-2)Func _scrnsav ($type = 0);, $del = True, $progs = True)
[/autoit] [autoit][/autoit] [autoit]
$VirtualDesktopWidth = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 78);sm_virtualwidth
$VirtualDesktopHeight = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 79);sm_virtualheight
$dc = DllCall ("user32.dll", "int", "GetDC", "hwnd", "")
If $type = -1 Then
$type = Random (1, 8, 1)
EndIf
#made by tobi_girst (http://www.autoit.de)
Switch $type
Case 1
For $x = 0 To $VirtualDesktopWidth [0]
For $y = 0 To $VirtualDesktopHeight [0]
$color = Random (0x000000, 0xFFFFFF)
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 2
For $x = 0 To $VirtualDesktopWidth [0]
$color = Random (0x000000, 0xFFFFFF)
For $y = 0 To $VirtualDesktopHeight [0]
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 3
For $y = 0 To $VirtualDesktopHeight [0]
For $x = 0 To $VirtualDesktopWidth [0]
$color = Random (0x000000, 0xFFFFFF)
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 4
For $y = 0 To $VirtualDesktopHeight [0]
$color = Random (0x000000, 0xFFFFFF)
For $x = 0 To $VirtualDesktopWidth [0]
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 5
For $x = $VirtualDesktopWidth [0] To 0 Step -1
For $y = $VirtualDesktopHeight [0] To 0 Step -1
$color = Random (0x000000, 0xFFFFFF)
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 6
For $x = $VirtualDesktopWidth [0] To 0 Step -1
$color = Random (0x000000, 0xFFFFFF)
For $y = $VirtualDesktopHeight [0] To 0 Step -1
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 7
For $y = $VirtualDesktopHeight [0] To 0 Step -1
For $x = $VirtualDesktopWidth [0] To 0 Step -1
$color = Random (0x000000, 0xFFFFFF)
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 8
For $y = $VirtualDesktopHeight [0] To 0 Step -1
$color = Random (0x000000, 0xFFFFFF)
For $x = $VirtualDesktopWidth [0] To 0 Step -1
DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
Next
_test ()
Next
Case 0
_scrnsav(1)
_scrnsav(2)
_scrnsav(3)
_scrnsav(4)
_scrnsav(5)
_scrnsav(6)
_scrnsav(7)
_scrnsav(8)
Case -2
_scrnsav(1)
_scrnsav(4)
_scrnsav(5)
_scrnsav(8)
_scrnsav(3)
_scrnsav(2)
_scrnsav(7)
_scrnsav(6)
EndSwitch
EndFuncFunc _IdleTicks() ;von UEZ (http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit]
Local $aTSB = DllCall("kernel32.dll", "long", "GetTickCount")
Local $ticksSinceBoot = $aTSB[0]
Local $struct = DllStructCreate("uint;dword")
DllStructSetData($struct, 1, DllStructGetSize($struct))
DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($struct))
Local $ticksSinceIdle = DllStructGetData($struct, 2)
Return ($ticksSinceBoot - $ticksSinceIdle)
EndFunc ;==>_IdleTicksFunc _test ()
[/autoit] [autoit][/autoit] [autoit]
Global $last
$new = _IdleTicks()
If $new < $last Then
Exit
EndIf
$last = $new
EndFuncFunc OnAutoItExit ()
[/autoit]
GUICreate ("", @desktopwidth, @desktopheight, 0, 0, 0x80000000, 0x00000080)
GUISetState ()
EndFunc