U guys are all wrong.
Yes u r right about the part that proc comes from successful autos only.
BUT....
5% proc does not mean that if u do 100 successful autos u will for sure get 5 procs.
5% proc means that every successful auto has 5% chance to trigger proc.
That is a very different thing.
Whether u say that theres 5% chance ur auto will proc or u say out of 100 hits ur likely to get 5 procs is the same, its simply using average for easier math. U can proc 5 times per 20 hits, but the chances are u will only proc it once.
Anyway, yes, attack affects the chances ur autos will land, and its 5% proc for every auto that lands, not one that misses. Thats why attack is even more superior for rangers and rogues.