1103 18:15:19613 :: Traceback (most recent call last):
1103 18:15:19613 :: File "ui.py", line 3002, in CallEvent
1103 18:15:19613 :: File "ui.py", line 99, in __call__
1103 18:15:19613 :: File "ui.py", line 81, in __call__
1103 18:15:19614 :: File "introLogin.py", line 949, in __OnClickKaydetButton
1103 18:15:19614 :: AttributeError
1103 18:15:19614 :: :
1103 18:15:19614 :: 'ImageBox' object has no attribute 'GetText'
1103 18:15:19614 ::
1103 18:15:20497 :: Traceback (most recent call last):
1103 18:15:20497 :: File "ui.py", line 3002, in CallEvent
1103 18:15:20497 :: File "ui.py", line 99, in __call__
1103 18:15:20497 :: File "ui.py", line 81, in __call__
1103 18:15:20497 :: File "introLogin.py", line 949, in __OnClickKaydetButton
1103 18:15:20498 :: AttributeError
1103 18:15:20498 :: :
1103 18:15:20498 :: 'ImageBox' object has no attribute 'GetText'
1103 18:15:20498 ::
Syserr ı çözdüm + ya basınca kaydedilecek hesab yok yazısını getirdim ama dediğiniz gibi resim olduğundan yazı yazamıyorum ve syserr vermiyor evet başka bir filesden söküyorum.Merhaba,
Sanırım oralar resim göründüğü için tıklanmıyor. Extra özellik vermen gerekiyo textbox gibi onları kendin mi ekledin yoksa bi yerden mi alıyosun ?
ui.py
ARAT
class ImageBox(Window):
def __init__(self, layer = "UI"):
Window.__init__(self, layer)
EKLE
self.ButtonText = None
ARAT
def SetAlpha(self, alpha):
wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)
EKLE
def GetText(self):
if not self.ButtonText:
return ""
return self.ButtonText.GetText()
Teşekkürler dediğiniz gibi eksik yerleri çekmişdim düzelti ama ıd yazamıyorum şifre yazamıyorum.Python:ui.py ARAT class ImageBox(Window): def __init__(self, layer = "UI"): Window.__init__(self, layer) EKLE self.ButtonText = None ARAT def SetAlpha(self, alpha): wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha) EKLE def GetText(self): if not self.ButtonText: return "" return self.ButtonText.GetText()
aynı hattayı bende aldım düzeltirsen banada yazTeşekkürler dediğiniz gibi eksik yerleri çekmişdim düzelti ama ıd yazamıyorum şifre yazamıyorum.
Nereden aldığınızı söylerseniz. Çözüm sunabilirim.aynı hattayı bende aldım düzeltirsen banada yaz
Tam olarak kullanıcı adı şifre yazdığımız yere hiç bi şekilde bişey yapamamıyorum yazamıyorum syserrda vermiyor.Nereden aldığınızı söylerseniz. Çözüm sunabilirim.
ID Password yazılmıyor syserde vermiyor :dNereden aldığınızı söylerseniz. Çözüm sunabilirim.
ID Password yazılmıyor syserde vermiyor :d
Sen hangi filesinkini söküyorsunID Password yazılmıyor syserde vermiyor :d
Tam olarak kullanıcı adı şifre yazdığımız yere hiç bi şekilde bişey yapamamıyorum yazamıyorum syserrda vermiyor.
class EditLine(TextLine):
Değiştir Komple Denesene bi
class EditLine(TextLine):
candidateWindowClassDict = {}
def __init__(self):
TextLine.__init__(self)
self.eventReturn = Window.NoneMethod
self.eventEscape = Window.NoneMethod
self.eventTab = None
self.numberMode = False
self.useIME = True
self.bCodePage = False
self.candidateWindowClass = None
self.candidateWindow = None
self.SetCodePage(app.GetDefaultCodePage())
self.placeHolder = TextLine()
self.placeHolder.SetParent(self)
self.placeHolder.SetText("")
self.placeHolder.Hide()
self.readingWnd = ReadingWnd()
self.readingWnd.Hide()
def __del__(self):
TextLine.__del__(self)
self.eventReturn = Window.NoneMethod
self.eventEscape = Window.NoneMethod
self.eventTab = None
self.placeHolder = None
def SetCodePage(self, codePage):
candidateWindowClass=EditLine.candidateWindowClassDict.get(codePage, EmptyCandidateWindow)
self.__SetCandidateClass(candidateWindowClass)
def __SetCandidateClass(self, candidateWindowClass):
if self.candidateWindowClass==candidateWindowClass:
return
self.candidateWindowClass = candidateWindowClass
self.candidateWindow = self.candidateWindowClass()
self.candidateWindow.Load()
self.candidateWindow.Hide()
def RegisterWindow(self, layer):
self.hWnd = wndMgr.RegisterTextLine(self, layer)
def SAFE_SetReturnEvent(self, event):
self.eventReturn = __mem_func__(event)
def SetReturnEvent(self, event):
self.eventReturn = event
def SetEscapeEvent(self, event):
self.eventEscape = event
def SetTabEvent(self, event):
self.eventTab = event
def SetMax(self, max):
self.max = max
wndMgr.SetMax(self.hWnd, self.max)
ime.SetMax(self.max)
self.SetUserMax(self.max)
def SetUserMax(self, max):
self.userMax = max
ime.SetUserMax(self.userMax)
def SetNumberMode(self):
self.numberMode = True
def CanEdit(self, flag):
self.CanClick = flag
#def AddExceptKey(self, key):
# ime.AddExceptKey(key)
#def ClearExceptKey(self):
# ime.ClearExceptKey()
def SetIMEFlag(self, flag):
self.useIME = flag
def SetText(self, text):
wndMgr.SetText(self.hWnd, text)
if self.IsFocus():
ime.SetText(text)
self.UpdatePlaceHolder()
def Enable(self):
wndMgr.ShowCursor(self.hWnd)
def Disable(self):
wndMgr.HideCursor(self.hWnd)
def SetEndPosition(self):
ime.MoveEnd()
#PlaceHolder funcs
def UpdatePlaceHolder(self):
self.placeHolder.Show() if len(self.GetText()) <= 0 and self.CheckPlaceHolder() is True else self.placeHolder.Hide()
def SetPlaceHolder(self, placeHolderText, placeHolderPos = (0, 0)):
if not self.placeHolder:
return
self.placeHolder.SetText(placeHolderText)
self.placeHolder.SetPosition(*placeHolderPos)
self.UpdatePlaceHolder()
def SetPlaceHolderColor(self, color):
if not self.placeHolder:
return
self.placeHolder.SetPackedFontColor(color)
def CheckPlaceHolder(self):
return bool(len(self.placeHolder.GetText())) #return true or false
##
def OnSetFocus(self):
Text = self.GetText()
ime.SetText(Text)
ime.SetMax(self.max)
ime.SetUserMax(self.userMax)
ime.SetCursorPosition(-1)
if self.numberMode:
ime.SetNumberMode()
else:
ime.SetStringMode()
ime.EnableCaptureInput()
if self.useIME:
ime.EnableIME()
else:
ime.DisableIME()
wndMgr.ShowCursor(self.hWnd, True)
self.UpdatePlaceHolder()
def OnKillFocus(self):
self.SetText(ime.GetText(self.bCodePage))
self.OnIMECloseCandidateList()
self.OnIMECloseReadingWnd()
ime.DisableIME()
ime.DisableCaptureInput()
wndMgr.HideCursor(self.hWnd)
self.UpdatePlaceHolder()
def OnIMEChangeCodePage(self):
self.SetCodePage(ime.GetCodePage())
def OnIMEOpenCandidateList(self):
self.candidateWindow.Show()
self.candidateWindow.Clear()
self.candidateWindow.Refresh()
gx, gy = self.GetGlobalPosition()
self.candidateWindow.SetCandidatePosition(gx, gy, len(self.GetText()))
return True
def OnIMECloseCandidateList(self):
self.candidateWindow.Hide()
return True
def OnIMEOpenReadingWnd(self):
gx, gy = self.GetGlobalPosition()
textlen = len(self.GetText())-2
reading = ime.GetReading()
readinglen = len(reading)
self.readingWnd.SetReadingPosition( gx + textlen*6-24-readinglen*6, gy )
self.readingWnd.SetText(reading)
if ime.GetReadingError() == 0:
self.readingWnd.SetTextColor(0xffffffff)
else:
self.readingWnd.SetTextColor(0xffff0000)
self.readingWnd.SetSize(readinglen * 6 + 4, 19)
self.readingWnd.Show()
return True
def OnIMECloseReadingWnd(self):
self.readingWnd.Hide()
return True
def OnIMEUpdate(self):
snd.PlaySound("sound/ui/type.wav")
TextLine.SetText(self, ime.GetText(self.bCodePage))
def OnIMETab(self):
if self.eventTab:
self.eventTab()
return True
return False
def OnIMEReturn(self):
snd.PlaySound("sound/ui/click.wav")
self.eventReturn()
return True
def OnPressEscapeKey(self):
self.eventEscape()
return True
def OnKeyDown(self, key):
if app.DIK_F1 == key:
return False
if app.DIK_F2 == key:
return False
if app.DIK_F3 == key:
return False
if app.DIK_F4 == key:
return False
if app.DIK_LALT == key:
return False
if app.DIK_SYSRQ == key:
return False
if app.DIK_LCONTROL == key:
return False
if app.DIK_V == key:
if app.IsPressed(app.DIK_LCONTROL):
ime.PasteTextFromClipBoard()
return True
def OnKeyUp(self, key):
if app.DIK_F1 == key:
return False
if app.DIK_F2 == key:
return False
if app.DIK_F3 == key:
return False
if app.DIK_F4 == key:
return False
if app.DIK_LALT == key:
return False
if app.DIK_SYSRQ == key:
return False
if app.DIK_LCONTROL == key:
return False
return True
def OnIMEKeyDown(self, key):
# Left
if app.VK_LEFT == key:
ime.MoveLeft()
return True
# Right
if app.VK_RIGHT == key:
ime.MoveRight()
return True
# Home
if app.VK_HOME == key:
ime.MoveHome()
return True
# End
if app.VK_END == key:
ime.MoveEnd()
return True
# Delete
if app.VK_DELETE == key:
ime.Delete()
TextLine.SetText(self, ime.GetText(self.bCodePage))
return True
return True
#def OnMouseLeftButtonDown(self):
# self.SetFocus()
def OnMouseLeftButtonDown(self):
if False == self.IsIn():
return False
self.SetFocus()
PixelPosition = wndMgr.GetCursorPosition(self.hWnd)
ime.SetCursorPosition(PixelPosition)
Çalıştığında haber ver bunu gözden kaçırmışım :dui.py:class EditLine(TextLine): Değiştir Komple Denesene bi class EditLine(TextLine): candidateWindowClassDict = {} def __init__(self): TextLine.__init__(self) self.eventReturn = Window.NoneMethod self.eventEscape = Window.NoneMethod self.eventTab = None self.numberMode = False self.useIME = True self.bCodePage = False self.candidateWindowClass = None self.candidateWindow = None self.SetCodePage(app.GetDefaultCodePage()) self.placeHolder = TextLine() self.placeHolder.SetParent(self) self.placeHolder.SetText("") self.placeHolder.Hide() self.readingWnd = ReadingWnd() self.readingWnd.Hide() def __del__(self): TextLine.__del__(self) self.eventReturn = Window.NoneMethod self.eventEscape = Window.NoneMethod self.eventTab = None self.placeHolder = None def SetCodePage(self, codePage): candidateWindowClass=EditLine.candidateWindowClassDict.get(codePage, EmptyCandidateWindow) self.__SetCandidateClass(candidateWindowClass) def __SetCandidateClass(self, candidateWindowClass): if self.candidateWindowClass==candidateWindowClass: return self.candidateWindowClass = candidateWindowClass self.candidateWindow = self.candidateWindowClass() self.candidateWindow.Load() self.candidateWindow.Hide() def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterTextLine(self, layer) def SAFE_SetReturnEvent(self, event): self.eventReturn = __mem_func__(event) def SetReturnEvent(self, event): self.eventReturn = event def SetEscapeEvent(self, event): self.eventEscape = event def SetTabEvent(self, event): self.eventTab = event def SetMax(self, max): self.max = max wndMgr.SetMax(self.hWnd, self.max) ime.SetMax(self.max) self.SetUserMax(self.max) def SetUserMax(self, max): self.userMax = max ime.SetUserMax(self.userMax) def SetNumberMode(self): self.numberMode = True def CanEdit(self, flag): self.CanClick = flag #def AddExceptKey(self, key): # ime.AddExceptKey(key) #def ClearExceptKey(self): # ime.ClearExceptKey() def SetIMEFlag(self, flag): self.useIME = flag def SetText(self, text): wndMgr.SetText(self.hWnd, text) if self.IsFocus(): ime.SetText(text) self.UpdatePlaceHolder() def Enable(self): wndMgr.ShowCursor(self.hWnd) def Disable(self): wndMgr.HideCursor(self.hWnd) def SetEndPosition(self): ime.MoveEnd() #PlaceHolder funcs def UpdatePlaceHolder(self): self.placeHolder.Show() if len(self.GetText()) <= 0 and self.CheckPlaceHolder() is True else self.placeHolder.Hide() def SetPlaceHolder(self, placeHolderText, placeHolderPos = (0, 0)): if not self.placeHolder: return self.placeHolder.SetText(placeHolderText) self.placeHolder.SetPosition(*placeHolderPos) self.UpdatePlaceHolder() def SetPlaceHolderColor(self, color): if not self.placeHolder: return self.placeHolder.SetPackedFontColor(color) def CheckPlaceHolder(self): return bool(len(self.placeHolder.GetText())) #return true or false ## def OnSetFocus(self): Text = self.GetText() ime.SetText(Text) ime.SetMax(self.max) ime.SetUserMax(self.userMax) ime.SetCursorPosition(-1) if self.numberMode: ime.SetNumberMode() else: ime.SetStringMode() ime.EnableCaptureInput() if self.useIME: ime.EnableIME() else: ime.DisableIME() wndMgr.ShowCursor(self.hWnd, True) self.UpdatePlaceHolder() def OnKillFocus(self): self.SetText(ime.GetText(self.bCodePage)) self.OnIMECloseCandidateList() self.OnIMECloseReadingWnd() ime.DisableIME() ime.DisableCaptureInput() wndMgr.HideCursor(self.hWnd) self.UpdatePlaceHolder() def OnIMEChangeCodePage(self): self.SetCodePage(ime.GetCodePage()) def OnIMEOpenCandidateList(self): self.candidateWindow.Show() self.candidateWindow.Clear() self.candidateWindow.Refresh() gx, gy = self.GetGlobalPosition() self.candidateWindow.SetCandidatePosition(gx, gy, len(self.GetText())) return True def OnIMECloseCandidateList(self): self.candidateWindow.Hide() return True def OnIMEOpenReadingWnd(self): gx, gy = self.GetGlobalPosition() textlen = len(self.GetText())-2 reading = ime.GetReading() readinglen = len(reading) self.readingWnd.SetReadingPosition( gx + textlen*6-24-readinglen*6, gy ) self.readingWnd.SetText(reading) if ime.GetReadingError() == 0: self.readingWnd.SetTextColor(0xffffffff) else: self.readingWnd.SetTextColor(0xffff0000) self.readingWnd.SetSize(readinglen * 6 + 4, 19) self.readingWnd.Show() return True def OnIMECloseReadingWnd(self): self.readingWnd.Hide() return True def OnIMEUpdate(self): snd.PlaySound("sound/ui/type.wav") TextLine.SetText(self, ime.GetText(self.bCodePage)) def OnIMETab(self): if self.eventTab: self.eventTab() return True return False def OnIMEReturn(self): snd.PlaySound("sound/ui/click.wav") self.eventReturn() return True def OnPressEscapeKey(self): self.eventEscape() return True def OnKeyDown(self, key): if app.DIK_F1 == key: return False if app.DIK_F2 == key: return False if app.DIK_F3 == key: return False if app.DIK_F4 == key: return False if app.DIK_LALT == key: return False if app.DIK_SYSRQ == key: return False if app.DIK_LCONTROL == key: return False if app.DIK_V == key: if app.IsPressed(app.DIK_LCONTROL): ime.PasteTextFromClipBoard() return True def OnKeyUp(self, key): if app.DIK_F1 == key: return False if app.DIK_F2 == key: return False if app.DIK_F3 == key: return False if app.DIK_F4 == key: return False if app.DIK_LALT == key: return False if app.DIK_SYSRQ == key: return False if app.DIK_LCONTROL == key: return False return True def OnIMEKeyDown(self, key): # Left if app.VK_LEFT == key: ime.MoveLeft() return True # Right if app.VK_RIGHT == key: ime.MoveRight() return True # Home if app.VK_HOME == key: ime.MoveHome() return True # End if app.VK_END == key: ime.MoveEnd() return True # Delete if app.VK_DELETE == key: ime.Delete() TextLine.SetText(self, ime.GetText(self.bCodePage)) return True return True #def OnMouseLeftButtonDown(self): # self.SetFocus() def OnMouseLeftButtonDown(self): if False == self.IsIn(): return False self.SetFocus() PixelPosition = wndMgr.GetCursorPosition(self.hWnd) ime.SetCursorPosition(PixelPosition)
bu benim filesme göre düzenlenmişti senin filesinde farklıysa sadece SetText ait kodları alÇalıştığında haber ver bunu gözden kaçırmışım :d
Yemedi olmadıui.py:class EditLine(TextLine): Değiştir Komple Denesene bi class EditLine(TextLine): candidateWindowClassDict = {} def __init__(self): TextLine.__init__(self) self.eventReturn = Window.NoneMethod self.eventEscape = Window.NoneMethod self.eventTab = None self.numberMode = False self.useIME = True self.bCodePage = False self.candidateWindowClass = None self.candidateWindow = None self.SetCodePage(app.GetDefaultCodePage()) self.placeHolder = TextLine() self.placeHolder.SetParent(self) self.placeHolder.SetText("") self.placeHolder.Hide() self.readingWnd = ReadingWnd() self.readingWnd.Hide() def __del__(self): TextLine.__del__(self) self.eventReturn = Window.NoneMethod self.eventEscape = Window.NoneMethod self.eventTab = None self.placeHolder = None def SetCodePage(self, codePage): candidateWindowClass=EditLine.candidateWindowClassDict.get(codePage, EmptyCandidateWindow) self.__SetCandidateClass(candidateWindowClass) def __SetCandidateClass(self, candidateWindowClass): if self.candidateWindowClass==candidateWindowClass: return self.candidateWindowClass = candidateWindowClass self.candidateWindow = self.candidateWindowClass() self.candidateWindow.Load() self.candidateWindow.Hide() def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterTextLine(self, layer) def SAFE_SetReturnEvent(self, event): self.eventReturn = __mem_func__(event) def SetReturnEvent(self, event): self.eventReturn = event def SetEscapeEvent(self, event): self.eventEscape = event def SetTabEvent(self, event): self.eventTab = event def SetMax(self, max): self.max = max wndMgr.SetMax(self.hWnd, self.max) ime.SetMax(self.max) self.SetUserMax(self.max) def SetUserMax(self, max): self.userMax = max ime.SetUserMax(self.userMax) def SetNumberMode(self): self.numberMode = True def CanEdit(self, flag): self.CanClick = flag #def AddExceptKey(self, key): # ime.AddExceptKey(key) #def ClearExceptKey(self): # ime.ClearExceptKey() def SetIMEFlag(self, flag): self.useIME = flag def SetText(self, text): wndMgr.SetText(self.hWnd, text) if self.IsFocus(): ime.SetText(text) self.UpdatePlaceHolder() def Enable(self): wndMgr.ShowCursor(self.hWnd) def Disable(self): wndMgr.HideCursor(self.hWnd) def SetEndPosition(self): ime.MoveEnd() #PlaceHolder funcs def UpdatePlaceHolder(self): self.placeHolder.Show() if len(self.GetText()) <= 0 and self.CheckPlaceHolder() is True else self.placeHolder.Hide() def SetPlaceHolder(self, placeHolderText, placeHolderPos = (0, 0)): if not self.placeHolder: return self.placeHolder.SetText(placeHolderText) self.placeHolder.SetPosition(*placeHolderPos) self.UpdatePlaceHolder() def SetPlaceHolderColor(self, color): if not self.placeHolder: return self.placeHolder.SetPackedFontColor(color) def CheckPlaceHolder(self): return bool(len(self.placeHolder.GetText())) #return true or false ## def OnSetFocus(self): Text = self.GetText() ime.SetText(Text) ime.SetMax(self.max) ime.SetUserMax(self.userMax) ime.SetCursorPosition(-1) if self.numberMode: ime.SetNumberMode() else: ime.SetStringMode() ime.EnableCaptureInput() if self.useIME: ime.EnableIME() else: ime.DisableIME() wndMgr.ShowCursor(self.hWnd, True) self.UpdatePlaceHolder() def OnKillFocus(self): self.SetText(ime.GetText(self.bCodePage)) self.OnIMECloseCandidateList() self.OnIMECloseReadingWnd() ime.DisableIME() ime.DisableCaptureInput() wndMgr.HideCursor(self.hWnd) self.UpdatePlaceHolder() def OnIMEChangeCodePage(self): self.SetCodePage(ime.GetCodePage()) def OnIMEOpenCandidateList(self): self.candidateWindow.Show() self.candidateWindow.Clear() self.candidateWindow.Refresh() gx, gy = self.GetGlobalPosition() self.candidateWindow.SetCandidatePosition(gx, gy, len(self.GetText())) return True def OnIMECloseCandidateList(self): self.candidateWindow.Hide() return True def OnIMEOpenReadingWnd(self): gx, gy = self.GetGlobalPosition() textlen = len(self.GetText())-2 reading = ime.GetReading() readinglen = len(reading) self.readingWnd.SetReadingPosition( gx + textlen*6-24-readinglen*6, gy ) self.readingWnd.SetText(reading) if ime.GetReadingError() == 0: self.readingWnd.SetTextColor(0xffffffff) else: self.readingWnd.SetTextColor(0xffff0000) self.readingWnd.SetSize(readinglen * 6 + 4, 19) self.readingWnd.Show() return True def OnIMECloseReadingWnd(self): self.readingWnd.Hide() return True def OnIMEUpdate(self): snd.PlaySound("sound/ui/type.wav") TextLine.SetText(self, ime.GetText(self.bCodePage)) def OnIMETab(self): if self.eventTab: self.eventTab() return True return False def OnIMEReturn(self): snd.PlaySound("sound/ui/click.wav") self.eventReturn() return True def OnPressEscapeKey(self): self.eventEscape() return True def OnKeyDown(self, key): if app.DIK_F1 == key: return False if app.DIK_F2 == key: return False if app.DIK_F3 == key: return False if app.DIK_F4 == key: return False if app.DIK_LALT == key: return False if app.DIK_SYSRQ == key: return False if app.DIK_LCONTROL == key: return False if app.DIK_V == key: if app.IsPressed(app.DIK_LCONTROL): ime.PasteTextFromClipBoard() return True def OnKeyUp(self, key): if app.DIK_F1 == key: return False if app.DIK_F2 == key: return False if app.DIK_F3 == key: return False if app.DIK_F4 == key: return False if app.DIK_LALT == key: return False if app.DIK_SYSRQ == key: return False if app.DIK_LCONTROL == key: return False return True def OnIMEKeyDown(self, key): # Left if app.VK_LEFT == key: ime.MoveLeft() return True # Right if app.VK_RIGHT == key: ime.MoveRight() return True # Home if app.VK_HOME == key: ime.MoveHome() return True # End if app.VK_END == key: ime.MoveEnd() return True # Delete if app.VK_DELETE == key: ime.Delete() TextLine.SetText(self, ime.GetText(self.bCodePage)) return True return True #def OnMouseLeftButtonDown(self): # self.SetFocus() def OnMouseLeftButtonDown(self): if False == self.IsIn(): return False self.SetFocus() PixelPosition = wndMgr.GetCursorPosition(self.hWnd) ime.SetCursorPosition(PixelPosition)
Evet dosyayı atayım isterseniz intrologin dosyasını veya rootux formundan WS 104-105 olması lazım