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 find it very weird:
if I run like this:
Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, '0xFF455E')
If I run like this:
Local $metaColor1 = '0xFF455E' or like this Local $metaColor1 = "0xFF455E" or Local $metaColor1 = "'0xFF455E'"
Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, $color)
it doesn't want to work! So something with variable is not working and yes if I print it out like this:
ConsoleWrite(@LF & $posX & ":"& $posY & ":"& $sizeX & ":" & $sizeY & ":" & $color&@LF)
So I dont see the problem, maybe some of you people?
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 need help about pixel search. The problem with the script below is that PixelSearch does not continue on the coordinates where it has stopped.
When the first pixelsearch finds the 1st pixel, it should move the mouse over it and new pixels would appear just like hovering over menus. Then upon hover, there would be another PixelSearch to see if the second red pixel is found. If not found, then it should resume the first PixelSearch instead of starting from left to right again.
For example we are doing a pixelsearch on two straight lines with coordinates [x,y] :
[0,0] [1,0] [2,0]
[1,0] [1,1] [1,2]
Pixelsearch finds the coordinate [1,0] matching our color. So it checks the pixel just below it which is [1,1] to see if it is color red. If not red then it should continue searching starting on coordinates [2,0] instead of going back to [0,0]
Local $bflag = False Do ToolTip("finding..",0,0,"") Sleep(500) $var = PixelSearch(591, 169, 1365, 740, 0x464950,50) ; look for initial pixel If Not @error Then ; MouseMove($var,$var,0) ;move on the button to show new selections, new pixels sleep(1000) ;search for the red pixel on an area above the first pixel coords which was ;generated when mouse cursor was hovered on the first pixel found. $redpixel = PixelSearch($var-50,$var-50,$var+50,$var+50,0xFF0048) If Not @error Then ; Found the 2nd pixel ToolTip("found...",0,0,"") $bflag = True EndIf EndIf Until $bflag I can pay 50USD through Paypal for a working solution. thanks
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.