Scripd does not update. any version of main memory is always running Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Scripd does not update. any version of main memory is always running

18 Nov 2018, 13:23

this script
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 __/
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Scripd does not update. any version of main memory is always running

18 Nov 2018, 13:41

it sends the string "getAutoKeywords" and gets "Loop_Parse_ParseWords"?

Code: Select all

headerStr  :=  ALineNumber " , " funcName  ":`n" 
		FileAppend,% headerStr result, % fileNameResult, UTF-8
		FileAppend,% headerStr expected,% fileNameExpected, UTF-8
i am confused :wtf: :headwall:
2018-11-18 19_36_27-Table awaiting Action.jpg
2018-11-18 19_36_27-Table awaiting Action.jpg (123.39 KiB) Viewed 739 times
BTW i rebooted windows OS (was useless yes :)
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

maybe a bug with default parameter? in new version

18 Nov 2018, 14:07

maybe a bug with default parameter? in new version

Code: Select all

;            getAssertEqual_ErrorStr(ByRef in,ByRef expected,ALineNumber                 ,myFuncName := "Loop_Parse_ParseWords"){
	if(errStr := getAssertEqual_ErrorStr(      in,      expected,A_ThisFunc ":" A_LineNumber),"getAutoKeywords")
		Return errStr " °" A_ThisFunc "° "
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Scripd does not update. any version of main memory is always running

18 Nov 2018, 14:13

i found it:

if(errStr := getAssertEqual_ErrorStr(in,expected,A_ThisFunc ":" A_LineNumber),"getAutoKeywords")

you see it? the ) ?

correct is:

if(errStr := getAssertEqual_ErrorStr(in,expected,A_ThisFunc ":" A_LineNumber,"getAutoKeywords")
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Scripd does not update. any version of main memory is always running  Topic is solved

18 Nov 2018, 14:16

wrong:

if(errStr := getAssertEqual_ErrorStr(in,expected,A_ThisFunc ":" A_LineNumber),"getAutoKeywords")

correct:

if(errStr := getAssertEqual_ErrorStr(in,expected,A_ThisFunc ":" A_LineNumber,"getAutoKeywords"))

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, gsxr1300, inseption86, jaka1 and 275 guests