<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Clomosy | Forum : Syntax Error</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : Genel &#304;&#351;lemler : Syntax Error]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 10:53:33 +0000</pubDate>
  <lastBuildDate>Thu, 09 Oct 2025 15:27:12 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=1190</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[Syntax Error : Merhaba Emine,hatan devam ediy...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1190&amp;PID=2591#2591</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=257">Emr.Erkmn</a><br /><strong>Konu:</strong> 1190<br /><strong>Gönderim Zamanı:</strong> 09&nbsp;Ekim&nbsp;2025 Saat 15:27<br /><br />Merhaba Emine,&nbsp;<br>hatan devam ediyorsa&nbsp;<br><a href="https://www.docs.clomosy.com/Error_Trapping" target="_blank" rel="nofollow">https://www.docs.clomosy.com/Error_Trapping</a> inceler misin?&nbsp;<br>Try Excepten gelen bir parantez hatası mevcut]]>
   </description>
   <pubDate>Thu, 09 Oct 2025 15:27:12 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1190&amp;PID=2591#2591</guid>
  </item> 
  <item>
   <title><![CDATA[Syntax Error : Syntax Error Al&#305;yorum 82.sat&#305;rdavar...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1190&amp;PID=2533#2533</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=335">Emetullah Emine</a><br /><strong>Konu:</strong> 1190<br /><strong>Gönderim Zamanı:</strong> 28&nbsp;Ağustos&nbsp;2025 Saat 15:24<br /><br />Syntax Error Alıyorum 82.satırda&nbsp;<br><br><div>var</div><div>&nbsp; myForm: TclForm;</div><div>&nbsp; TopBarPnl, BodyPnl, NavPnl: TclProPanel;</div><div>&nbsp; StepsContainerPnl: TclProPanel;</div><div>&nbsp; TitleLbl, SkinTypeLbl, DayNameLbl, DayIndexLbl: TclProLabel;</div><div>&nbsp; RefreshBtn, PrevDayBtn, NextDayBtn, BackBtn: TClProButton;</div><div>&nbsp; StepsMemo: TclMemo;</div><div>&nbsp; Rest: TclRest;</div><div>&nbsp; API_KEY, RequestBody: String;</div><div>&nbsp; email, LastSkinType, RoutineRawText: String;</div><div>&nbsp; CurrentDay: Integer;</div><div>&nbsp; DaysCount: Integer;</div><div>&nbsp; DaysList: TClArrayString;</div><div>&nbsp; q, qSess: TclSQLiteQuery;</div><div>&nbsp; IsLoading: Boolean;</div><div>&nbsp;&nbsp;</div><div><br></div><div>// ------------------------- Yardımcı Fonksiyonlar -------------------------</div><div><br></div><div>void DBConnect;</div><div>{</div><div>&nbsp; try</div><div><br></div><div>&nbsp; &nbsp; Clomosy.DBSQLiteConnect(Clomosy.AppFilesPath + 'sonn.db3', '');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Veritabanına bağlanırken hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void CreateRoutineTable;</div><div>{</div><div>&nbsp; try</div><div>&nbsp; &nbsp; Clomosy.DBSQLiteQuery.SQL.Text =</div><div>&nbsp; &nbsp; &nbsp; 'CREATE TABLE IF NOT EXISTS skin_routine (' +</div><div>&nbsp; &nbsp; &nbsp; 'id INTEGER PRIMARY KEY AUTOINCREMENT,' +</div><div>&nbsp; &nbsp; &nbsp; 'email TEXT,' +</div><div>&nbsp; &nbsp; &nbsp; 'day TEXT,' +</div><div>&nbsp; &nbsp; &nbsp; 'timeOfDay TEXT,' +</div><div>&nbsp; &nbsp; &nbsp; 'stepOrder INTEGER,' +</div><div>&nbsp; &nbsp; &nbsp; 'step TEXT' +</div><div>&nbsp; &nbsp; &nbsp; ')';</div><div>&nbsp; &nbsp; Clomosy.DBSQLiteQuery.OpenOrExecute;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Tablo oluşturulurken hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div><br></div><div>void LoadEmailAndSkinTypeFromDB;</div><div>{</div><div>&nbsp; email = '';</div><div>&nbsp; LastSkinType = '';</div><div>&nbsp; try</div><div>&nbsp; &nbsp; qSess = Clomosy.DBSQLiteQueryWith('SELECT email FROM app_session WHERE id=1');</div><div>&nbsp; &nbsp; qSess.OpenOrExecute;</div><div>&nbsp; &nbsp; if (not qSess.EOF) email = qSess.FieldByName('email').AsString;</div><div>&nbsp; &nbsp; qSess.Free;</div><div><br></div><div>&nbsp; &nbsp; if email &lt;&gt; ''</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; qSess = Clomosy.DBSQLiteQueryWith('SELECT skin_type FROM skin_profile WHERE email=' + QuotedStr(email) + ' ORDER BY id DESC LIMIT 1');</div><div>&nbsp; &nbsp; &nbsp; qSess.OpenOrExecute;</div><div>&nbsp; &nbsp; &nbsp; if (not qSess.EOF) LastSkinType = qSess.FieldByName('skin_type').AsString;</div><div>&nbsp; &nbsp; &nbsp; qSess.Free;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Oturum veya cilt tipi okunamadı: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div><br></div><div>void SaveRoutineToDB;</div><div>var</div><div>&nbsp; lines, cols: TClArrayString;</div><div>&nbsp; i: Integer;</div><div>&nbsp; line, dayName, timeOfDay, stepOrder, step: String;</div><div>{</div><div>&nbsp; &nbsp; try</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; lines = TClArrayString.Create;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; cols&nbsp; = TClArrayString.Create;</div><div><br></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; Clomosy.DBSQLiteQuery.SQL.Text = 'DELETE FROM skin_routine WHERE email=' + QuotedStr(email);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Clomosy.DBSQLiteQuery.OpenOrExecute;</div><div><br></div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; lines = ClGetStringSplit(RoutineRawText, #10);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; for i = 0 to lines.Count - 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = Trim(lines.GetItem(i));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if line == ''&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cols = ClGetStringSplit(line, '|');</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if cols.Count == 4 {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dayName&nbsp; &nbsp;= Trim(cols.GetItem(0));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeOfDay = Trim(cols.GetItem(1));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stepOrder = Trim(cols.GetItem(2));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step&nbsp; &nbsp; &nbsp; = Trim(cols.GetItem(3));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if stepOrder == ''&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stepOrder = '0';</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Clomosy.DBSQLiteQuery.SQL.Text =&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'INSERT INTO skin_routine (email, day, timeOfDay, stepOrder, step) VALUES (' +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QuotedStr(email) + ',' + QuotedStr(dayName) + ',' + QuotedStr(timeOfDay) + ',' + stepOrder + ',' + QuotedStr(step) + ')';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Clomosy.DBSQLiteQuery.OpenOrExecute;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('Uyarı: atlanan satır (format yanlış): ' + line);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Bakım rutini DB kaydedildi.');</div><div><br></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; lines.Free;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; cols.Free;</div><div>}</div><div>&nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Rutin DB kaydı sırasında hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void LoadDaysFromDB;</div><div>var</div><div>&nbsp; qdays: TclSQLiteQuery;</div><div>{</div><div>&nbsp; DaysList = TClArrayString.Create;</div><div>&nbsp; try</div><div>&nbsp; &nbsp; qdays = Clomosy.DBSQLiteQueryWith('SELECT DISTINCT day FROM skin_routine WHERE email=' + QuotedStr(email) + ' ORDER BY id');</div><div>&nbsp; &nbsp; qdays.OpenOrExecute;</div><div>&nbsp; &nbsp; while not qdays.EOF</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; DaysList.Add(qdays.FieldByName('day').AsString);</div><div>&nbsp; &nbsp; &nbsp; qdays.Next;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; qdays.Free;</div><div>&nbsp; except</div><div>&nbsp; {</div><div>&nbsp; &nbsp; if qdays &lt;&gt; nil&nbsp;</div><div>&nbsp; &nbsp; qdays.Free;</div><div>&nbsp; &nbsp; ShowMessage('Günler yüklenirken hata: ' + LastExceptionMessage);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void RenderDay;</div><div>var</div><div>&nbsp; dayName: String;</div><div>&nbsp; qday: TclSQLiteQuery;</div><div>&nbsp; line: String;</div><div>{</div><div>&nbsp; try</div><div>&nbsp; &nbsp; if DaysList == nil</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Clear;</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('Henüz rutin verisi yok. "Yenile (AI)" ile oluşturun.');</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; if DaysList.Count == 0&nbsp;</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Clear;</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('Henüz kayıtlı gün yok.');</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; if CurrentDay &lt; 0 CurrentDay = 0;</div><div>&nbsp; &nbsp; if CurrentDay &gt; DaysList.Count - 1 CurrentDay = DaysList.Count - 1;</div><div><br></div><div>&nbsp; &nbsp; dayName = DaysList.GetItem(CurrentDay);</div><div>&nbsp; &nbsp; DayNameLbl.Text = dayName;</div><div>&nbsp; &nbsp; DayIndexLbl.Text = IntToStr(CurrentDay+1) + '/' + IntToStr(DaysList.Count);</div><div><br></div><div>&nbsp; &nbsp; StepsMemo.Lines.Clear;</div><div>&nbsp; &nbsp; StepsMemo.Lines.Add('=== ' + dayName + ' ===');</div><div><br></div><div>&nbsp; &nbsp; qday = Clomosy.DBSQLiteQueryWith(</div><div>&nbsp; &nbsp; &nbsp; 'SELECT timeOfDay, stepOrder, step FROM skin_routine WHERE email=' + QuotedStr(email) +</div><div>&nbsp; &nbsp; &nbsp; ' AND day=' + QuotedStr(dayName) + ' ORDER BY timeOfDay, stepOrder');</div><div>&nbsp; &nbsp; qday.OpenOrExecute;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; /*</div><div>&nbsp; &nbsp; while not qday.EOF</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; line = qday.FieldByName('timeOfDay').AsString + ' - ' + IntToStr(qday.FieldByName('stepOrder').AsInteger) + ') ' + qday.FieldByName('step').AsString;</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add(line);</div><div>&nbsp; &nbsp; &nbsp; qday.Next;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; */</div><div>&nbsp; &nbsp; qday.Free;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Gün render edilirken hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div><br></div><div><br></div><div>void OnRoutineCompleted;</div><div>var</div><div>&nbsp; aiText, tmp: String;</div><div>{</div><div>&nbsp; try</div><div>&nbsp; &nbsp; IsLoading = False;</div><div>&nbsp; &nbsp; myForm.FormWaiting.Visible = False;</div><div><br></div><div>&nbsp; &nbsp; if Rest.StatusCode &gt;= 400</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Clear;</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('API Hatası: ' + IntToStr(Rest.StatusCode));</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div><br></div><div><br></div><div>&nbsp; &nbsp; aiText = '';</div><div>&nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; aiText = Clomosy.CLParseJSON(Rest.Response, 'candidates.0.output.0.content.0.text');</div><div>&nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; aiText = '';</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; if aiText == ''&nbsp;</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; aiText = Clomosy.CLParseJSON(Rest.Response, 'candidates.0.output.0.content.0.text');</div><div>&nbsp; &nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; aiText = '';</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; if aiText == ''&nbsp;</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Clear;</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('Yanıt metni çıkarılamadı. Gelen ham yanıt DB veya format hatası olabilir.');</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('Ham cevap:');</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add(Rest.Response);</div><div>&nbsp; &nbsp; &nbsp; Exit;</div><div>&nbsp; &nbsp; }</div><div><br></div><div><br></div><div>&nbsp; &nbsp; tmp = ClGetStringReplace(aiText, '```json', '');</div><div>&nbsp; &nbsp; tmp = ClGetStringReplace(tmp, '```', '');</div><div>&nbsp; &nbsp; tmp = ClGetStringReplace(tmp, #13#10, #10);</div><div>&nbsp; &nbsp; tmp = ClGetStringReplace(tmp, #13, #10);</div><div>&nbsp; &nbsp; tmp = Trim(tmp);</div><div><br></div><div>&nbsp; &nbsp; RoutineRawText = tmp;</div><div><br></div><div>&nbsp; &nbsp; SaveRoutineToDB;</div><div><br></div><div>&nbsp; &nbsp; LoadDaysFromDB;</div><div>&nbsp; &nbsp; CurrentDay = 0;</div><div>&nbsp; &nbsp; if DaysList.Count &gt; 0 RenderDay;</div><div>&nbsp; &nbsp; else StepsMemo.Lines.Add('Kaydedilen rutin bulunamadı.');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; StepsMemo.Lines.Clear;</div><div>&nbsp; &nbsp; StepsMemo.Lines.Add('OnRoutineCompleted içinde hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void RestCreate(ABaseUrl, ABody: String);</div><div>{</div><div>&nbsp; try</div><div>&nbsp; &nbsp; Rest = TclRest.Create;</div><div>&nbsp; &nbsp; Rest.Accept = 'application/json';</div><div>&nbsp; &nbsp; Rest.ContentType = 'application/json';</div><div>&nbsp; &nbsp; Rest.Method = rmPOST;</div><div>&nbsp; &nbsp; Rest.ConnectTimeOut = 30000;</div><div>&nbsp; &nbsp; Rest.BaseURL = ABaseUrl;</div><div>&nbsp; &nbsp; Rest.Body = ABody;</div><div>&nbsp; &nbsp; Rest.OnCompleted = 'OnRoutineCompleted';</div><div>&nbsp; &nbsp; Rest.ExecuteAsync;</div><div><br></div><div>&nbsp; &nbsp; IsLoading = True;</div><div>&nbsp; &nbsp; myForm.FormWaiting.Visible = True;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; IsLoading = False;</div><div>&nbsp; &nbsp; myForm.FormWaiting.Visible = False;</div><div>&nbsp; &nbsp; ShowMessage('Sunucuya bağlanırken hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div><br></div><div>void RequestRoutineFromAI;</div><div>var</div><div>&nbsp; prompt, safePrompt: String;</div><div>{</div><div>&nbsp; try</div><div><br></div><div>&nbsp; &nbsp; if LastSkinType == ''&nbsp; LastSkinType = 'Bilinmiyor';</div><div><br></div><div>&nbsp; &nbsp; prompt =</div><div>&nbsp; &nbsp; &nbsp; 'Sen deneyimli bir cilt bakım uzmanısın. Kullanıcının cilt tipi: ' + LastSkinType + '. ' +</div><div>&nbsp; &nbsp; &nbsp; '7 günlük (Pazartesi–Pazar), her gün için "sabah" ve "akşam" adım adım kısa ve uygulanabilir bir bakım rutini oluştur. ' +</div><div>&nbsp; &nbsp; &nbsp; 'Her gün için farklı rutinler yaz. ' +</div><div>&nbsp; &nbsp; &nbsp; 'Her adımı şu formatta ver: day|timeOfDay|stepOrder|step ' +</div><div>&nbsp; &nbsp; &nbsp; 'Örnek: Pazartesi|sabah|1|Nazik jel temizleyici. ' +</div><div>&nbsp; &nbsp; &nbsp; 'Sadece bu formatta, başka açıklama yazma.';</div><div><br></div><div>&nbsp; &nbsp; safePrompt = prompt;</div><div>&nbsp; &nbsp; safePrompt = ClGetStringReplace(safePrompt, '\', '\\');</div><div>&nbsp; &nbsp; safePrompt = ClGetStringReplace(safePrompt, '"', '\"');</div><div>&nbsp; &nbsp; safePrompt = ClGetStringReplace(safePrompt, #13#10, ' ');</div><div>&nbsp; &nbsp; safePrompt = ClGetStringReplace(safePrompt, #10, ' ');</div><div>&nbsp; &nbsp; safePrompt = ClGetStringReplace(safePrompt, #13, ' ');</div><div><br></div><div>&nbsp; &nbsp; RequestBody = '{ "contents": &#091; { "parts": &#091; { "text": "' + safePrompt + '" } &#093; } &#093; }';</div><div><br></div><div>&nbsp; &nbsp; API_KEY = 'YOUR_API_KEY_HERE'; // &#8592; buraya kendi token'ını koy</div><div><br></div><div>&nbsp; &nbsp; RestCreate('<a href="https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateC&#111;ntent?key=" target="_blank" rel="nofollow">https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=</a>' + API_KEY, RequestBody);</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('RequestRoutineFromAI hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void PrevDay;</div><div>{</div><div>&nbsp; if DaysList == nil&nbsp;&nbsp;</div><div>&nbsp; Exit;</div><div>&nbsp; if DaysList.Count == 0&nbsp;&nbsp;</div><div>&nbsp; Exit;</div><div>&nbsp;&nbsp;</div><div>&nbsp; if CurrentDay &gt; 0&nbsp;&nbsp;</div><div>&nbsp; CurrentDay = CurrentDay - 1;</div><div>&nbsp; RenderDay;</div><div>}</div><div><br></div><div>void NextDay;</div><div>{</div><div>&nbsp; if DaysList == nil Exit;</div><div>&nbsp; if DaysList.Count == 0 Exit;</div><div>&nbsp; if CurrentDay &lt; DaysList.Count - 1&nbsp; CurrentDay = CurrentDay + 1;</div><div>&nbsp; RenderDay;</div><div>}</div><div><br></div><div><br></div><div>void BuildUIFrame;</div><div>{</div><div>&nbsp; myForm = TclForm.Create(Self);</div><div>&nbsp; myForm.BtnFormMenu.Visible = False;</div><div>&nbsp; myForm.FormWaiting.Visible = False;</div><div><br></div><div>&nbsp; TopBarPnl = myForm.AddNewProPanel(myForm, 'TopBarPnl');</div><div>&nbsp; TopBarPnl.Align = alTop;</div><div>&nbsp; TopBarPnl.Height = 64;</div><div><br></div><div>&nbsp; TitleLbl = myForm.AddNewProLabel(TopBarPnl, 'TitleLbl', 'Haftalık Bakım Rutini');</div><div>&nbsp; TitleLbl.Align = alLeft;</div><div>&nbsp; TitleLbl.Width = 260;</div><div>&nbsp; TitleLbl.clProSettings.FontSize = 18;</div><div>&nbsp; TitleLbl.SetclProSettings(TitleLbl.clProSettings);</div><div><br></div><div>&nbsp; SkinTypeLbl = myForm.AddNewProLabel(TopBarPnl, 'SkinTypeLbl', 'Cilt tipi: ');</div><div>&nbsp; SkinTypeLbl.Align = alClient;</div><div>&nbsp; SkinTypeLbl.clProSettings.FontSize = 14;</div><div>&nbsp; SkinTypeLbl.SetclProSettings(SkinTypeLbl.clProSettings);</div><div><br></div><div>&nbsp; BackBtn = myForm.AddNewProButton(TopBarPnl, 'BackBtn', 'Kapat');</div><div>&nbsp; BackBtn.Align = alRight;</div><div>&nbsp; BackBtn.Width = 100;</div><div>&nbsp; myForm.AddNewEvent(BackBtn, tbeOnClick, 'OnBackBtn');</div><div><br></div><div>&nbsp; BodyPnl = myForm.AddNewProPanel(myForm, 'BodyPnl');</div><div>&nbsp; BodyPnl.Align = alClient;</div><div>&nbsp; BodyPnl.Margins.Top = 10;</div><div>&nbsp; BodyPnl.Margins.Left = 10;</div><div>&nbsp; BodyPnl.Margins.Right = 10;</div><div>&nbsp; BodyPnl.Margins.Bottom = 10;</div><div><br></div><div>&nbsp; NavPnl = myForm.AddNewProPanel(BodyPnl, 'NavPnl');</div><div>&nbsp; NavPnl.Align = alTop;</div><div>&nbsp; NavPnl.Height = 52;</div><div><br></div><div>&nbsp; PrevDayBtn = myForm.AddNewProButton(NavPnl, 'PrevDayBtn', '&lt; Önceki');</div><div>&nbsp; PrevDayBtn.Align = alLeft;</div><div>&nbsp; PrevDayBtn.Width = 120;</div><div>&nbsp; myForm.AddNewEvent(PrevDayBtn, tbeOnClick, 'PrevDay');</div><div><br></div><div>&nbsp; DayNameLbl = myForm.AddNewProLabel(NavPnl, 'DayNameLbl', 'Gün');</div><div>&nbsp; DayNameLbl.Align = alClient;</div><div>&nbsp; DayNameLbl.clProSettings.FontSize = 16;</div><div>&nbsp; DayNameLbl.SetclProSettings(DayNameLbl.clProSettings);</div><div><br></div><div>&nbsp; DayIndexLbl = myForm.AddNewProLabel(NavPnl, 'DayIndexLbl', '0/0');</div><div>&nbsp; DayIndexLbl.Align = alRight;</div><div>&nbsp; DayIndexLbl.Width = 60;</div><div>&nbsp; DayIndexLbl.clProSettings.FontSize = 14;</div><div>&nbsp; DayIndexLbl.SetclProSettings(DayIndexLbl.clProSettings);</div><div><br></div><div>&nbsp; NextDayBtn = myForm.AddNewProButton(NavPnl, 'NextDayBtn', 'Sonraki &gt;');</div><div>&nbsp; NextDayBtn.Align = alRight;</div><div>&nbsp; NextDayBtn.Width = 120;</div><div>&nbsp; myForm.AddNewEvent(NextDayBtn, tbeOnClick, 'NextDay');</div><div><br></div><div>&nbsp; RefreshBtn = myForm.AddNewProButton(NavPnl, 'RefreshBtn', 'Yenile (AI)');</div><div>&nbsp; RefreshBtn.Align = alRight;</div><div>&nbsp; RefreshBtn.Width = 120;</div><div>&nbsp; myForm.AddNewEvent(RefreshBtn, tbeOnClick, 'RequestRoutineFromAI');</div><div><br></div><div>&nbsp; // StepsContainer ve memo (gösterim)</div><div>&nbsp; StepsContainerPnl = myForm.AddNewProPanel(BodyPnl, 'StepsContainerPnl');</div><div>&nbsp; StepsContainerPnl.Align = alClient;</div><div>&nbsp; StepsContainerPnl.Margins.Top = 10;</div><div>&nbsp; StepsContainerPnl.Margins.Left = 10;</div><div>&nbsp; StepsContainerPnl.Margins.Right = 10;</div><div>&nbsp; StepsContainerPnl.Margins.Bottom = 10;</div><div><br></div><div>&nbsp; StepsMemo = myForm.AddNewMemo(StepsContainerPnl, 'StepsMemo', 'Günlük adımlar burada gösterilecektir...');</div><div>&nbsp; StepsMemo.Align = alClient;</div><div>&nbsp; StepsMemo.ReadOnly = True;</div><div>&nbsp; StepsMemo.TextSettings.WordWrap = True;</div><div>&nbsp; StepsMemo.Text = '';</div><div>}</div><div><br></div><div>void OpenRoutineForm;</div><div>{</div><div>&nbsp; try</div><div>&nbsp; &nbsp; DBConnect;</div><div>&nbsp; &nbsp; CreateRoutineTable;</div><div><br></div><div>&nbsp; &nbsp; InitializeArrays = nil;&nbsp;</div><div>&nbsp; &nbsp; BuildUIFrame;</div><div><br></div><div>&nbsp; &nbsp; LoadEmailAndSkinTypeFromDB;</div><div>&nbsp; &nbsp; if LastSkinType == ''&nbsp;</div><div>&nbsp; &nbsp; &nbsp; SkinTypeLbl.Text = '(Cilt tipi bulunamadı)'</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; SkinTypeLbl.Text = '(Cilt tipi: ' + LastSkinType + ')';</div><div><br></div><div><br></div><div>&nbsp; &nbsp; LoadDaysFromDB;</div><div>&nbsp; &nbsp; CurrentDay = 0;</div><div>&nbsp; &nbsp; if ((DaysList &lt;&gt; nil) &amp;&amp; (DaysList.Count &gt; 0))&nbsp;</div><div>&nbsp; &nbsp; &nbsp; RenderDay;</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; StepsMemo.Lines.Add('Henüz AI ile oluşturulmuş rutin yok. "Yenile (AI)" ile oluşturun.');</div><div><br></div><div>&nbsp; &nbsp; myForm.Run;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Form açılırken hata: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>/*</div><div>void OnBackBtn;</div><div>{</div><div>&nbsp; myForm.Close;</div><div>}</div><div>*/</div><div><br></div>]]>
   </description>
   <pubDate>Thu, 28 Aug 2025 15:24:56 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1190&amp;PID=2533#2533</guid>
  </item> 
 </channel>
</rss>