Skip to main content

AccessTr.neT


PC kullanıcı adı ile tabloda ilgili saat geldiğinde bat dosyası çalıştırmak

PC kullanıcı adı ile tabloda ilgili saat geldiğinde bat dosyası çalıştırmak

Çözüldü #4
Kodları aşağıdakiler ile değiştirip, veritabanı ile aynı dizine koddaki gibi farklı dosya (Uyarı1.txt, Uyarı2.txt vs.vs.) eklerseniz saate göre farklı dosya açılır.


Private Sub Form_Load()
Me.username = fOSUserName()
Call Kriter
End Sub

Private Sub Form_Timer()
Me.Metin9.Requery

Call Kriter
End Sub

Sub Kriter()

Dim u1, u2, u3, u4 As Integer
Dim hwnd
Dim StartDoc

hwnd = apiFindWindow("OPUSAPP", "0")

u1 = Dlookup ("[mola1]", "T_MOLA", "[kullanici]=[username]")
u2 = Dlookup ("[yemek]", "T_MOLA", "[kullanici]=[username]")
u3 = Dlookup ("[mola2]", "T_MOLA", "[kullanici]=[username]")
u4 = Dlookup ("[mola3]", "T_MOLA", "[kullanici]=[username]")


If u1 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari1.txt", "", "C:\", SW_SHOWNORMAL)
End If

If u2 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari2.txt", "", "C:\", SW_SHOWNORMAL)
End If

If u3 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari3.txt", "", "C:\", SW_SHOWNORMAL)
End If

If u4 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari4.txt", "", "C:\", SW_SHOWNORMAL)
End If


End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Cvp: PC kullanıcı adı ile tabloda ilgili saat geldiğinde bat dosyası çalıştırmak - Yazar: ozanakkaya - 29/11/2012, 15:46
Task