This is a prophecy. When this was spoken, Jesus had not yet died, so He had not yet been resurrected and glorified. Thus, the Spirit was not yet given either. He shows another condition (in addition to the ones in John 7:37-39) for the giving of the Holy Spirit: "Keep My commandments."
Notice that the Spirit is described as being with and in. This clarifies the matter of coming to Christ. We have to be called and to respond. If we fail to do the latter, even though God's Spirit is "with" us—leading us to Christ—it will never be "in" us unless we respond and meet the conditions.
For the disciples at the time, the Spirit was with them—in Christ, teaching and guiding. However, a time was coming when it would be in them, literally. This did not occur until Pentecost, in Acts 2. So it is with us: The Spirit is with us before conversion, and it is by this means that God brings us to Christ.
If God did not do this miraculous work, the enmity against Him (Romans 8:7)—coupled with our spiritual confusion—would never permit the process of conversion even to start. Our calling is a tremendous act of mercy on God's part; it is a miracle that we even respond. If it were not for that—for God's mercy in choosing us to be called—we would never make it off the starting block. God has to work a tremendous miracle even to get us to be willing to come to Christ and begin to learn.