Schreiben in Datei

  • #1
S

Sonny Black

Bekanntes Mitglied
Themenersteller
Dabei seit
28.02.2005
Beiträge
280
Reaktionspunkte
0
Ort
Wien
High there!

Ich hab da ne config.cfg Dati. Ich möchte eine bat Datei schreiben, die besagte Datei öffnet, in eine gewisse Zeile springt (z.B. in zeile 23) dort einen Abstand (ENTER) macht und dann was reinschreibt, das speichert und schließt.

Bsp.:

unbindall
bind TAB +showscores
bind ESCAPE cancelselect
bind , buyammo1
bind . buyammo2
bind 0 slot10
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind 5 slot5
bind 6 slot6
bind 7 slot7
bind 8 slot8
bind 9 slot9
bind \ toggleconsole
bind ` toggleconsole
bind a +moveleft
bind b buymenu
bind c radio3
bind d +moveright
bind f +duck
bind g drop
bind h commandmenu
bind i showbriefing
bind j cheer
bind k +voicerecord

da soll die bat Datei folgendes machen:

unbindall
bind TAB +showscores
bind ESCAPE cancelselect
bind , buyammo1
bind . buyammo2
bind 0 slot10
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind 5 slot5
bind 6 slot6
bind 7 slot7
bind 8 slot8
bind 9 slot9
bind \ toggleconsole
bind ` toggleconsole
bind a +moveleft
bind b buymenu

bind c radio3
bind d +moveright
bind f +duck
bind g drop
bind h commandmenu
bind i showbriefing
bind j cheer
bind k +voicerecord

und dann

unbindall
bind TAB +showscores
bind ESCAPE cancelselect
bind , buyammo1
bind . buyammo2
bind 0 slot10
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind 5 slot5
bind 6 slot6
bind 7 slot7
bind 8 slot8
bind 9 slot9
bind \ toggleconsole
bind ` toggleconsole
bind a +moveleft
bind b buymenu
bind c radio3
bind d +moveright
bind f +duck
bind g drop
bind h commandmenu
bind i showbriefing
bind j cheer
bind k +voicerecord

da soll die bat Datei folgendes machen:

unbindall
bind TAB +showscores
bind ESCAPE cancelselect
bind , buyammo1
bind . buyammo2
bind 0 slot10
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind 5 slot5
bind 6 slot6
bind 7 slot7
bind 8 slot8
bind 9 slot9
bind \ toggleconsole
bind ` toggleconsole
bind a +moveleft
bind b buymenu
ICH BIN EIN NEUER BEFEHL UND NUR SO GROß GESCHRIEBEN UM BESSER GESEHEN ZU WERDEN
bind c radio3
bind d +moveright
bind f +duck
bind g drop
bind h commandmenu
bind i showbriefing
bind j cheer
bind k +voicerecord

dann das ganze speichern und schließen!

Wie mach ich das am besten?

Ich hab folgendes: (Win XP)

@echo off
edit C:\Programme\Valve\Steam\SteamApps\papa roach17\counter-strike source\cstrike\cfg\config.cfg
[da weis ich nicht mehr weiter]
save
close

Aber ich nehme nicht an das da was stimmt oder?
 
  • #2
sorry verdrückt!

den teil in der mitte kann man streichen:

und dann

unbindall
bind TAB +showscores
bind ESCAPE cancelselect
bind , buyammo1
bind . buyammo2
bind 0 slot10
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind 5 slot5
bind 6 slot6
bind 7 slot7
bind 8 slot8
bind 9 slot9
bind \ toggleconsole
bind ` toggleconsole
bind a +moveleft
bind b buymenu
bind c radio3
bind d +moveright
bind f +duck
bind g drop
bind h commandmenu
bind i showbriefing
bind j cheer
bind k +voicerecord
 
  • #3
Wäre es nicht einfacher, wenn Du 2 verschieden Versionen dieser Datei hättest, und dann die Batch immer die Eine von den Beiden, die gerade gewünscht ist, an den richtigen Ort kopiert?
 
  • #4
Es geht mir weniger um die Datei! Mehr um die durchführung!
 
Thema:

Schreiben in Datei

ANGEBOTE & SPONSOREN

Statistik des Forums

Themen
113.840
Beiträge
707.963
Mitglieder
51.494
Neuestes Mitglied
Flensburg45
Oben