Skip to content

Commit 588513a

Browse files
AI-Hotkeys Version 1.4.1.20250120
1 parent 02aed65 commit 588513a

File tree

3 files changed

+93
-52
lines changed

3 files changed

+93
-52
lines changed

AI-Hotkeys-de.ini

1.05 KB
Binary file not shown.

AI-Hotkeys.ahk

+93-52
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
;;;;;;;;;;;;;;;;;;
2-
; AI-Hotkeys.ahk ; Version 1.4.0.20241106 - Copyright (C) 2024 Wolfram Ravenwolf
2+
; AI-Hotkeys.ahk ; Version 1.4.1.20250120 - Copyright (C) 2024 Wolfram Ravenwolf
33
;;;;;;;;;;;;;;;;;;
44

5-
Version = 1.4.0.20241106 ; ^^^^^^^^^^^^^^
5+
Version = 1.4.1.20250120 ; ^^^^^^^^^^^^^^
66

77
; This program is free software: you can redistribute it and/or modify
88
; it under the terms of the GNU General Public License as published by
@@ -44,8 +44,8 @@ global Language := GetLanguage()
4444
; Primary Hotkeys
4545

4646
global A0 := "Answer"
47-
global A1 := "Compose an answer to the following text"
48-
global A2 := "Answer in my name. Maintain the language and level of formality. Write only the answer, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)!"
47+
global A1 := "Compose an answer to the following text (in its original language, without web search)"
48+
global A2 := "Answer in my name. Maintain the language and level of formality. Write only the answer, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
4949
global A3 := "writing"
5050

5151
global B0 := "Calculate/Convert"
@@ -69,13 +69,13 @@ global E2 := ""
6969
global E3 := ""
7070

7171
global F0 := "Formulate better"
72-
global F1 := "Formulate the following text better (in its original language)"
73-
global F2 := "Improve grammar, spelling, style, tone and comprehensibility while maintaining the original language and level of formality. Use active and direct, friendly and clear formulations instead of modal verbs in the subjunctive such as ""could"", ""should"" or ""would"". Write only the improved version, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)!"
72+
global F1 := "Formulate the following text better (in its original language, without web search)"
73+
global F2 := "Improve grammar, spelling, style, tone and comprehensibility while maintaining the original language and level of formality. Use active and direct, friendly and clear formulations instead of modal verbs in the subjunctive such as ""could"", ""should"" or ""would"". Write only the improved version, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
7474
global F3 := "writing"
7575

7676
global G0 := "Check grammar etc."
77-
global G1 := "Check grammar, spelling, style, tone, and comprehensibility of the following text"
78-
global G2 := "Provide specific suggestions for improvement and explain them to me. Prefer active and direct, friendly and clear formulations instead of modal verbs in the subjunctive such as ""could"", ""should"" or ""would"". KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)!"
77+
global G1 := "Check grammar, spelling, style, tone, and comprehensibility of the following text (without web search)"
78+
global G2 := "Provide specific suggestions for improvement and explain them to me. Prefer active and direct, friendly and clear formulations instead of modal verbs in the subjunctive such as ""could"", ""should"" or ""would"". KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
7979
global G3 := "writing"
8080

8181
global Q0 := "Query Perplexity…"
@@ -89,18 +89,18 @@ global R2 := ""
8989
global R3 := ""
9090

9191
global S0 := "Summarize"
92-
global S1 := "Summarize"
93-
global S2 := ""
94-
global S3 := ""
92+
global S1 := "Summarize (without web search)"
93+
global S2 := "WITHOUT WEB SEARCH!"
94+
global S3 := "writing"
9595

9696
global T0 := "Translate"
97-
global T1 := "Translate the following text to or from English"
98-
global T2 := "Write only the translation of the text enclosed in <text> tags, nothing else, not even a greeting. Maintain the original formatting and structure, except for the <text> tags. TRANSLATE BETWEEN GERMAN AND ENGLISH UNLESS ANOTHER LANGUAGE IS EXPLICITLY REQUESTED."
97+
global T1 := "Translate the following text to or from English (without web search)"
98+
global T2 := "Write only the translation of the text enclosed in <text> tags, nothing else, not even a greeting. Maintain the original formatting and structure, except for the <text> tags. TRANSLATE BETWEEN GERMAN AND ENGLISH UNLESS ANOTHER LANGUAGE IS EXPLICITLY REQUESTED! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
9999
global T3 := "writing"
100100

101101
global V0 := "Clarify/Simplify"
102-
global V1 := "Clarify and simplify the following text linguistically"
103-
global V2 := "Write only the clarified and simplified version, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)!"
102+
global V1 := "Clarify and simplify the following text linguistically (in its original language, without web search)"
103+
global V2 := "Write only the clarified and simplified version, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
104104
global V3 := "writing"
105105

106106
global W0 := "What is"
@@ -109,15 +109,15 @@ global W2 := ""
109109
global W3 := ""
110110

111111
global X0 := "Reject"
112-
global X1 := "Compose a negative response/rejection to the following text"
113-
global X2 := "Answer in my name. Maintain the language and level of formality. Write only the rejection, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)!"
112+
global X1 := "Compose a negative response/rejection to the following text (in its original language, without web search)"
113+
global X2 := "Answer in my name. Maintain the language and level of formality. Write only the rejection, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
114114
global X3 := "writing"
115115

116116
global YorZ := "Z"
117117

118118
global Z0 := "Accept"
119-
global Z1 := "Compose an affirmative response/acceptance to the following text"
120-
global Z2 := "Answer in my name. Maintain the language and level of formality. Write only the acceptance, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)!"
119+
global Z1 := "Compose an affirmative response/acceptance to the following text (in its original language, without web search)"
120+
global Z2 := "Answer in my name. Maintain the language and level of formality. Write only the acceptance, nothing else, not even a greeting. KEEP THE ORIGINAL LANGUAGE OF THE TEXT (E.G. ENGLISH OR GERMAN)! WITHOUT WEB SEARCH, WITHOUT SOURCE CITATIONS!"
121121
global Z3 := "writing"
122122

123123
; Secondary Hotkeys
@@ -218,7 +218,7 @@ global SEND_BUTTON_CAPTION := "✔️ Send (Ctrl+Enter)"
218218

219219
if (Language = "de") {
220220

221-
;MsgBox, Default (German) Variables
221+
;MsgBox, German
222222

223223
; ------------------------------------------------------------------------------
224224
; Default (German) Tasks and Instructions
@@ -232,8 +232,8 @@ if (Language = "de") {
232232
; Primary Hotkeys
233233

234234
global A0 := "Verfasse Antwort"
235-
global A1 := "Verfasse eine Antwort auf folgenden Text"
236-
global A2 := "Antworte in meinem Namen. Behalte Sprache und Formalitätsgrad bei. Schreibe nur die Antwort, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI!"
235+
global A1 := "Verfasse eine Antwort auf folgenden Text (in seiner Originalsprache, ohne Websuche)"
236+
global A2 := "Antworte in meinem Namen. Behalte Sprache und Formalitätsgrad bei. Schreibe nur die Antwort, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
237237
global A3 := "writing"
238238

239239
global B0 := "Berechne/Konvertiere"
@@ -257,13 +257,13 @@ global E2 := ""
257257
global E3 := ""
258258

259259
global F0 := "Formuliere besser"
260-
global F1 := "Formuliere folgenden Text besser (in seiner Originalsprache)"
261-
global F2 := "Verbessere Grammatik, Rechtschreibung, Stil, Ton und Verständlichkeit unter Beibehaltung der ursprünglichen Sprache und des Formalitätsgrads. Verwende aktive und direkte, freundliche und klare Formulierungen anstelle von Modalverben im Konjunktiv wie ""könnte"", ""müsste"", ""sollte"" oder ""würde"". Schreibe nur die verbesserte Fassung, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI!"
260+
global F1 := "Formuliere folgenden Text besser (in seiner Originalsprache, ohne Websuche)"
261+
global F2 := "Verbessere Grammatik, Rechtschreibung, Stil, Ton und Verständlichkeit unter Beibehaltung der ursprünglichen Sprache und des Formalitätsgrads. Verwende aktive und direkte, freundliche und klare Formulierungen anstelle von Modalverben im Konjunktiv wie ""könnte"", ""müsste"", ""sollte"" oder ""würde"". Schreibe nur die verbesserte Fassung, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
262262
global F3 := "writing"
263263

264264
global G0 := "Prüfe Grammatik usw."
265-
global G1 := "Prüfe Grammatik, Rechtschreibung, Stil, Ton und Verständlichkeit des folgenden Textes"
266-
global G2 := "Gib mir konkrete Verbesserungsvorschläge und erläutere sie mir. Bevorzuge aktive und direkte, freundliche und klare Formulierungen anstelle von Modalverben im Konjunktiv wie ""könnte"", ""müsste"", ""sollte"" oder ""würde"". BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI!"
265+
global G1 := "Prüfe Grammatik, Rechtschreibung, Stil, Ton und Verständlichkeit des folgenden Textes (ohne Websuche)"
266+
global G2 := "Gib mir konkrete Verbesserungsvorschläge und erläutere sie mir. Bevorzuge aktive und direkte, freundliche und klare Formulierungen anstelle von Modalverben im Konjunktiv wie ""könnte"", ""müsste"", ""sollte"" oder ""würde"". BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
267267
global G3 := "writing"
268268

269269
global Q0 := "Perplexity…"
@@ -277,18 +277,18 @@ global R2 := ""
277277
global R3 := ""
278278

279279
global S0 := "Fasse zusammen"
280-
global S1 := "Fasse zusammen"
281-
global S2 := ""
282-
global S3 := ""
280+
global S1 := "Fasse zusammen (ohne Websuche)"
281+
global S2 := "OHNE WEBSUCHE!"
282+
global S3 := "writing"
283283

284284
global T0 := "Übersetze"
285-
global T1 := "Übersetze den folgenden Text ins Deutsche oder aus dem Deutschen"
286-
global T2 := "Schreibe nur die Übersetzung des mit <text>-Tags umgebenen Texts, sonst nichts, auch keine Grußformel. Behalte die ursprüngliche Formatierung und Struktur bei, mit Ausnahme der <text>-Tags. ÜBERSETZE ZWISCHEN DEUTSCH UND ENGLISCH, ES SEI DENN, EINE ANDERE SPRACHE WIRD AUSDRÜCKLICH GEWÜNSCHT."
285+
global T1 := "Übersetze den folgenden Text ins Deutsche oder aus dem Deutschen (ohne Websuche)"
286+
global T2 := "Schreibe nur die Übersetzung des mit <text>-Tags umgebenen Texts, sonst nichts, auch keine Grußformel. Behalte die ursprüngliche Formatierung und Struktur bei, mit Ausnahme der <text>-Tags. ÜBERSETZE ZWISCHEN DEUTSCH UND ENGLISCH, ES SEI DENN, EINE ANDERE SPRACHE WIRD AUSDRÜCKLICH GEWÜNSCHT! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
287287
global T3 := "writing"
288288

289289
global V0 := "Verdeutliche/Vereinfache"
290-
global V1 := "Verdeutliche und vereinfache folgenden Text sprachlich"
291-
global V2 := "Schreibe nur die verdeutlichte und vereinfachte Fassung, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI!"
290+
global V1 := "Verdeutliche und vereinfache folgenden Text sprachlich (in seiner Originalsprache, ohne Websuche)"
291+
global V2 := "Schreibe nur die verdeutlichte und vereinfachte Fassung, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
292292
global V3 := "writing"
293293

294294
global W0 := "Was ist"
@@ -297,15 +297,15 @@ global W2 := ""
297297
global W3 := ""
298298

299299
global X0 := "Verfasse Absage"
300-
global X1 := "Verfasse eine verneinende/ablehnende Antwort/Absage auf folgenden Text"
301-
global X2 := "Antworte in meinem Namen. Behalte Sprache und Formalitätsgrad bei. Schreibe nur die Absage, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI!"
300+
global X1 := "Verfasse eine verneinende/ablehnende Antwort/Absage auf folgenden Text (in seiner Originalsprache, ohne Websuche)"
301+
global X2 := "Antworte in meinem Namen. Behalte Sprache und Formalitätsgrad bei. Schreibe nur die Absage, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
302302
global X3 := "writing"
303303

304304
global YorZ := "Y"
305305

306306
global Y0 := "Verfasse Zusage"
307-
global Y1 := "Verfasse eine bejahende/zustimmende Antwort/Zusage auf folgenden Text"
308-
global Y2 := "Antworte in meinem Namen. Behalte Sprache und Formalitätsgrad bei. Schreibe nur die Zusage, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI!"
307+
global Y1 := "Verfasse eine bejahende/zustimmende Antwort/Zusage auf folgenden Text (in seiner Originalsprache, ohne Websuche)"
308+
global Y2 := "Antworte in meinem Namen. Behalte Sprache und Formalitätsgrad bei. Schreibe nur die Zusage, sonst nichts, auch keine Grußformel. BEHALTE DIE ORIGINALSPRACHE DES TEXTS (Z. B. DEUTSCH ODER ENGLISCH) BEI! OHNE WEBSUCHE, OHNE QUELLENANGABEN!"
309309
global Y3 := "writing"
310310

311311
; Secondary Hotkeys
@@ -415,6 +415,7 @@ global SUFFIX := ""
415415

416416
global CapsLockHotkeys := true ; AI (Perplexity) Hotkeys + CapsLock Hotkeys
417417
global CapsLockOff := true ; Use CapsLock to disable CapsLock
418+
global Debug := false ; Debug mode
418419
global Pro := "auto" ; Pro Search: auto = only for non-writing tasks, true = always, false = never
419420
global QueryEditor := "tray" ; Query Editor: tray = keep in tray, true = keep in taskbar, false = off
420421
global StartupHelp := 5 ; Show help on startup: show for X seconds, 1 = keep open permanently, 0 = off
@@ -533,8 +534,6 @@ LoadCustomVariables() {
533534
return
534535
}
535536

536-
;MsgBox, iniFile: %iniFile%
537-
538537
local key, value, parts
539538

540539
FileRead, fileContent, %iniFile%
@@ -561,6 +560,14 @@ LoadCustomVariables() {
561560
%key% := value
562561
}
563562
}
563+
564+
if (Debug) {
565+
SetTimer, ChangeButtonNames, 50
566+
MsgBox, 68, AI-Hotkeys Debug, iniFile: %iniFile%
567+
SetTimer, ChangeButtonNames, Off
568+
IfMsgBox, Yes
569+
Clipboard := iniFile
570+
}
564571
}
565572

566573
; ------------------------------------------------------------------------------
@@ -633,13 +640,16 @@ Help()
633640
}
634641

635642
; Settings
636-
;HelpText .= "`nSettings:`n"
637-
;HelpText .= "CapsLockHotkeys = " . (CapsLockHotkeys = 1 ? "true" : CapsLockHotkeys = 0 ? "false" : CapsLockHotkeys) . "`n"
638-
;HelpText .= "CapsLockOff = " . (CapsLockOff = 1 ? "true" : CapsLockOff = 0 ? "false" : CapsLockOff) . "`n"
639-
;HelpText .= "Pro = " . (Pro = 1 ? "true" : Pro = 0 ? "false" : Pro) . "`n"
640-
;HelpText .= "QueryEditor = " . (QueryEditor = 1 ? "true" : QueryEditor = 0 ? "false" : QueryEditor) . "`n"
641-
;HelpText .= "StartupHelp = " . (StartupHelp = 1 ? "true" : StartupHelp = 0 ? "false" : StartupHelp) . "`n"
642-
;HelpText .= "UseDarkTheme = " . (UseDarkTheme = 1 ? "true" : UseDarkTheme = 0 ? "false" : UseDarkTheme) . "`n"
643+
if (Debug) {
644+
HelpText .= "`nSettings:`n"
645+
HelpText .= "CapsLockHotkeys = " . (CapsLockHotkeys = 1 ? "true" : CapsLockHotkeys = 0 ? "false" : CapsLockHotkeys) . "`n"
646+
HelpText .= "CapsLockOff = " . (CapsLockOff = 1 ? "true" : CapsLockOff = 0 ? "false" : CapsLockOff) . "`n"
647+
HelpText .= "Debug = " . (Debug = 1 ? "true" : Debug = 0 ? "false" : Debug) . "`n"
648+
HelpText .= "Pro = " . (Pro = 1 ? "true" : Pro = 0 ? "false" : Pro) . "`n"
649+
HelpText .= "QueryEditor = " . (QueryEditor = 1 ? "true" : QueryEditor = 0 ? "false" : QueryEditor) . "`n"
650+
HelpText .= "StartupHelp = " . (StartupHelp = 1 ? "true" : StartupHelp = 0 ? "false" : StartupHelp) . "`n"
651+
HelpText .= "UseDarkTheme = " . (UseDarkTheme = 1 ? "true" : UseDarkTheme = 0 ? "false" : UseDarkTheme) . "`n"
652+
}
643653

644654
HelpText := Trim(HelpText, "`n")
645655

@@ -673,7 +683,7 @@ Help()
673683
Gui, Font, s10 norm
674684

675685
Gui, Help:Add, Edit, ReadOnly w250 h%totalHeight% vHelpText -VScroll +VScroll, %HelpText%
676-
Gui, Help:Add, Button, gCopyHelp w120 h30, ➡️ Clipboard
686+
Gui, Help:Add, Button, gCopyHelp w120 h30, ➡️ &Clipboard
677687
Gui, Help:Add, Button, x+10 gCloseHelp w120 h30 +Default, % CLOSE_BUTTON_CAPTION
678688
Gui, Help:Show,, AI-Hotkeys Help
679689

@@ -828,7 +838,9 @@ Perplexity()
828838

829839
AI(hotkey := "", query := "")
830840
{
831-
;MsgBox, Hotkey: %hotkey%
841+
if (Debug) {
842+
MsgBox, 64, AI-Hotkeys Debug, hotkey: %hotkey%
843+
}
832844

833845
url := URL_PERPLEXITY
834846

@@ -868,7 +880,13 @@ AI(hotkey := "", query := "")
868880
if (SUFFIX != "")
869881
prompt .= SUFFIX
870882

871-
;MsgBox, prompt: %prompt%
883+
if (Debug) {
884+
SetTimer, ChangeButtonNames, 50
885+
MsgBox, 68, AI-Hotkeys Debug, prompt: %prompt%
886+
SetTimer, ChangeButtonNames, Off
887+
IfMsgBox, Yes
888+
Clipboard := prompt
889+
}
872890

873891
url .= "search?"
874892

@@ -881,10 +899,18 @@ AI(hotkey := "", query := "")
881899
url .= "q=" . UrlEncode(prompt)
882900
}
883901

884-
;MsgBox, url: %url%
902+
if (Debug) {
903+
SetTimer, ChangeButtonNames, 50
904+
MsgBox, 68, AI-Hotkeys Debug, url: %url%
905+
SetTimer, ChangeButtonNames, Off
906+
IfMsgBox, Yes
907+
Clipboard := url
908+
}
885909

886910
if (StrLen(url) > 16384) {
887-
;MsgBox, 48, 414 Request-URI Too Large, % StrLen(url) . " > 16384"
911+
if (Debug) {
912+
MsgBox, 48, 414 Request-URI Too Large, % StrLen(url) . " > 16384"
913+
}
888914

889915
Perplexity()
890916
ClipboardOld := ClipboardAll
@@ -927,7 +953,13 @@ Search(Engine)
927953
else
928954
url := %searchUrl% . searchTerm
929955

930-
;MsgBox, url: %url%
956+
if (Debug) {
957+
SetTimer, ChangeButtonNames, 50
958+
MsgBox, 68, AI-Hotkeys Debug, url: %url%
959+
SetTimer, ChangeButtonNames, Off
960+
IfMsgBox, Yes
961+
Clipboard := url
962+
}
931963

932964
Run, % url
933965
}
@@ -1319,3 +1351,12 @@ return
13191351
#IfWinActive
13201352

13211353
#If
1354+
1355+
; Debug
1356+
ChangeButtonNames:
1357+
IfWinNotExist, AI-Hotkeys Debug
1358+
return
1359+
WinActivate
1360+
ControlSetText, Button1, ➡️ &Clipboard
1361+
ControlSetText, Button2, &OK
1362+
return

AI-Hotkeys.ini

1.27 KB
Binary file not shown.

0 commit comments

Comments
 (0)