要兩個 If FindGame("MapleStory.exe") = True Then(第一個 IF)
If hProcess <> 0 Then (第二個IF)
所以你後面要打 END IF
END IF
(2次)
於是 我用了
Private Sub Command1_Click()
If FindGame("MapleStory.exe") = True Then End If
Call InitAutoAsm(dwProcId)
GetWindowThreadProcessId hwd, pid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If hProcess <> 0 Then End If
MsgBox "偵測成功", , "系統訊息"
Else
MsgBox "偵測失敗", , "系統訊息"
End If
End Sub
修改成這樣
可是還是錯誤
他說
Private Sub Form_Load()
編輯錯誤
沒有定義的Sub 或 Function
If FindGame("MapleStory.exe") = True Then
Call InitAutoAsm(dwProcId)
GetWindowThreadProcessId hwd, pid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If hProcess <> 0 Then
MsgBox "偵測成功", , "系統訊息"
Else
MsgBox "偵測失敗", , "系統訊息"
End If
End If
End Sub