#Region Project Attributes
#ApplicationLabel: Blogfa
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Public txtusername As EditText
Private txtpassword As EditText
Private txtcaptcha As EditText
Private IMGcaptcha As ImageView
Private date As Label
''''''''''''''''''''''''
Dim Httpjob1 As HttpJob
Dim WebViewExtras1 As WebViewExtras
Dim webview1 As WebView
Private date As Label
Private EditText1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("ehem")
Httpjob1.Initialize("myjob1",Me)
webview1.Initialize("webview1")
WebViewExtras1.addJavascriptInterface(webview1,"B4A")
WebViewExtras1.addWebChromeClient(webview1,"")
webview1.LoadUrl("217.219.20.41")
End Sub
Sub Activity_Resume
End Sub
Sub WebView1_PageFinished (Url As String)
WebViewExtras1.executeJavascript(webview1,"B4A.callsub('Process_HTML'),true,document.documentelement.outerHTML)")
WebViewExtras1.executeJavascript(webview1,"B4A.callsub('get_date',true,document.getelementbyid('lbldate').innertext)")
End Sub
Sub Process_HTML(Html As String)
Html = Html.Replace("""","'")
Dim captcha As String
captcha = Html.SubString(Html.IndexOf("'captchaimage.axd?guid=")+1)
captcha = "217.219.20.41"&captcha.SubString2(0,captcha.IndexOf("'")-0)
Httpjob1.Download(captcha)
ProgressDialogShow("در حال خواندن کد امنیتی")
'Msgbox(captcha,"link")
'EditText1.Text = Html
End Sub
Sub get_date (today As String)
date.text = today
End Sub
Sub JOBdone (job As HttpJob)
IMGcaptcha.Bitmap = job.GetBitmap
IMGcaptcha.Gravity = Gravity.FILL
End Sub
Sub tetusername_TextChanged (Old As String, New As String)
WebViewExtras1.executeJavascript(webview1,"document.getelementsbyname('tetusername')[0].value = '"&New&"';"
End Sub
Sub txtPassword_TextChanged (Old As String, New As String)
WebViewExtras1.executeJavascript(webview1,"document.getElementsByname('txtPassword')[0].value = '"&New&"';"
End Sub
Sub txyCaptcha_TextChanged (Old As String, New As String)
WebViewExtras1.executeJavascript(webview1,"document.getelementsbyname('txyCaptcha')[0].value = '"&New&"';"
End Sub
Sub btnlogin_Click
WebViewExtras1.executeJavascript(webview1,"document.getelementsbyid('loginbutton').click();"
End Sub
سوال
AHA_AMIRHOSEIN 19
سلام
من آموزش های تگ های المنت رو
که در این پست
بود نگاه کردم و سورسشو نوشتم ولی نمیتونم سورس سایت رو بگیرم نمیدونم مشکلم چیه!!! اگه میشه کمکم کنین!!
دانلود سورس
لینک ارسال
به اشتراک گذاری در سایت های دیگر
4 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.