Editor pairs Posted September 2, 2013 Editor Share Posted September 2, 2013 Şİmdi anlamadım siz nereyi istiyorsunuz duraklatıldı demiştiniz oranın kodunu yazdım.Neyi kast ediyorsunuz duraklatmakla. Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 2, 2013 Author Share Posted September 2, 2013 hocam şöyle söyleyim yazdırılan belgenin üzerine tıklayıp duraklat demek ile yazıcı özelliklerinde eklediğim resimde görülüyor yazıcı menusu altındaki yazdımayı duraklat işlevsel olarak aynı şey ama biri komple yazıcıyı duraklatıyor biri sadece o belgeyi duraklatıyor. Ben menunun altındaki yazdırmayı duraklattan bahsediyorum ve o seçenek seçili iken sizde bi deneyin program yadırma duraklatıldı uyarısı vermiyor. Sadece belge duraklatıldığı zaman veriyor ekran alıntımdada görülüyor Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 2, 2013 Editor Share Posted September 2, 2013 function Escape(v) if (v == nil) then return ""; end if (type(v) == "table") then return Table.Concat(v, ", "); end if (type(v) == "boolean") then if (v == true) then return "Yes"; else return "No"; end end return v; end function WMIDateStringToDate(dtmDate) if dtmDate then dtmDate = tostring(dtmDate); return (String.Mid (dtmDate, 7, 2) .. "/" .. String.Mid (dtmDate, 5, 2) .. "/" .. String.Left(dtmDate, 4) .. " " .. String.Mid (dtmDate, 9, 2) .. ":" .. String.Mid (dtmDate, 11, 2) .. ":" .. String.Mid (dtmDate, 13, 2) ); else return ""; end end local sOutput = ""; local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CIMV2"); local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_Printer", "WQL", 48); if oColItems then local oEnum = luacom.GetEnumerator(oColItems); local oItem = oEnum:Next(); while oItem do state = "Çalışıyor"; if (tostring(Escape(oItem:PrinterState())) == "1") then state = "Duraklatılmış"; end ComboBox.AddItem("ComboBox1",Escape(oItem:Caption()) .. " | Status : "..Escape(oItem:WorkOffline()).."| Durum : "..state, ""); if Escape(oItem:Default()) == "Yes" then ComboBox.SetSelected("ComboBox1",ComboBox.GetCount("ComboBox1")); end sOutput = ""; oItem = oEnum:Next(); end else Dialog.Message("", "Win32_Printer Kütüphanesi bulunamadı."); end Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 2, 2013 Author Share Posted September 2, 2013 function Escape(v) if (v == nil) then return ""; end if (type(v) == "table") then return Table.Concat(v, ", "); end if (type(v) == "boolean") then if (v == true) then return "Yes"; else return "No"; end end return v; end function WMIDateStringToDate(dtmDate) if dtmDate then dtmDate = tostring(dtmDate); return (String.Mid (dtmDate, 7, 2) .. "/" .. String.Mid (dtmDate, 5, 2) .. "/" .. String.Left(dtmDate, 4) .. " " .. String.Mid (dtmDate, 9, 2) .. ":" .. String.Mid (dtmDate, 11, 2) .. ":" .. String.Mid (dtmDate, 13, 2) ); else return ""; end end local sOutput = ""; local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CIMV2"); local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_Printer", "WQL", 48); if oColItems then local oEnum = luacom.GetEnumerator(oColItems); local oItem = oEnum:Next(); while oItem do state = "Çalışıyor"; if (tostring(Escape(oItem:PrinterState())) == "1") then state = "Duraklatılmış"; end ComboBox.AddItem("ComboBox1",Escape(oItem:Caption()) .. " | Status : "..Escape(oItem:WorkOffline()).."| Durum : "..state, ""); if Escape(oItem:Default()) == "Yes" then ComboBox.SetSelected("ComboBox1",ComboBox.GetCount("ComboBox1")); end sOutput = ""; oItem = oEnum:Next(); end else Dialog.Message("", "Win32_Printer Kütüphanesi bulunamadı."); end Sağol hocam bu oldu ellerine sağlık. Peki bu duraklatılmışı devam et olarak SET yapabilirmiyiz hocam "duraklat-devam et" şeklinde yine aynı kod şekliyle. Çünkü regeditten yapınca pc restart yapmak gerekiyor Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 2, 2013 Editor Share Posted September 2, 2013 SET olayı yok malesef. Tek yol regedit gibi yada varsa bir dll.HTC Desire SV cihazımdan Tapatalk 4 ile gönderildi Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 2, 2013 Author Share Posted September 2, 2013 (edited) sorma hocam printer dll var o da birşeye yaramıyor duraklat var asıl olması gerek devam et kısmı yok :D Edited September 2, 2013 by fba44 Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 3, 2013 Author Share Posted September 3, 2013 Pairs hocam madem SET yapamıyoruz ozaman bizde yazdırılan öğeyi göster ekranı varya orayı çağırırız kullanıcı ordan kendisi manuel olarak yapar. Peki yazdırılan öğeyi göster ekranını nasıl açtırırız hocam ? Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 3, 2013 Editor Share Posted September 3, 2013 Hangi ekrandan bahsediyorsun bi caps atarsan daha iyi olur. Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 3, 2013 Author Share Posted September 3, 2013 verdiğimiz capslerde olan ekran hocam hani yazıcıya sağ tıklayınca geliyorya yazdırılan öğeyi göster diye ben yinede capste belirteyim 1. kırmızıyı aldğım pencere bu söylediğim pencere ve 2. kırmızıyı aldığım yerde kaçtane yazdırma belgesi olduğunu söylüyor. Bunuda GET yapabilirmiyiz hocam http://prntscr.com/1p3041 Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 3, 2013 Editor Share Posted September 3, 2013 Yazıcıları listelerken kullandıgın kodu bununla değiştir. function Escape(v) if (v == nil) then return ""; end if (type(v) == "table") then return Table.Concat(v, ", "); end if (type(v) == "boolean") then if (v == true) then return "Yes"; else return "No"; end end return v; end function WMIDateStringToDate(dtmDate) if dtmDate then dtmDate = tostring(dtmDate); return (String.Mid (dtmDate, 7, 2) .. "/" .. String.Mid (dtmDate, 5, 2) .. "/" .. String.Left(dtmDate, 4) .. " " .. String.Mid (dtmDate, 9, 2) .. ":" .. String.Mid (dtmDate, 11, 2) .. ":" .. String.Mid (dtmDate, 13, 2) ); else return ""; end end local sOutput = ""; local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CIMV2"); local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_Printer", "WQL", 48); if oColItems then local oEnum = luacom.GetEnumerator(oColItems); local oItem = oEnum:Next(); while oItem do state = "Çalışıyor"; if (tostring(Escape(oItem:PrinterState())) == "1") then state = "Duraklatılmış"; end ComboBox.AddItem("ComboBox1", Escape(oItem:Caption()) .. " | Status : "..Escape(oItem:WorkOffline()).."| Durum : "..state, Escape(oItem:Caption())); if Escape(oItem:Default()) == "Yes" then ComboBox.SetSelected("ComboBox1",ComboBox.GetCount("ComboBox1")); end sOutput = ""; oItem = oEnum:Next(); end else Dialog.Message("", "Win32_Printer Kütüphanesi bulunamadı."); end Daha sonrada son gösterdiğin ekranı açmak için bu kodu nereye istersen orada kullan. selected = ComboBox.GetSelected("ComboBox1"); secilen = ComboBox.GetItemData("ComboBox1",selected); result = File.Run("cmd.exe", "/C RUNDLL32 PRINTUI.DLL,PrintUIEntry /o /n \""..secilen.."\"",_WindowsFolder.."\\System32", SW_HIDE, false); Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 3, 2013 Author Share Posted September 3, 2013 Yazıcıları listelerken kullandıgın kodu bununla değiştir. function Escape(v) if (v == nil) then return ""; end if (type(v) == "table") then return Table.Concat(v, ", "); end if (type(v) == "boolean") then if (v == true) then return "Yes"; else return "No"; end end return v; end function WMIDateStringToDate(dtmDate) if dtmDate then dtmDate = tostring(dtmDate); return (String.Mid (dtmDate, 7, 2) .. "/" .. String.Mid (dtmDate, 5, 2) .. "/" .. String.Left(dtmDate, 4) .. " " .. String.Mid (dtmDate, 9, 2) .. ":" .. String.Mid (dtmDate, 11, 2) .. ":" .. String.Mid (dtmDate, 13, 2) ); else return ""; end end local sOutput = ""; local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CIMV2"); local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_Printer", "WQL", 48); if oColItems then local oEnum = luacom.GetEnumerator(oColItems); local oItem = oEnum:Next(); while oItem do state = "Çalışıyor"; if (tostring(Escape(oItem:PrinterState())) == "1") then state = "Duraklatılmış"; end ComboBox.AddItem("ComboBox1", Escape(oItem:Caption()) .. " | Status : "..Escape(oItem:WorkOffline()).."| Durum : "..state, Escape(oItem:Caption())); if Escape(oItem:Default()) == "Yes" then ComboBox.SetSelected("ComboBox1",ComboBox.GetCount("ComboBox1")); end sOutput = ""; oItem = oEnum:Next(); end else Dialog.Message("", "Win32_Printer Kütüphanesi bulunamadı."); end Daha sonrada son gösterdiğin ekranı açmak için bu kodu nereye istersen orada kullan. selected = ComboBox.GetSelected("ComboBox1"); secilen = ComboBox.GetItemData("ComboBox1",selected); result = File.Run("cmd.exe", "/C RUNDLL32 PRINTUI.DLL,PrintUIEntry /o /n \""..secilen.."\"",_WindowsFolder.."\\System32", SW_HIDE, false); Hocam TŞK ederim güzel çalıştı. Peki kaç yazı beklediği hakkında bilgi verebilecekmiyiz resimde 2. olarak gösterdiğim yer gibi. Ayrıca bunu CMD ile yapmanda beni şaşırttı. Perfect..... Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 3, 2013 Editor Share Posted September 3, 2013 Malesef çekilemiyor.Yani geniş bi döngü kurmak gerektiriyor malesef. Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 3, 2013 Author Share Posted September 3, 2013 Malesef çekilemiyor.Yani geniş bi döngü kurmak gerektiriyor malesef. Olsun hocam buda yeter eline emeğine sağlık çok teşekkür ediyorum Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 5, 2013 Author Share Posted September 5, 2013 Pairs hocam tekrar bir sorum daha olacak. Bu AIO lardaki gibi simge çekme yapabilirmiyiz. Yazıcının windowsta görünen simgesini. Ben TreeListe ekliyorum da bunları orda simge göstersem çok güzel olacak Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 5, 2013 Editor Share Posted September 5, 2013 Yapılabilir diye tahmin ediyorum boş bi vaktimde dener sonucu yazarım. Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 5, 2013 Author Share Posted September 5, 2013 Yapılabilir diye tahmin ediyorum boş bi vaktimde dener sonucu yazarım. Teşekkür ediyorum hocam bekliyorum sonucu Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 16, 2013 Author Share Posted September 16, 2013 pairs hocam yazdırma kuruğu ile alaka bir sonuca varabildiniz mi ? Amacım kuyrukta kaçtane yazı var onu çekmek. Tabi ayrıca yazdırmayı duraklat devam et ç.içi ç.dışı göster kodlarını da bekliyorum bulursunuz inş. Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 16, 2013 Editor Share Posted September 16, 2013 Pek bakma vaktim olmadı. Quote Link to comment Share on other sites More sharing options...
fba44 Posted September 16, 2013 Author Share Posted September 16, 2013 tamam hocam eğer bakarsanız sevinirim tşkler Quote Link to comment Share on other sites More sharing options...
fba44 Posted October 7, 2013 Author Share Posted October 7, 2013 pairs hocam bu sorularıma bakabildinizmi projem bitmek üzere tek eksiğim bunlar kaldı bu söylediklerimde olursa çok güzel olacak program Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted October 11, 2013 Editor Share Posted October 11, 2013 (edited) Ya işlerin yogunlugundan kendime bile vakit ayıramıyorum.O winspool dll ini kullanabilmek için pointer tanımlamak gerekiyor yani boş bi vaktimde bakıcam inş. Edit : Yarın iş yogun olmazsa plugine ekleyeceğim kapatıp açmayı. Edited October 11, 2013 by pairs Quote Link to comment Share on other sites More sharing options...
fba44 Posted October 12, 2013 Author Share Posted October 12, 2013 hocam pluginle yapmadım benim programı sizin diğer verdiğiniz kodlarla yaptım şimdi plugin kullanırsam sil baştan yapmam gerekecek o yüzden bana o kodları verme imkanınız varmı ayrıca kuyrukta kaç belge olduğunuda çekebilirmiyiz şuan için en önemlisi o Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted October 12, 2013 Editor Share Posted October 12, 2013 Şuanda üzerinde ugraşıyorum.Duraklatma tamam ama şu çevrim dışı muhabbetine bakıyorum. Quote Link to comment Share on other sites More sharing options...
fba44 Posted October 12, 2013 Author Share Posted October 12, 2013 hm çok güzel hocam kolay gelsin duraklat-devam et çevrimiçi yap - çevrimdışı yap kuyrukta x adet belge var - tüm belgeleri sil eksiklikler bunlar hocam özelliklede dediğim gibi kuyrukta(sırada) kaç belge olduğunu göstermek şuan için en önemlisi Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted October 12, 2013 Editor Share Posted October 12, 2013 (edited) Bu Dll i indir. https://www.dropbox.com/s/vj1eau0qycu6b6n/PrinterSettings.dll Kullanım Şekli. result = DLL.CallFunction("AutoPlay\\Docs\\PrinterSettings.dll", "PausePrinter", "\"Kyocera\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL); result = DLL.CallFunction("AutoPlay\\Docs\\PrinterSettings.dll", "ResumePrinter", "\"Kyocera\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL); result = DLL.CallFunction("AutoPlay\\Docs\\PrinterSettings.dll", "DisablePrinter", "\"Kyocera\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL); result = DLL.CallFunction("AutoPlay\\Docs\\PrinterSettings.dll", "EnablePrinter", "\"Kyocera\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL); Printerlardaki kuyrukta bekleyen yazı sayısı içinde bakıcam tekrar anca bunlara bakabildim.Dllde bir hata olacagını sanmıyorum olursada haber edersin bakarım kodlarına. Edited October 12, 2013 by pairs 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.