-
-
Save mtahiryilmazz/55dfc95852fa92cb52ceaab6abc2e2b3 to your computer and use it in GitHub Desktop.
Excel SGK Giriş (IE ve Selenium Yok)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _ | |
ByVal hwnd As LongPtr, _ | |
ByVal lpOperation As String, _ | |
ByVal lpFile As String, _ | |
ByVal lpParameters As String, _ | |
ByVal lpDirectory As String, _ | |
ByVal nShowCmd As Long) As Long | |
Sub SGKGiris() | |
Dim url As String | |
Dim tcKimlikNo As String | |
Dim isyeriKodu As String | |
Dim sistemSifre As String | |
Dim isyeriSifre As String | |
' Açmak istediğiniz web sayfasının URL'sini belirtin | |
url = "https://uyg.sgk.gov.tr/SigortaliTescil/amp/loginldap" | |
' Kullanıcı bilgileri | |
tcKimlikNo = "1111" | |
isyeriKodu = "2222" | |
sistemSifre = "3333" | |
isyeriSifre = "4444" | |
' Chrome'u başlat ve belirtilen URL'yi aç | |
ShellExecute 0, "open", "msedge.exe", url, "", 1 | |
' Bir süre bekleyin (tarayıcı yüklenene kadar) | |
Application.Wait (Now + TimeValue("0:00:05")) | |
' Kullanıcı bilgilerini doldur (SendKeys ile) | |
SendKeys "{TAB}" | |
SendKeys "{TAB}" | |
SendKeys "{TAB}" | |
SendKeys tcKimlikNo | |
SendKeys "{TAB}" | |
SendKeys isyeriKodu | |
SendKeys "{TAB}" | |
SendKeys sistemSifre | |
SendKeys "{TAB}" | |
SendKeys isyeriSifre | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _ | |
ByVal hwnd As LongPtr, _ | |
ByVal lpOperation As String, _ | |
ByVal lpFile As String, _ | |
ByVal lpParameters As String, _ | |
ByVal lpDirectory As String, _ | |
ByVal nShowCmd As Long) As Long | |
Sub SGKGiris() | |
Dim url As String | |
Dim tcKimlikNo, isyeriKodu, sistemSifre, isyeriSifre As String | |
' Açmak istediğiniz web sayfasının URL'sini belirtin | |
url = "https://uyg.sgk.gov.tr/SigortaliTescil/amp/loginldap" | |
' Kullanıcı bilgileri | |
tcKimlikNo = "1111" | |
isyeriKodu = "2222" | |
sistemSifre = "3333" | |
isyeriSifre = "4444" | |
' Chrome'u başlat ve belirtilen URL'yi aç | |
Call ShellExecute(0, "open", "msedge.exe", url, "", 1) | |
' Bir süre bekleyin (tarayıcı yüklenene kadar) | |
Application.Wait (Now + TimeValue("0:00:05")) | |
' Kullanıcı bilgilerini doldur (SendKeys ile) | |
SendKeys "{TAB}" & "{TAB}" & "{TAB}" | |
SendKeys tcKimlikNo & "{TAB}" & isyeriKodu & "{TAB}" & sistemSifre & "{TAB}" & isyeriSifre | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment