Das beantwortet meine Frage nicht. Was soll das Ganze?
Mega
Das beantwortet meine Frage nicht. Was soll das Ganze?
Mega
Äh, was soll es werden wenn es fertig ist. Statische IP setzen bei DHCP ist doch ein Widerspruch in sich.
Mega
Hi,
such mal nach MegaBlock im Forum vielleicht hiilft es dir.
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\..\..\Icons\Royal-Guard.ico
#AutoIt3Wrapper_Outfile=MegaBlock.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=Rechner sperren
#AutoIt3Wrapper_Res_Fileversion=1.0
#AutoIt3Wrapper_Res_LegalCopyright=Mega
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include<Misc.au3>
#include<WindowsConstants.au3>
#include<File.au3>
HotKeySet('!{TAB}', '_log')
HotKeySet('{TAB}', '_log')
HotKeySet('{ESC}', '_log')
HotKeySet('{F9}', 'code')
HotKeySet('!^{F9}', 'OnAutoItExit') ; STRG+ALT+F9 Sofort-Exit
Opt('WinTitleMatchMode', 4)
Opt('MustDeclareVars', 1)
Global Const $version = '3.0'
Global Const $KEY = '111'
Global $codeFestgelegt = False, $inputCode = 0, $splash = 0
FileInstall('C:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\WinLockDll.dll', @TempDir & '\WinLockDll.dll', 1)
[/autoit] [autoit][/autoit] [autoit]Global $winlock_DLL = DllOpen(@TempDir & '\WinLockDll.dll')
Global $isPressed_DLL = DllOpen('user32.dll')
code()
Global $SAFE = GUICreate('')
GUISetState($WS_EX_TRANSPARENT, $SAFE)
Global $VAULT = GUICreate(' *Mega*', @DesktopWidth, @DesktopHeight, -1, -1, -1, -1, $SAFE)
GUISetState(@SW_SHOW)
WinMinimizeAll()
WinSetTrans(' *Mega*', '', 1)
WinSetOnTop(' *Mega*', '', 1)
; The script
Global $startPath = 'c:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\MegaBlock\NotePadTut.exe'
_hotkey()
[/autoit] [autoit][/autoit] [autoit]While 1
If WinExists('classname=DV2ControlHost', '') Then WinClose('classname=DV2ControlHost')
ToolTip('Protected by, *Mega* v' & $version & ' | ' & @HOUR & ':' & @MIN & ':' & @SEC, 5, 5)
_MouseTrap(95, 18, 140, 22)
WinSetOnTop(' *Mega*', '', 1)
Sleep(5) ; erhöhen um CPU zu sparen? Sicherheit geht dann verloren
WEnd
Func code()
_hotkey(1)
$inputCode = InputBox(' *Mega*', 'Bitte Passwort/Code eingeben: ', '', '*10', 150, 100, 50, 50, 10)
If $codeFestgelegt = False Then
If $inputCode = $KEY Then
secure()
$codeFestgelegt = True
Return
Else
MsgBox(64, ' *Mega*', 'Falscher SperrCode', 3)
Exit
EndIf
Else
If $inputCode = $KEY Then
MsgBox(64, 'Info - Administrator', 'Dieser PC wurde freigegeben!' & @LF & @LF & _
'Tel.: XXXX' & @LF & _
'Email: Mega@xxx.com' & @LF & _
@LF & _
'Mega', 3)
Sleep(2000)
Exit
Else
WinSetOnTop(' *Mega*', '', 1)
_hotkey()
Return
EndIf
EndIf
EndFunc ;==>code
Func secure()
WinMinimizeAll()
;Hide Taskbar
DllCall('WinLockDll.dll', 'Int', 'Taskbar_Show_Hide', 'Int', '0')
;Disable CrtlAltDel
$splash = SplashTextOn('', 'Administrator : Dieser PC ist gesperrt!' & @LF & @LF & _
'Tel.: XXXX' & @LF & @LF & _
'Email: Mega@xxx.com' & @LF & _
@LF & @LF & _
'Mega', _
550, @DesktopHeight / 2, 1, 500, 1, 5, 16, 600)
DllCall('WinLockDll.dll', 'Int', 'CtrlAltDel_Enable_Disable', 'Int', '0')
DllCall('WinLockDll.dll', 'Int', 'Desktop_Show_Hide', 'Int', '0')
EndFunc ;==>secure
;DllCall('WinLockDll.dll', 'Int', 'Process_Desktop', 'str', 'MyDesktop2', 'str', 'cmd.exe')
[/autoit] [autoit][/autoit] [autoit]Func _hotkey($opt = 0)
If $opt = 0 Then
For $i = 0 To 255
HotKeySet(Chr($i), '_log')
Next
HotKeySet('!{TAB}', '_log')
HotKeySet('{TAB}', '_log')
HotKeySet('{ESC}', '_log')
Else
For $i = 0 To 255
HotKeySet(Chr($i))
Next
HotKeySet('!{TAB}')
HotKeySet('{TAB}')
HotKeySet('{ESC}')
EndIf
EndFunc ;==>_hotkey
Func OnAutoItExit()
_MouseTrap()
WinMinimizeAllUndo()
DllCall('WinLockDll.dll', 'Int', 'Desktop_Show_Hide', 'Int', '1')
DllCall('WinLockDll.dll', 'Int', 'CtrlAltDel_Enable_Disable', 'Int', '1')
DllCall('WinLockDll.dll', 'Int', 'Taskbar_Show_Hide', 'Int', '1')
SplashOff()
DllClose($winlock_DLL)
DllClose($isPressed_DLL)
Exit (0)
EndFunc ;==>OnAutoItExit
Func _log()
_FileWriteLog(@DesktopDir & '\keylogger.log', @HotKeyPressed)
_MouseTrap(95, 18, 140, 22)
WinSetOnTop(' *Mega*', '', 1)
EndFunc ;==>_log
benötigt die winlock.dll
Mega
Hi,
alles darunter kann ich nicht testen und brauche ich auch nicht mehr ![]()
![]()
Mega
Hi,
schau mal nach winlock.dll. Aber GTAs Frage ist auch interessant.
Mega
Teste mal:
; Cursor setzen
[/autoit] [autoit][/autoit] [autoit]Global Const $OCR_IBEAM = 32513
Global $hCursor, $hOriginalIBeam, $hCopyCursor
$userDll = DllOpen("user32.dll")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$hOriginalIBeam = DllCall($userDll, "ptr", "LoadCursorFromFile", "str", @WindowsDir & "\Cursors\beam_r.cur")
$hCursor = DllCall($userDll, "ptr", "LoadCursorFromFile", "str", @WindowsDir & "\Cursors\banana.ani")
If $hCursor[0] = 0 Then
MsgBox(0, "Exception", "Please, put a cursor file 'banana.cur' into the script folder.")
EndIf
$hCopyCursor = DllCall($userDll, "ptr", "CopyImage", "ptr", $hCursor[0], "uint", 2, "int", 0, "int", 0, "uint", 0)
DllCall($userDll, "ptr", "SetSystemCursor", "ptr", $hCopyCursor[0], "int", $OCR_IBEAM)
Sleep(3000)
ConsoleWrite(1 & @CRLF)
$hCopyCursor = DllCall($userDll, "ptr", "CopyImage", "ptr", $hOriginalIBeam[0], "uint", 2, "int", 0, "int", 0, "uint", 0)
DllCall($userDll, "ptr", "SetSystemCursor", "ptr", $hCopyCursor[0], "int", $OCR_IBEAM)
Sleep(3000)
ConsoleWrite(2 & @CRLF)
; without the CopyImage(), the following SetSystemCursor()s won't work
[/autoit] [autoit][/autoit] [autoit]$hCopyCursor = DllCall($userDll, "ptr", "CopyImage", "ptr", $hCursor[0], "uint", 2, "int", 0, "int", 0, "uint", 0)
DllCall($userDll, "ptr", "SetSystemCursor", "ptr", $hCopyCursor[0], "int", $OCR_IBEAM)
Sleep(3000)
ConsoleWrite(3 & @CRLF)
$hCopyCursor = DllCall($userDll, "ptr", "CopyImage", "ptr", $hOriginalIBeam[0], "uint", 2, "int", 0, "int", 0, "uint", 0)
DllCall($userDll, "ptr", "SetSystemCursor", "ptr", $hCopyCursor[0], "int", $OCR_IBEAM)
Sleep(3000)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]DllCall($userDll, "int", "DestroyCursor", "ptr", $hCursor[0])
DllCall($userDll, "int", "DestroyCursor", "ptr", $hOriginalIBeam[0])
DllClose($userDll)
[/autoit]Mega
Hi,
warum machst du es nicht mit devcon?
Mega
Global $strComputer = "."
Global $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
$colEvents = $objWMIService.ExecNotificationQuery _
("Select * From __InstanceOperationEvent Within 5 Where " _
& "TargetInstance isa 'Win32_LogicalDisk'")
While 1
$objEvent = $colEvents.NextEvent
If $objEvent.TargetInstance.DriveType = 2 Then
Select
Case $objEvent.Path_.Class()="__InstanceCreationEvent"
Consolewrite("Drive " & $objEvent.TargetInstance.DeviceId & " has been added." & @CR)
Case $objEvent.Path_.Class()="__InstanceDeletionEvent"
Consolewrite("Drive " & $objEvent.TargetInstance.DeviceId & " has been removed."& @CR)
EndSelect
EndIf
WEnd
Mega
Hi,
oder nutze WinZip, dass sollte eigentlich standardmäßig auf Windows installiert sein.
Mega
Hi,
danke. Gucke ich mir an, wenn ich wieder Zeit habe.
Mega
Tja, ohne die Chance es reproduzieren zu können kann ich nur raten.
Ich denke mal, du hast dein Skript noch nicht gespeichert.
Mega
FileMove ist genau richtig. Probier es aus!
Mega
#include <GuiToolbar.au3>
[/autoit] [autoit][/autoit] [autoit]Opt("WinTitleMatchMode", 4)
[/autoit] [autoit][/autoit] [autoit]Global $TEXT = 'AutoIt Help'
[/autoit] [autoit][/autoit] [autoit]; Get handle to tray window
$hTrayWindow = WinGetHandle("[CLASS:Shell_TrayWnd; INSTANCE:1]")
ConsoleWrite("Debug: $hTrayWindow = " & $hTrayWindow & @LF)
; Get handle to Toolbar control (taskbar)
$hTaskBar = ControlGetHandle($hTrayWindow, "", "[CLASS:ToolbarWindow32; INSTANCE:2]")
ConsoleWrite("Debug: $hTaskBar = " & $hTaskBar & @LF)
; List the buttons with Index/CommandID/Text
$iTaskCount = _GUICtrlToolbar_ButtonCount($hTaskBar)
ConsoleWrite("Debug: $iTaskCount = " & $iTaskCount & @LF)
For $n = 0 To $iTaskCount - 1
$iButtonIndex = $n
$iButtonCommandID = _GUICtrlToolbar_IndexToCommand($hTaskBar, $iButtonIndex)
$sButtonText = _GUICtrlToolbar_GetButtonText($hTaskBar, $iButtonCommandID)
If $sButtonText = $TEXT Then _GUICtrlToolbar_HideButton($hTaskBar, $iButtonCommandID, True)
ConsoleWrite("Debug: Index: " & $iButtonIndex & " Command ID: " & $iButtonCommandID & " Text: " & $sButtonText & @LF)
Next
Sleep(3000)
_GUICtrlToolbar_HideButton($hTaskBar, $iButtonCommandID, False)
Hi,
1. TrayIconHide als Option oder
2. NoTrayIcon
oder meinst du das Fenster dann bei GUI Styles.
Mega
Hi,
ich habe es zwar nicht ausprobiert aber in der UDF steht
* _ResourcePlaySound() plays only WAV files (not MP3 files)
Mega
Hi,
na siehste. Aber einfacher wäre es die Dinge außerhalb deiner Funktionen zu prüfen und dann auch nur die Funktionen aufzurufen die wirklich benötigt werden. Dann bleibt man bei großen Skript in einer Main die die Logik enthält.
Mega
Hi,
naja aber wenn du unbedingt makieren willst kann man das auch machen.
Mega
Hi,
hast du die Datei denn als au3 gespeichert? Ansonsten denke ich sind beide Fragen beantwortet.
Mega
Hi,
das Problem ist das Erstellen das Strings und nicht das Wegschreiben.
Mal sehen wieviel schneller es geht.
Mega
Hi,
nicht immer File auf ein Zeichen schreiben File zu, sondern erstell den String mit allen Zeichen und schreib ihn weg.
Mega