tools
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tools [2025/08/18 17:58] – created admin | tools [2025/10/17 16:55] (current) – admin | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== Cite Linker Pro Chrome Extension ===== | ===== Cite Linker Pro Chrome Extension ===== | ||
| {{ : | {{ : | ||
| + | This Chrome browser extension can scan a page for legal citations and provide links to internet sources for that content. | ||
| + | |||
| + | ===== AI Editing prompt ===== | ||
| + | You are an experienced appellate attorney working for a state supreme court. You are careful and precise in your writing. Proofread the following text and propose edits to improve it. Focus on grammar, clarity, conciseness, | ||
| + | [paste draft text here] | ||
| + | |||
| + | ===== Autohotkey v2 macro ===== | ||
| + | |||
| + | <file ahk ai-hotkeys.ahk> | ||
| + | AI_PROOFREADING_PROMPT := "You are an experienced appellate attorney working for a state supreme court. You are careful and precise in your writing. Proofread the following text and propose edits to improve it. Focus on grammar, clarity, conciseness, | ||
| + | |||
| + | ;; ========================================================================== | ||
| + | ;; CLAUDE AI INTEGRATION MODULE | ||
| + | ;; ========================================================================== | ||
| + | ^#!c:: ; Ctrl+Win+Alt+C - Send selected text to Claude for proofreading | ||
| + | { | ||
| + | ; Save current clipboard content | ||
| + | ClipSaved := ClipboardAll() | ||
| + | | ||
| + | ; Clear the clipboard | ||
| + | A_Clipboard := "" | ||
| + | | ||
| + | ; Send Ctrl+C to copy the selected text | ||
| + | Send " | ||
| + | | ||
| + | ; Wait for the clipboard to contain text with a longer timeout | ||
| + | if !ClipWait(2) { | ||
| + | MsgBox "No text was selected!" | ||
| + | ; Restore original clipboard | ||
| + | A_Clipboard := ClipSaved | ||
| + | return | ||
| + | } | ||
| + | | ||
| + | ; Get the selected text from clipboard | ||
| + | selectedText := A_Clipboard | ||
| + | | ||
| + | ; Prepare the prompt for Claude using global definition | ||
| + | promptText := AI_PROOFREADING_PROMPT . selectedText | ||
| + | | ||
| + | ; Save current mouse position | ||
| + | MouseGetPos &xpos, &ypos | ||
| + | | ||
| + | ; Check if Claude is already open in a browser tab | ||
| + | claudeFound := false | ||
| + | | ||
| + | ; Try to find Claude tab in common browsers | ||
| + | for browserClass in [" | ||
| + | { | ||
| + | if WinExist(" | ||
| + | { | ||
| + | ; Activate the browser window | ||
| + | WinActivate | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Try to find Claude tab by checking window titles | ||
| + | windowList := WinGetList(" | ||
| + | for window in windowList | ||
| + | { | ||
| + | title := WinGetTitle(" | ||
| + | if InStr(title, | ||
| + | { | ||
| + | WinActivate(" | ||
| + | claudeFound := true | ||
| + | Sleep 1000 | ||
| + | break | ||
| + | } | ||
| + | } | ||
| + | | ||
| + | if claudeFound | ||
| + | break | ||
| + | } | ||
| + | } | ||
| + | | ||
| + | ; If no Claude tab found, open a new one | ||
| + | if !claudeFound | ||
| + | { | ||
| + | Run " | ||
| + | | ||
| + | ; Wait longer for the page to load - especially important on slower connections | ||
| + | Sleep 3000 | ||
| + | | ||
| + | ; Wait for any browser window to become active | ||
| + | try { | ||
| + | WinWait " | ||
| + | } | ||
| + | catch { | ||
| + | MsgBox " | ||
| + | A_Clipboard := ClipSaved | ||
| + | return | ||
| + | } | ||
| + | | ||
| + | ; Make sure the window is active | ||
| + | WinActivate " | ||
| + | Sleep 1000 | ||
| + | } | ||
| + | | ||
| + | ; Set clipboard to the prompt text | ||
| + | A_Clipboard := promptText | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Try to focus the input field using Tab then Shift+Tab | ||
| + | ; This works better in Vivaldi and other browsers for Claude' | ||
| + | Sleep 1000 ; Wait a bit for the page to finish rendering | ||
| + | Send " | ||
| + | Sleep 300 | ||
| + | Send " | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Now try to paste | ||
| + | Send " | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Press Enter to send the message | ||
| + | Send " | ||
| + | | ||
| + | ; Restore original clipboard after a delay | ||
| + | Sleep 1000 | ||
| + | A_Clipboard := ClipSaved | ||
| + | | ||
| + | ; Restore original mouse position | ||
| + | MouseMove xpos, ypos | ||
| + | | ||
| + | ; Show notification | ||
| + | ToolTip "Text sent to Claude for proofreading!" | ||
| + | SetTimer () => ToolTip(), -2000 ; Hide tooltip after 2 seconds | ||
| + | } | ||
| + | |||
| + | ;; ========================================================================== | ||
| + | ;; GOOGLE GEMINI INTEGRATION MODULE | ||
| + | ;; ========================================================================== | ||
| + | ^#!g:: ; Ctrl+Win+Alt+G - Send selected text to Google Gemini for proofreading | ||
| + | { | ||
| + | ; Save current clipboard content | ||
| + | ClipSaved := ClipboardAll() | ||
| + | | ||
| + | ; Clear the clipboard | ||
| + | A_Clipboard := "" | ||
| + | | ||
| + | ; Send Ctrl+C to copy the selected text | ||
| + | Send " | ||
| + | | ||
| + | ; Wait for the clipboard to contain text with a longer timeout | ||
| + | if !ClipWait(2) { | ||
| + | MsgBox "No text was selected!" | ||
| + | ; Restore original clipboard | ||
| + | A_Clipboard := ClipSaved | ||
| + | return | ||
| + | } | ||
| + | | ||
| + | ; Get the selected text from clipboard | ||
| + | selectedText := A_Clipboard | ||
| + | | ||
| + | ; Prepare the prompt for Gemini using global definition (same as Claude for consistency) | ||
| + | promptText := AI_PROOFREADING_PROMPT . selectedText | ||
| + | | ||
| + | ; Save current mouse position | ||
| + | MouseGetPos &xpos, &ypos | ||
| + | | ||
| + | ; Check if Gemini is already open in a browser tab | ||
| + | geminiFound := false | ||
| + | debugInfo := " | ||
| + | | ||
| + | ; Try to find Gemini tab in common browsers | ||
| + | for browserClass in [" | ||
| + | { | ||
| + | if WinExist(" | ||
| + | { | ||
| + | debugInfo .= "Found browser class: " . browserClass . " | ||
| + | ; Activate the browser window | ||
| + | WinActivate | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Try to find Gemini tab by checking window titles | ||
| + | windowList := WinGetList(" | ||
| + | debugInfo .= "Found " . windowList.Length . " windows for this browser`n" | ||
| + | | ||
| + | for window in windowList | ||
| + | { | ||
| + | title := WinGetTitle(" | ||
| + | debugInfo .= " | ||
| + | | ||
| + | ; More comprehensive Gemini detection | ||
| + | if InStr(title, | ||
| + | { | ||
| + | WinActivate(" | ||
| + | geminiFound := true | ||
| + | debugInfo .= "Found existing Gemini tab!`n" | ||
| + | Sleep 1000 | ||
| + | break | ||
| + | } | ||
| + | } | ||
| + | | ||
| + | if geminiFound | ||
| + | break | ||
| + | } | ||
| + | } | ||
| + | | ||
| + | ; Show debug info with temporary tooltip | ||
| + | if !geminiFound { | ||
| + | ToolTip debugInfo | ||
| + | SetTimer () => ToolTip(), -5000 ; 5 second display | ||
| + | } | ||
| + | | ||
| + | ; If no Gemini tab found, open a new one | ||
| + | if !geminiFound | ||
| + | { | ||
| + | ToolTip "No existing Gemini tab found. Opening new tab..." | ||
| + | SetTimer () => ToolTip(), -2000 | ||
| + | | ||
| + | Run " | ||
| + | | ||
| + | ; Wait longer for the page to load | ||
| + | Sleep 4000 ; Increased wait time | ||
| + | | ||
| + | ; Wait for any browser window to become active | ||
| + | try { | ||
| + | WinWait " | ||
| + | } | ||
| + | catch { | ||
| + | MsgBox " | ||
| + | A_Clipboard := ClipSaved | ||
| + | return | ||
| + | } | ||
| + | | ||
| + | ; Make sure the window is active | ||
| + | WinActivate " | ||
| + | Sleep 1000 | ||
| + | } | ||
| + | | ||
| + | ; Set clipboard to the prompt text | ||
| + | A_Clipboard := promptText | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Focus the input field for Gemini using Ctrl+F search method | ||
| + | Sleep 2000 ; Wait for page to finish rendering | ||
| + | | ||
| + | ; Use Ctrl+F to search for " | ||
| + | Send " | ||
| + | Sleep 300 | ||
| + | Send " | ||
| + | Sleep 300 | ||
| + | Send " | ||
| + | Sleep 500 | ||
| + | Send " | ||
| + | Sleep 300 | ||
| + | | ||
| + | ; Navigate backwards twice to reach the input field | ||
| + | Send " | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Paste the prompt text | ||
| + | A_Clipboard := promptText | ||
| + | Sleep 200 | ||
| + | Send " | ||
| + | Sleep 500 | ||
| + | | ||
| + | Sleep 500 | ||
| + | | ||
| + | ; Try to send the message | ||
| + | ; Gemini typically uses Enter, but let's try both | ||
| + | Send " | ||
| + | Sleep 1000 | ||
| + | | ||
| + | ; If Enter didn't work, try Ctrl+Enter | ||
| + | Send " | ||
| + | | ||
| + | ; Restore original clipboard after a delay | ||
| + | Sleep 1000 | ||
| + | A_Clipboard := ClipSaved | ||
| + | | ||
| + | ; Restore original mouse position | ||
| + | MouseMove xpos, ypos | ||
| + | | ||
| + | ; Show notification | ||
| + | ToolTip "Text sent to Google Gemini for proofreading!" | ||
| + | SetTimer () => ToolTip(), -2000 ; Hide tooltip after 2 seconds | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | </ | ||
tools.1755539918.txt.gz · Last modified: by admin
