srburak Posted April 26, 2013 Share Posted April 26, 2013 merhaba arkadaşlar bnm bi sorum olacak bu help dosyasındaki @error daki sayısal değerler ve hataları nasıl kullanabilirim örnek olarak :Return ValueSuccess: Returns an object collection of all tables in the document, @EXTENDED = table count Failure: Returns 0 and sets @ERROR @Error: 0 ($_IEStatus_Success) = No Error 3 ($_IEStatus_InvalidDataType) = Invalid Data Type 5 ($_IEStatus_InvalidValue) = Invalid Value 7 ($_IEStatus_NoMatch) = No Match @Extended: Contains invalid parameter number aslında burdakileri komple açıklarsanız çok ii olur.programda diyelimki ($_IEStatus_NoMatch) = No Match hatası verdi @error"a 7 rakamını mı yuklemiş oluyor??başka bi soruda şoyle :$aTableData = _IETableWriteToArray($oTable, True)_ArrayDisplay($aTableData)$asaldiri = $aTableData[2][2]program buraya kadar geliyor _arraydisplay ile gosteriyor fakat $aTableData[2][2] çağır dediğimde ;;;;;;;;;;;;C:\Users\ECR?N\Desktop\cc\s_h_tamam au3.au3 (53) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:$asaldiri = $aTableData[2][2]$asaldiri = ^ ERROR->21:21:00 AutoIT3.exe ended.rc:1>Exit code: 1 Time: 23.199;;;;;;;;;;;;;;;;;;;;;hatasını verip kapanıyor asıl mesele şoyle $aTableData[2][2] okutuyorum ama okuttuğum $aTableData[2][2] htmlde bazen gorunuyor bazense gorunmuyor bana gorundüğünde işlem yapmam lazım şimdiden teşekkür ederim umarım anlatabilmişimdir Quote Link to comment Share on other sites More sharing options...
MostWanted Posted April 26, 2013 Share Posted April 26, 2013 İlk tahmin ettiğin şey doğru.Diyelim ki $oIE = _IECreate(vırıvırı) kodunu yazdın be bunda hata arıyorsun.Tam bunu yazdığın satırın altına if @error = 1 then MsgBox(0,"", "Bir hata oluştu ama nedeni nedir Allah bilir.") endif yaparak hata kontrolü yapabilirsin.İkinci sorduğun soruya çözümüm şöyle: $aTableData 'yı Ubound fonksiyonuna sokarsın bu sana arrayin uzunluğunu verir.Şimdi tam olarak hangisi 2 oluyor falan bilmediğim için onu araştıracağını umuyorum ama mantıken ubound ile array uzunluğunu bulabilir ve eğer uygunsa sonra değişken eşitlemeni yapabilirsin. Quote Link to comment Share on other sites More sharing options...
srburak Posted April 26, 2013 Author Share Posted April 26, 2013 yardımın için teşekkür ederim ama benim yazdığım daha 4. program uboundu anlamadım biraz daha detaylı anlatayım ben bir web sitesinden belirli bi tableyi okutuyorum fakat okuttuğum table bazen 3 satır 3 sutundan oluşuyor bazende 1 satır ve 1 sutundan ben 3 satır ve 3 sutundan 2. satır 2. sutunu okuyup işlem yapıyorum buraya kadar tamam fakat 1 satır 1 sutundan oluştuğunda program 2. satır 2. sutunu okumaya çalışıyor ve hata verip program sonlanıyor hata şoyle : ;;;;;;;;;;;;C:\Users\ECR?N\Desktop\cc\s_h_tamam au3.au3 (53) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:$asaldiri = $aTableData[2][2]$asaldiri = ^ ERROR->21:21:00 AutoIT3.exe ended.rc:1>Exit code: 1 Time: 23.199;;;;;;;;;;;;;;;;;;;;; bnm bu hatayı ya gormezden geleceğim yada table 1 satır ve 1 sutundan oluşuyorken 2.satır 2.sutundaki değere " 0 " değerini atayabileceğim bi koda ihtiyacım var bnm kodlarım şoyle : _IEImgClick($oIE, "http://cdn2.ioimg.org/static/images//atack.jpg", "src") Sleep(2000) $oTable = _IETableGetCollection($oIE, 45 ) Sleep(200) $aTableData = _IETableWriteToArray($oTable, True) _ArrayDisplay($aTableData) $asaldiri = $aTableData[2][2] ;;;;burda hata veriyor ve sonlanıyor;;;;;;; if $asaldiri > 1000 Then MsgBox(0,"ss"," var") Else MsgBox(0,"ss","yok") EndIf Wend . . Quote Link to comment Share on other sites More sharing options...
MostWanted Posted April 26, 2013 Share Posted April 26, 2013 " Ubound($aTableData) " sana arrayin size nı döner. Küçük bi if kontrolü ile bunu sağlayabilirsin. Eğer tablomun size ı 1 se şunu yap de eğer 3 se $asaldiri = $aTableData[2][2] atamasını yap gibi. Quote Link to comment Share on other sites More sharing options...
srburak Posted April 30, 2013 Author Share Posted April 30, 2013 çok teşekkür ederim ustad dediğin yontemle çözdüm 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.