Evening to all, again i have problem with file editing, this time runtime error 62.
What i try to do is, open 1 file (default file for my program), for input
then take values from textboxes and replace default values and save it as file2.
I readed file I/O tutorial, but that did not help me much...
My "file editing code " is this:
And default file for input is this:Code:Open SampFolder & "\erpmod\mod\tooresbind.sav" For Input As #1 Open SampFolder & "\erpbind.sav" For Output As #2 ' make sure different path then the original file or different name Do While Not EOF(1) Input #1, tooresBind1 bind1 = Replace(tooresBind1, "tooresbind1", Text1.Text) Print #2, bind1 ' Input #1, tooresBind2 bind2 = Replace(tooresBind2, "tooresbind2", Text2.Text) Print #2, bind2 Input #1, tooresBind3 bind3 = Replace(tooresBind3, "tooresbind3", Text3.Text) Print #2, bind3 Input #1, tooresBind4 bind4 = Replace(tooresBind4, "tooresbind4", Text4.Text) Print #2, bind4 Input #1, tooresBind5 bind5 = Replace(tooresBind5, "tooresbind5", Text5.Text) Print #2, bind5 Input #1, tooresBind6 bind6 = Replace(tooresBind6, "tooresbind6", Text6.Text) Print #2, bind6 ' Loop Close #1 Close #2
I think it reads input file wrongly...Code:[SendKey] Send1=t/login tooresparool~ Send2=t/mootor~ Send3=t/tooresbind1~ Send4=t/tooresbind2~ Send5=t/tooresbind3~ Send6=t/tooresbind4~ Send7=t/tooresbind5~ Send8=t/tooresbind6~ Send9= Send10= Send11= Send12= Send13= Send14= Send15= Send16= Send17= Send18= Send19= Send20= [HotKey] Key1=42 Key2=43 Key3=0 Key4=1 Key5=2 Key6=3 Key7=4 Key8=5 Key9=8 Key10=9 Key11=10 Key12=11 Key13=12 Key14=13 Key15=14 Key16=15 Key17=16 Key18=17 Key19=18 Key20=19 [Activate] act1=True act2=True act3=True act4=True act5=True act6=True act7=True act8=True act9=False act10=False act11=False act12=False act13=False act14=False act15=False act16=False act17=False act18=False act19=False act20=False
I hope you guys understand what i mean (english is not my native language so its hard to explain myself correctly)
Idea is that it takes from input line
And replaces this with Text1.Text value..Code:Send3=t/tooresbind1~
with Text2.Text value, and so on...Code:Send4=t/tooresbind2~
Kindly Regards
Mixman




Reply With Quote