=sinister= Posted April 12, 2008 Posted April 12, 2008 (edited) --Taken Down-- Edited April 12, 2008 by =sinister=
qazwsx Posted April 12, 2008 Posted April 12, 2008 can you be a little more specific. Define not working. Do you know what line it is erroring on? Is there even an error?
=sinister= Posted April 12, 2008 Author Posted April 12, 2008 Lets say $i = 23. If I run the function, it returns "Bar2|3", after I try running the function again, it won't return anything.
Moderators SmOke_N Posted April 12, 2008 Moderators Posted April 12, 2008 (edited) Lets say $i = 23. If I run the function, it returns "Bar2|3", after I try running the function again, it won't return anything. expandcollapse popupFunc CheckKey($Key) Local $PID = ProcessList($PathCheck) If ProcessExists($PathCheck) Then Local $DllInformation = _MemoryOpen($PID[1][1]) Else Return -1 EndIf Local $Read Local $Number = 0 $Bar = "" $GetKey = StringSplit($Key, ",") For $i = 1 To 72 $Read = _MemoryRead($Address, $DllInformation, 'dword') If @Error Then Return -1 ElseIf $GetKey[0] >= 1 Then Do $Number = $Number + 1 If $Read = $GetKey[$Number] Then $GetBar = StringSplit($i, "") If $GetBar[0] = 2 Then ;Iregulars If $i = 11 Then $Bar = "Bar" & $GetBar[1] & "|" & "-" Return 1 ElseIf $i = 12 Then $Bar = "Bar" & $GetBar[1] & "|" & "=" Return 1 ElseIf $i = 22 Then $Bar = "Bar" & $GetBar[1] & "|" & 0 Return 1 ElseIf $i = 23 Then $Bar = "Bar" & $GetBar[1] & "|" & "-" Return 1 ElseIf $i = 24 Then $Bar = "Bar" & $GetBar[1] & "|" & "=" Return 1 ElseIf $i = 34 Then $Bar = "Bar" & $GetBar[1] & "|" & 0 Return 1 ElseIf $i = 35 Then $Bar = "Bar" & $GetBar[1] & "|" & "-" Return 1 ElseIf $i = 36 Then $Bar = "Bar" & $GetBar[1] & "|" & "=" Return 1 ElseIf $i = 46 Then $Bar = "Bar" & $GetBar[1] & "|" & 0 Return 1 ElseIf $i = 47 Then $Bar = "Bar" & $GetBar[1] & "|" & "-" Return 1 ElseIf $i = 48 Then $Bar = "Bar" & $GetBar[1] & "|" & "=" Return 1 ElseIf $i = 58 Then $Bar = "Bar" & $GetBar[1] & "|" & 0 Return 1 ElseIf $i = 59 Then $Bar = "Bar" & $GetBar[1] & "|" & "-" Return 1 ElseIf $i = 60 Then $Bar = "Bar" & $GetBar[1] & "|" & "=" Return 1 ElseIf $i = 70 Then $Bar = "Bar" & $GetBar[1] & "|" & 0 Return 1 ElseIf $i = 71 Then $Bar = "Bar" & $GetBar[1] & "|" & "-" Return 1 ElseIf $i = 72 Then $Bar = "Bar" & $GetBar[1] & "" & "=" Return 1 Else $Bar = "Bar" & $GetBar[1] & "|" & $GetBar[2] Return 1 EndIf EndIf EndIf Until $Number = $GetKey[0] $Number = 0 EndIf $Address = "0x" & Hex(Execute($Address) + 4, 6) Next _MemoryClose($DllInformation) EndFunc ;==>CheckKeyWithout some example that some could (or would even) run, there's no way to tell you what your issue is. Logic would dictate that either: If $Read = $GetKey[$Number] Then is never true on a second pass... or $i never equals any of the condition statements you have there. Edited April 12, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
=sinister= Posted April 12, 2008 Author Posted April 12, 2008 Logic dictates that I am stupid and forgot to restate at the beginning of the function what address to read from. At the bottom it was adding 4 to the address, but it never restates it so it will always add 4. =P
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now