I am asking for hammer-on (H) & slide-up (\) (not pull-off)
Sorry, i was on phone and did not read it well enough.
They do sound similar but they are not the same. However, there are no rules when you should favour one over the other. But there are factors when it is necessary to use the one over the other. If the next note you are going to play is too far away for your finger to reach, you should use a slide otherwise you can use a simple hammer on. But this is just a general example. Other factors could be the pattern of the scale. If you are playing any scale in a caged fashion, using hammer ons make sense since all the notes are easily reachable. However, if you are using the horizontal pattern or a 3-notes-per-string pattern, which could extend all over the neck, it is impossible to reach the next notes which could be very far apart. In such a case, it is more appropriate to use a slide.
Then again, there are no rules and you can just use which ever suits your artistic style.
Similarly, you can use bends as an alternative to hammer ons or slides.
PS: Note that Hammer ons, slides and bends have different attacks and you could use discretion while using them.