This repository has been archived by the owner on Jul 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
delpick.bas
216 lines (205 loc) · 6.19 KB
/
delpick.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
$INCLUDE "LOGO.INC"
$INCLUDE "PBWINDOW.INC"
if command$="SKIP" or command$="skip" then goto SkipIt
color 15
Lin=csrlin-1
txt$="proudly presents"
txt$(1)=txt$
gosub WriteText
txt$="The Paintbrush Pick Info Remover"
txt$(2)=txt$
print
Lin=csrlin-1
delay 1
gosub WriteText
delay 1
color 9
Anf1=40-int(len(txt$(1))/2)+1
Anf2=40-int(len(txt$(2))/2)+1
locate Lin-1,Anf1:print txt$(1)
locate Lin,Anf2:print txt$(2)
delay .15
color 3
locate Lin-1,Anf1:print txt$(1)
locate Lin,Anf2:print txt$(2)
delay .15
color 11
locate Lin-1,Anf1:print Txt$(1)
locate Lin,Anf2:print txt$(2)
delay .15
color 15
locate Lin-1,Anf1:print txt$(1)
locate Lin,Anf2:print txt$(2)
goto Program
WriteText:
AnfLocX=40-int(len(txt$)/2)
x=1
1 if x>0 then LetA$=mid$(txt$,x,1)
if x>1 then LetB$=mid$(txt$,x-1,1)
if x>2 then LetC$=mid$(txt$,x-2,1)
if x>3 then LetD$=mid$(txt$,x-3,1)
if x>4 then LetE$=mid$(txt$,x-4,1)
if x>0 then color 15:locate Lin,AnfLocX+x:print LetA$
if x>1 then color 11:locate Lin,AnfLocX+x-1:print LetB$
if x>2 then color 3:locate Lin,AnfLocX+x-2:print LetC$
if x>3 then color 9:locate Lin,AnfLocX+x-3:print LetD$
if x>4 then color 1:locate Lin,AnfLocX+x-4:print LetE$
x=x+1:if x>len(txt$)+4 then 2 else delay .05:goto 1
2 delay 1
color 15:locate Lin,AnfLocX+1:print txt$
delay .1:color 11:locate Lin,AnfLocX+1:print txt$
delay .1:color 3:locate Lin,AnfLocX+1:print txt$
delay .1:color 9:locate Lin,AnfLocX+1:print txt$
delay .1:color 1:locate Lin,AnfLocX+1:print txt$
return
SkipIt:
color 15
txt$="proudly presents"
locate csrlin-1,40-int(len(txt$)/2):print txt$
txt$="The Paintbrush Pick Info Remover"
locate csrlin,40-int(len(txt$)/2):print txt$
goto Program
Program:
Item$(0)="[Programm w„hlen]"
gosub PF2:test=1
gosub CheckForPresence
gosub PF3:test=2
gosub CheckForPresence
gosub PCP:test=3
gosub CheckForPresence
Lin=17
call MakeWindow (15,9,5,63,ColAttr%(11,0),2,4,2)
call TitleWindow (1,"[Information]")
txt$="Zum Abbrechen [ESC] drcken, ansonsten eine Auswahl treffen"
if command$="skip" or command$="SKIP" then
locate Lin,40-int(len(txt$)/2)
color 15,0
print txt$
goto 7
end if
gosub WriteText:delay 1
color 9:locate 17,AnfLocX+1:print txt$:delay .15
color 3:locate 17,AnfLocX+1:print txt$:delay .15
color 11:locate 17,AnfLocX+1:print txt$:delay .15
color 15:locate 17,AnfLocX+1:print txt$
7 Call MakeMenu (3,3,ColAttr%(11,1),ColAttr%(0,3),4,4,2,1,3,Item$())
if CurntPos%=0 then ag=0:goto BreakItUp
if CurntPos%=1 and right$(Item$(1),17)<>"[nicht vorhanden]" then ag=0:gosub PF2:goto 20 else ag=1:goto 7
if CurntPos%=2 and right$(Item$(2),17)<>"[nicht vorhanden]" then ag=0:gosub PF3:goto 20 else ag=1:goto 7
if CurntPos%=3 and right$(Item$(3),17)<>"[nicht vorhanden]" then ag=0:gosub PCP:goto 20 else ag=1:goto 7
20 if ag=0 then Call RemoveWindow
goto ChangeWININI
CheckForPresence:
open "I",#1,"C:\WINDOWS\WIN.INI"
10 if eof(1) then close #1:return
line input#1,dummy$
if left$(dummy$,1)="[" then
tit$=""
for dummy=2 to 80
if mid$(dummy$,dummy,1)="]" then exit for else tit$=tit$+mid$(dummy$,dummy,1)
next dummy
else
goto 10
end if
if tit$=Title$ then Item$(test)=ProgInfo$:close #1:return else Item$(test)=ProgInfo$+" [nicht vorhanden]":goto 10
PF2:
Title$="PhotoFinish"
ProgInfo$="Photo Finish 2.0"
PickInfo$=lcase$("Pick")
return
PF3:
Title$="Photo Finish 3.0"
ProgInfo$="Photo Finish 3.0"
PickInfo$=lcase$("Pick")
return
PCP:
Title$="PC Paintbrush"
ProgInfo$="PC Paintbrush 1.0"
PickInfo$=lcase$("Pick")
return
ChangeWININI:
call MakeWindow(5,5,15,70,ColAttr%(14,1),1,4,1)
WinTit$="[Editing C:\WINDOWS\WIN.INI]ÄÄÄ[Mode: "+Title$+"]"
call TitleWindow(1,WinTit$)
per%=0
color 14,1
locate 7,8:print"Erstelle Sicherheitskopie von Ausgangs-Datei ... ";
CopyOrd$="COPY C:\WINDOWS\WIN.INI C:\WINDOWS\WIN.PPR /V /Y >NUL"
shell CopyOrd$
print "OK"
locate 8,8:print"™ffne Eingabe-Datei ... ";
open "I",#1,"C:\WINDOWS\WIN.INI"
print "OK"
locate 9,8:print"™ffne Temp-Datei ... ";
open "O",#2,"C:\WINDOWS\PPR.$$$"
print "OK"
zeil=1
6 line input#1,dummy$
if eof(1) then 5 else zeil=zeil+1:goto 6
5 close #1:open "I",#1,"C:\WINDOWS\WIN.INI"
locate 10,8:print "Bearbeite Temp-Datei ... "; '10,33 ist HIER
gosub ShowGraph
aktz=1
3 line input#1,zei$
if left$(zei$,1)="[" then
tit$=""
for g=2 to 80
if mid$(zei$,g,1)="]" then exit for else tit$=tit$+mid$(zei$,g,1)
next g
per%=(aktz/zeil)*100
gosub ShowGraph
print#2,zei$
locate 11,8:print"Momentane Gruppe: ";tit$
else
raus$=zei$
gosub CheckForParam
print#2,raus$
end if
if eof(1) then goto 4
aktz=aktz+1
goto 3
4 locate 11,8:print space$(64)
locate 11,8:print"Schlieáe Eingabe-Datei ... ";
close #1
print"OK"
locate 12,8:print"Schlieáe Temp-Datei ... ";
close #2
print "OK"
locate 13,8:print"L”sche alte WIN.INI ... ";
kill "C:\WINDOWS\WIN.INI"
print "OK"
locate 14,8:print"Benenne Temp-Datei in WIN.INI um ... ";
name "C:\WINDOWS\PPR.$$$" as "C:\WINDOWS\WIN.INI"
print "OK"
locate 16,8:print"Operation abgeschlossen!"
delay 1
call RemoveWindow
color 15,0
locate 24,1:print:print
locate 24,1
print"Alle Pick-Eintr„ge von ";chr$(34);Title$;chr$(34);" wurden entfernt!"
print
end
CheckForParam:
if lcase$(left$(zei$,len(PickInfo$)+2))=PickInfo$+"1=" and tit$=Title$ then raus$=PickInfo$+"1="
if lcase$(left$(zei$,len(PickInfo$)+2))=PickInfo$+"2=" and tit$=Title$ then raus$=PickInfo$+"2="
if lcase$(left$(zei$,len(PickInfo$)+2))=PickInfo$+"3=" and tit$=Title$ then raus$=PickInfo$+"3="
if lcase$(left$(zei$,len(PickInfo$)+2))=PickInfo$+"4=" and tit$=Title$ then raus$=PickInfo$+"4="
return
ShowGraph:
locate 10,57:print using"### %";per%
locate 10,35:print"°°°°°°°°°°°°°°°°°°°°"
locate 10,35
for z=0 to per%/5
if tst=1 then print "²"; else tst=1
next z
return
BreakItUp:
locate 24,1:print:print
call MakeWindow(10,27,5,26,ColAttr%(14,1),5,4,2)
call TitleWindow(1,"[Information]")
color 12,1:locate 12,29:print"Programm abgebrochen !"
if command$="skip" or command$="SKIP" then locate 24,1:end
delay 1.75
call RemoveWindow
locate 24,1:end