korasoglu Posted July 30, 2012 Share Posted July 30, 2012 Arkadaşlar kintaronun bul ve değiştir diye bir çalışması vardı. Bu çalışmada 1 tane yazı değişimi yapılabiliyor mesela bunu 15 tane olsa nasıl yapabilirim. Kintaronun kullandığı kod şu [codeBOX]sYol = Input.GetText("yol") sMetin1 = Input.GetText("Input1") sMetin2 = Input.GetText("Input2") if sYol ~= "" and sMetin1 ~= "" and sMetin2 ~= "" then sDosya = TextFile.ReadToString(sYol) nAra = String.Find(sDosya, sMetin1, 1, true) if nAra ~= -1 then sDegisen = String.Replace(sDosya, sMetin1, sMetin2, true) TextFile.WriteFromString(sYol, sDegisen, false) Dialog.TimedMessage("OK", "Değiştirme başarılı!", 2000, MB_ICONINFORMATION) else Dialog.Message("Hata", "Aradığınız kelime mevcut değil", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1) end else Dialog.Message("Hata", "Tüm alanları doldurun", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1) end[/codeBOX] ------------------------------------------------------------------------------------------------------------------------------------------------------------ Birde Html kod ekliyemiyorum yardımınızı bekliyorum Birdiye işaretlediğim yerleri ardışık olarak "2,3,4..." değişkenden alacak ve web sayfasında gösterecek. Ne olur çalışma örneği demeyin zaten örnek hazırlasam sizlere bunu yazmazdım anlayışınız için şimdiden teşekkür ederim [codebox] <html> <body> <table border="1" width="100%" id="table2"> <tr> <td width="157"><font face="Arial" size="2">ADI</font></td> <td><font face="Arial" size="2">1-----</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">SOYADI</font></td> <td><font face="Arial" size="2">2</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">GÖREVİ</font></td> <td><font face="Arial" size="2">3</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">GÖREV YERİ</font></td> <td><font face="Arial" size="2">4</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">TC NO</font></td> <td><font face="Arial" size="2">5</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">ADRES</font></td> <td><font face="Arial" size="2">6</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">CEP TEL 1 </font></td> <td><font face="Arial" size="2">7</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">CEP TEL 2</font></td> <td><font face="Arial" size="2">8</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">EV TEL</font></td> <td><font face="Arial" size="2">9</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">MAİL 1</font></td> <td><font face="Arial" size="2">10</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">MAİL 2</font></td> <td><font face="Arial" size="2">11</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2">KAN GRUBU</font></td> <td><font face="Arial" size="2">12</font></td> </tr> <tr> <td width="157"><font face="Arial" size="2"><br> NOT<br> </font></td> <td><font face="Arial" size="2">13</font></td> </tr> </table> </body> </html> [/codebox] Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted July 31, 2012 Editor Share Posted July 31, 2012 sYol = Input.GetText("yol") sMetin1 = Input.GetText("Input1") sMetin2 = Input.GetText("Input2") if sYol ~= "" and sMetin1 ~= "" and sMetin2 ~= "" then sDosya = TextFile.ReadToString(sYol) nAra = String.Find(sDosya, sMetin1, 1, true) if nAra ~= -1 then [color="#FF0000"] sDegisen = String.Replace(sDosya, sMetin1, sMetin2, true)[/color] [color="#0000FF"]sDegisen = String.Replace(sDegisen, bulunacak yazi,değiştirilecekyazi, true)[/color][color="#9ACD32"]--Burayı bu şekilde istediğin gibi çogaltabilirsin.[/color] TextFile.WriteFromString(sYol, sDegisen, false) Dialog.TimedMessage("OK", "Değiştirme başarılı!", 2000, MB_ICONINFORMATION) else Dialog.Message("Hata", "Aradığınız kelime mevcut değil", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1) end else Dialog.Message("Hata", "Tüm alanları doldurun", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1) end Quote Link to comment Share on other sites More sharing options...
korasoglu Posted July 31, 2012 Author Share Posted July 31, 2012 Ben anlatamamışım diyelim 15 tane Input var 15 tane Inputtaki texti 15 değişkenle değiştireceğiz. Verdiğinizi denemedim cevabınızı okuyunca böyle anladım. Bu örnekte bir link ve bir dosya var Input1 girilen değeri linkte arıyor bulursa Input2 deki değerle değiştiriyor mantık bu ama bunu daha çok değişiikliği nasıl yapabilirim. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 31, 2012 Share Posted July 31, 2012 Daha önceden yazmış olduğum kodu fonksiyon haline çevirdim. [quote]bulDegistir(dosya_yolu, aranan_kelime, degistirilecek_kelime)[/quote] seklinde istediğiniz kadar kullanabilirsiniz. [code]http://www.mediafire.com/?736ev1eb4rrona1[/code] Quote Link to comment Share on other sites More sharing options...
korasoglu Posted August 1, 2012 Author Share Posted August 1, 2012 (edited) Hocam şunu bir incelerseniz sevinirim. http://s3.dosya.tc/server/xvvghY/bulde_i_tir.rar.html Edited August 2, 2012 by korasoglu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.