Mehmet Posted January 31, 2014 Share Posted January 31, 2014 (edited) Input'un sağına soluna [b ] [/b ] şeklinde bbcode eklemek istiyorum Case $buttononizle GUICtrlSetData($onizleme, GUICtrlRead("[b]" & ($konubaslikInput & "[/b]")) & @CRLF & _ GUICtrlRead($resim1Input) & @CRLF & GUICtrlRead($resim2Input) & "") Edited January 31, 2014 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted January 31, 2014 Editor Share Posted January 31, 2014 yazıyı yazıp [B] butonuna bastıgınızdamı bbcode arasınamı alsın. Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) normalde işimi görecek udfler var ama yazıyı seçtikten sonra bbcode ekliyor ben öyle istemediğim için böyle yapmak istedim Önizleme diye bir butonum var Inputa yazı yazdığımda butonla önizleme yapınca inputa yazılan veriyi [b ]arasına alacak[ /b] Case $buttononizle Edited January 31, 2014 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted January 31, 2014 Editor Share Posted January 31, 2014 #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 371, 78, 192, 124) $Input1 = GUICtrlCreateInput("Input1", 32, 24, 225, 21) $Button1 = GUICtrlCreateButton("Ön İzle", 272, 24, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 local $sText = GUICtrlRead($Input1) MsgBox(0,"","[B]" & $sText & "[B]") EndSwitch WEnd Böyle bireymi arıyorsunuz hocam. Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 Teşekkürler aynen böyle istemiştim gui vermedim çünki çizdiğim gui çok uzundu. Tüm Inputlarıma local değişkenlermi atamam gerekiyor. Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted January 31, 2014 Editor Share Posted January 31, 2014 okurken local olarak tanımlarsanız gereksiz yere global bir dğeişken tanımlamamaış olursunuz. Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) En az 20 adet Input var bbcodeleri atama yaparken kodları daha kısa tutmanın bir yolu varmı? Edited January 31, 2014 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted January 31, 2014 Editor Share Posted January 31, 2014 input isimlerini sıralı şekilde yaparsanız bir döngü kurupta yapabilirisiniz. Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 pairs hocam Inputların içeriğini okumuyor ne yapmam gerekiyor #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 389, 202, 192, 124) $baslik = GUICtrlCreateInput("", 40, 32, 121, 21) $resim = GUICtrlCreateInput("", 40, 72, 121, 21) $onizleme = GUICtrlCreateEdit("", 184, 32, 185, 145) $buttononizle = GUICtrlCreateButton("Önizle", 40, 112, 123, 25) $kopyala = GUICtrlCreateButton("kopyala", 40, 143, 123, 25) $sil = GUICtrlCreateButton("sil", 40, 170, 123, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $baslik1 = GUICtrlRead($baslik) Local $resim1 = GUICtrlRead($resim) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $buttononizle GUICtrlSetData($onizleme,("[align=center]" & @CRLF & _ "[b]" & $baslik1 & "[/b]") & @CRLF & _ ("[img]" & $resim1 & "[/img]") & @CRLF & _ "[/align]") Case $kopyala ClipPut(GUICtrlRead($onizleme)) Case $sil GUICtrlSetData($baslik, "") GUICtrlSetData($resim, "") GUICtrlSetData($onizleme, "") EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted January 31, 2014 Share Posted January 31, 2014 # @mesale0077 tarafından yapıldı. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 389, 202, 192, 124) $baslik = GUICtrlCreateInput("", 40, 32, 121, 21) $resim = GUICtrlCreateInput("", 40, 72, 121, 21) $onizleme = GUICtrlCreateEdit("", 184, 32, 185, 145) $buttononizle = GUICtrlCreateButton("Önizle", 40, 112, 123, 25) $kopyala = GUICtrlCreateButton("kopyala", 40, 143, 123, 25) $sil = GUICtrlCreateButton("sil", 40, 170, 123, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $buttononizle GUICtrlSetData($onizleme,("[align=center]" & @CRLF & _ "[b]" & GUICtrlRead($baslik) & "[/b]") & @CRLF & _ ("[img]" & GUICtrlRead($resim) & "[/img]") & @CRLF & _ "[/align]") Case $kopyala ClipPut(GUICtrlRead($onizleme)) Case $sil GUICtrlSetData($baslik, "") GUICtrlSetData($resim, "") GUICtrlSetData($onizleme, "") EndSwitch WEnd nasıl okumuyoor :) Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 peki Inputların herhangi birine veri girilmemişse $onizleme = GUICtrlCreateEdit("", 184, 32, 185, 145) bbcode'i aktarmasın onu nasıl yapabilirim Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted January 31, 2014 Share Posted January 31, 2014 (edited) atıyorum $baslik[50] kullanarak $baslik[1]=GUICtrlCreateInput("", 40, 32, 121, 21) $baslik[2]=GUICtrlCreateInput("", 40, 72, 121, 21) şeklinde yap ve okut kontrol et zaten gerisini sen halledersin Edited January 31, 2014 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 Checkbox olsa yaparımda bunda şartı nereye nasıl koyacağız? Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted January 31, 2014 Share Posted January 31, 2014 arayüzünü tasarla ve tam olarak ne yapmak istiyorsunuz inpütlarda oldukça editboxmı yazacak yada nasıl bir düşünceniz var tam olarak açıklarsanız memnun oluruz tam istediğinizi anlayamadım ,yardımcı olmak için konuyu netleştirmek lazım dostum. Quote Link to comment Share on other sites More sharing options...
Mehmet Posted January 31, 2014 Author Share Posted January 31, 2014 konuyu netleştirecek bir durum yok. bir önceki mesajımda arayüz verdim zaten tek yapılması gereken şey şu inputların herhangi birine veri girilmemişse bbcode aktarmayacak Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted January 31, 2014 Share Posted January 31, 2014 konuyu netleştirecek bir durum yok. bir önceki mesajımda arayüz verdim zaten tek yapılması gereken şey şu inputların herhangi birine veri girilmemişse bbcode aktarmayacak yukarıdaki örneğe göre yapıyorum mantığını anlamışsındır #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 389, 202, 192, 124) $baslik = GUICtrlCreateInput("", 40, 32, 121, 21) $resim = GUICtrlCreateInput("", 40, 72, 121, 21) $onizleme = GUICtrlCreateEdit("", 184, 32, 185, 145) $buttononizle = GUICtrlCreateButton("Önizle", 40, 112, 123, 25) $kopyala = GUICtrlCreateButton("kopyala", 40, 143, 123, 25) $sil = GUICtrlCreateButton("sil", 40, 170, 123, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $buttononizle global $aa1 = GUICtrlRead($baslik) global $aa2 = GUICtrlRead($resim) if stringlen ($aa1)>0 then $aaa="[align=center]" & @CRLF & "[b]" & GUICtrlRead($baslik) & "[/b]"& @CRLF else $aaa="" endif if stringlen ($aa2)>0 then $aaa2="[img]" & GUICtrlRead($resim) & "[/img]" & @CRLF & "[/align]"& @CRLF else $aaa2="" endif GUICtrlSetData($onizleme,$aaa&$aaa2) Case $kopyala ClipPut(GUICtrlRead($onizleme)) Case $sil GUICtrlSetData($baslik, "") GUICtrlSetData($resim, "") GUICtrlSetData($onizleme, "") EndSwitch WEnd çok basit bir örnek yaptım sizin için dostum.... anladığım kadarıyla artık 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.