https://gist.github.com/sl5net/823d3813 ... ccac37cc9a
reads the results from getAutoKeywords (its includet) and is reloading every seconds..
both are in the same directory work different files.
Meanwhile, this has a lot of message boxes that are not displayed
Code: Select all
;/¯¯¯¯ getAutoKeywords ¯¯ 181106121229 ¯¯ 06.11.2018 12:12:29 ¯¯\
getAutoKeywords(ByRef newKeyWords
, addKeysMAX := 4 , minLength := 4, doFirstWord := true
, elseIfResulsEmpty := "without keywords"
, regEx := "\b((\w+?(?=[A-Z]|\b))([A-Z][a-z]*)?)([A-Z][a-z]*)?"){
; AddWord rootDoObj.createKeys https://g-intellisense.myjetbrains.com/youtrack/issues?q=project:%20g-IntelliSense#issueId=GIS-65
; https://github.com/sl5net/global-IntelliSense-everywhere/blob/master/Source/Includes/ActionList.ahk#L1438
; https://stackoverflow.com/questions/53345266/generate-search-words-from-text-with-camelcase-by-using-regex
newKeyWords := oldKeywords
MsgBox,% ">" resultStr "< `n`n(" A_ThisFunc ":" A_LineNumber " " RegExReplace(A_LineFile, ".*\\") ")"
resultStr := ""
if(doFirstWord){
firstWord := RegExMatch(newKeyWords,"^\s*(\w+)",m) ? m1 : ""
if(firstWord)
resultStr := firstWord " "
}
StartingPosition := 2
addedKeysCounter := 0
Array := [] ; or Array := Array()
while(foundPos := RegexMatch( newKeyWords, "(" regEx ")", Match, StartingPosition )){
; StartingPosition := Match.Pos(1) + Match.Len(1)
StartingPosition += strlen(Match1)
if(addedKeysCounter >= addKeysMAX)
break
loop,3
{
word := Match%A_Index%
; MsgBox,% ">" word "< (" A_ThisFunc ":" A_LineNumber " " RegExReplace(A_LineFile, ".*\\") ")"
if(!HasVal(Array,word)){
if(!firstWord){
firstWord := word
resultStr .= firstWord " "
}
if(strlen(word) >= minLength ){
Array.Push(word) ; Append this line to the array.
ArrayCount++
resultStr .= word " "
}
}
}
}
resultStr := Trim(resultStr)
if(!resultStr)
resultStr := elseIfResulsEmpty ; "without keywords"
MsgBox,% ">" resultStr "< `n`n(" A_ThisFunc ":" A_LineNumber " " RegExReplace(A_LineFile, ".*\\") ")"
return resultStr
}
;\____ getAutoKeywords __ 181106121233 __ 06.11.2018 12:12:33 __/