Example: Write email in Google Chrome with g_IntelliSense

Post your working scripts, libraries and tools
User avatar
SL5
Posts: 495
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Example: Write email in Google Chrome with g_IntelliSense

16 Feb 2018, 09:34

Example use case: Write email in Google Chrome.
I'm on an unnamed tab in Chrome.
The invisible script will look for the file New_Tab_Google_Chrome.txt in the folder "ChromeWidgetWin1" and will not find it. And therefore does not do anything.

I switch to the Gmail website (still Chrome browser).

Of course, the program immediately searches again in the folder "ChromeWidgetWin1" but now a file called "Inbox.txt" or something like that.

That depends on how the website is called exactly.

But I forgot that before a filter is effective (wordlistNameFilter.inc.ahk).

ChromeWidgetWin1 / wordlistNameFilter.inc.ahk says:

Code: Select all

if (  RegExMatch( activeTitle , "\b(Gmail|Google Contacts - Google Chrome)\b") )
      wordlistNEW := "Gmail_Google_Chrome"
The script now searches in the folder "ChromeWidgetWin1" now the file "Gmail_Google_Chrome.txt".

There in "Gmail_Google_Chrome.txt" you will find:

Code: Select all

have a great day!
Thanks again, and have a great day!

; now first letter uppercase and name (first word) from clipboard:
Hallo friend clipboard EMAIL|rr||ahk|c1 := RegExReplace( substr(clipboard,1,99) , "^.*?(\w+\s+\w+|\w+).*", "$1") `n c := RegExReplace(c1, "^.*?(\w)(\w+).*", "$u1$l2") `n Send,%c1%,`n Sleep 500`n Send, {space 2}{tab}Neuigkeiten{Tab}^{home}`n #incDynAhk\sendDayTimeHello.ahk `n #include,..\Wordlists\ChromeWidgetWin1\incDynAhk\sendFreundBody.ahk
I type "Ha" and already "hello friend clipboard EMAIL" is suggested (and "have a great day!").
By pressing the appropriate number key (perhaps key 1), the script executes this AHK code:

Code: Select all

c1 := RegExReplace( substr(clipboard,1,99) , "^.*?(\w+\s+\w+|\w+).*", "$1") `n c := RegExReplace(c1, "^.*?(\w)(\w+).*", "$u1$l2") `n Send,%c1%,`n Sleep 500`n Send, {space 2}{tab}Neuigkeiten{Tab}^{home}`n #incDynAhk\sendDayTimeHello.ahk `n #include,..\Wordlists\ChromeWidgetWin1\incDynAhk\sendFreundBody.ahk
If only "ha" had started to write but the entry "have a great day!" suspended (maybe key 2) then the script would have written:
have a great day!

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 34 guests