I've been developing a artificial intelligence.
My first hard task was letting the A.I know when a sentence is found in memory with different words
What i tried to do here is simply, get all the words in user sentence that could be used
as a identifier
example: Steve Jobs
then identify the sentence purpose with the words we found in the past "for" loop
Compare the example in the following matching sentences in memory.
1-Steve jobs was a known person
2-Do you know who barack obama is?
3-Do you know Steve jobs?
4-Do you know who steve jobs is?
5-How much money steve jobs had
Then find the sentence that has way more matches than the other ones, remember that if the identifier words were not found
(Steve jobs) then the sentence is invalid.
Every sentence has a different answer and is important that the right one is chosen.
If there's no more than the half of words in matches, then assign a variable the result of function, such as a return but for a global var.
I couldn't figure out how to do that with StringRegExp.
I honestly need help with detecting identifiers on memory sentences.
I would also like to let the AI know typos, meaning that moeny and money means the same thing.
Any help is hugely appreciated.
I'm trying to get a "double" value from memory . However my code gives me error.
Opt("WinTitleMatchMode", 4) Global $ProcessID = WinGetProcess("TI Pro") If $ProcessID = -1 Then MsgBox(4096, "ERROR", "Failed to detect process.") Exit EndIf Local $DllInformation = _MemoryOpen($ProcessID) If @Error Then MsgBox(4096, "ERROR", "Failed to open memory.") Exit EndIf Local $dAddress = 0x1FECD474 Local $tNbSteps = DllStructCreate("double", $dAddress) Local $value = DllStructSetData($tNbSteps, 1, (_MemoryRead($dAddress, $DllInformation))) MsgBox($MB_SYSTEMMODAL, $value)
I'm trying to read value of a base pointer + offset.
With only address I can easily the value but with base addres (pointer) I really don't know how I can do that.
Looking for working code to get full path of process - both 32 & 64 bit.
I tryed this bellow, but it works only for 32-bit processes, even if compiled for x64...
Thanx for suggestions!
Func _ProcessGetPath($vProcess) ;get the program path done by MrCreatoR Local $iPID = ProcessExists($vProcess) If NOT $iPID Then Return SetError(1, 0, -1) Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID) If NOT IsArray($aProc) OR NOT $aProc Then Return SetError(2, 0, -1) Local $vStruct = DllStructCreate('int') Local $hPsapi_Dll = DllOpen('Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@SystemDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@WindowsDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then Return SetError(3, 0, '') DllCall($hPsapi_Dll, 'int', 'EnumProcessModules', _ 'hwnd', $aProc, _ 'ptr', DllStructGetPtr($vStruct), _ 'int', DllStructGetSize($vStruct), _ 'int_ptr', 0) Local $aRet = DllCall($hPsapi_Dll, 'int', 'GetModuleFileNameEx', _ 'hwnd', $aProc, _ 'int', DllStructGetData($vStruct, 1), _ 'str', '', _ 'int', 2048) DllClose($hPsapi_Dll) If NOT IsArray($aRet) OR StringLen($aRet) = 0 Then Return SetError(4, 0, '') Return $aRet EndFunc
Hi, I have a problem, my functions do not work with each other. Separately, each works very well. Features that do not work together it's loot() and pos1(). It looks that after spreadsheet function loot() script stops working even though everything is in the While 1-Wend loop. Can someone help me please?