In John 11:42 it says God always hears you, but in the verse you showed me in "Should we pray for Satan's salvation?" it says that God said that if people were to pray for the extreme idolaters than He would not hear their cries out to him?
"Then they took away the stone from the place where the dead man was lying. And Jesus lifted up His eyes and said, "Father, I thank You that You have heard Me. And I know that You always hear Me, but because of the people who are standing by I said this, that they may believe that You sent Me. Now when He had said these things, He cried with a loud voice, "Lazarus, come forth!"" (John 11:41-43).
This is a good illustration of needing to understand verses in their context. Jesus is praying to God. He thanks God for listening to him. Then he mentions that he is not saying this because sometimes God doesn't listen to His Son, but rather Jesus mentions this for the benefit of those listening to his prayer. He wants the people around to know that God always listens to His Son. Since God only listens to the righteous, the implication is that Jesus doesn't sin. Whatever he asks of God is always in accordance to God's will.
This isn't like you and me. There are times that we sin and God isn't going to listen to us. There are times when we want something that is wrong, and God won't listen to us then. But Jesus told his disciples (and us) "If you ask anything in My name, I will do it" (John 14:14). The promise is qualified. If we ask with Jesus' approval, Jesus will answer that prayer.
You said that Jesus said "If you ask anything in my name I will do it," but then what if someone was just to ask for something ridiculous in Jesus' name?
"In his name" means with his authority or approval. When a person goes down to the bank with a check, the person who gave the check signed his name. It means the holder can withdraw the amount designated on the check with the approval of the signer. Therefore, to ask something ridiculous would not be answered because it would not be with Jesus' approval. "You ask and do not receive, because you ask amiss, that you may spend it on your pleasures" (James 4:3).