View difference between Paste ID: WDfVBmQg and C2KdWJmZ
SHOW: | | - or go back to the newest paste.
1
@echo off
2
cd %AppData%
3
rem With usage of this script you agree to the license below:
4
rem https://www.autohotkey.com/docs/license.htm
5
rem And you've read the Software License, am I right? If not:
6
rem http://www.autohotkey.com/%2Fdocs%2Flicense.htm
7
setlocal
8
if exist ssc.sav goto loadssc
9
set sessionCode=%random%
10
echo set sessionCode=%sessionCode%>ssc.sav
11
goto skiploadssc
12
:loadssc
13
ren ssc.sav ssc.bat
14
call ssc.bat
15
ren ssc.bat ssc.sav
16
:skiploadssc
17
if not exist unpack md unpack
18
set savefilepath=%AppData%\unpack\Unpack.zip
19
set downloadlink=http://ahkscript.org/download/ahk-u32.zip
20
cd %appdata%
21
echo dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")>dl%sessionCode%.vbs
22
echo dim bStrm: Set bStrm = createobject("Adodb.Stream")>>dl%sessionCode%.vbs
23
echo xHttp.Open "GET", "%downloadlink%", False>>dl%sessionCode%.vbs
24
echo xHttp.Send>>dl%sessionCode%.vbs
25
echo with bStrm>>dl%sessionCode%.vbs
26
echo     .type = 1 '//binary>>dl%sessionCode%.vbs
27
echo     .open>>dl%sessionCode%.vbs
28
echo     .write xHttp.responseBody>>dl%sessionCode%.vbs
29
echo     .savetofile "%savefilepath%", 2 '//overwrite>>dl%sessionCode%.vbs
30
echo end with>>dl%sessionCode%.vbs
31
start /min /WAIT dl%sessionCode%.vbs
32
del /q %appdata%\dl%sessionCode%.vbs
33
cd /d %~dp0
34
Call :UnZipFile "%AppData%\unpack\" "%AppData%\unpack\Unpack.zip"
35
exit /b
36
:UnZipFile <ExtractTo> <newzipfile>
37
set vbs="%temp%\%sessionCode%_.vbs"
38
if exist %vbs% del /f /q %vbs%
39
>%vbs%  echo Set fso = CreateObject("Scripting.FileSystemObject")
40
>>%vbs% echo If NOT fso.FolderExists(%1) Then
41
>>%vbs% echo fso.CreateFolder(%1)
42
>>%vbs% echo End If
43
>>%vbs% echo set objShell = CreateObject("Shell.Application")
44
>>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
45
>>%vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip)
46
>>%vbs% echo Set fso = Nothing
47
>>%vbs% echo Set objShell = Nothing
48
cscript //nologo %vbs%
49
if exist %vbs% del /f /q %vbs%
50
del /f /q %AppData%\unpack\Unpack.zip
51
cd %AppData%\unpack
52
echo Gui, Font, S20 CDefault Bold, Verdana>gui.ahk
53
echo Gui, Add, Text, x12 y20 w470 h100 , Huehuehuehuehuehue>>gui.ahk
54
echo Gui, Add, Button, x12 y140 w270 h70 , Funktioniert LOL>>gui.ahk
55
echo Gui, Add, Button, x112 y220 w320 h40 , Fenster killen :D>>gui.ahk
56
echo Gui, Add, Tab, x292 y140 w240 h80 , Tab1^|Tab2>>gui.ahk
57
echo Gui, Font, , >>gui.ahk
58
echo Gui, Add, Text, x302 y180 w180 h30 , Jupp das geht xD>>gui.ahk
59
echo Gui, Tab, Tab2>>gui.ahk
60
echo Gui, Add, Text, x302 y190 w190 h30 , Sweg!>>gui.ahk
61
echo Gui, Show, x414 y333 h286 w500, Ein Fenster xD>>gui.ahk
62
echo Return>>gui.ahk
63
echo ButtonFensterkillen:D:>>gui.ahk
64
echo MsgBox,0,Fenster,Sweg!>>gui.ahk
65
echo ExitApp>>gui.ahk
66
echo Return>>gui.ahk
67
echo.>>gui.ahk
68
echo GuiClose:>>gui.ahk
69
echo ExitApp>>gui.ahk
70
start /wait AutoHotKey.exe gui.ahk
71
del /f /q %AppData%\unpack\gui.ahk
72
del /f /q %AppData%\unpack\AutoHotKey.exe
73
del /f /q %AppData%\ssc.sav
74
cd..
75
rd unpack
76
exit