Flying Dagger Trick (3.5e Maneuver)

You pin your opponent to the wall with your knife.

Make a ranged attack. In addition to normal damage, you may make a combat maneuver (such as bull rush, disarm, feint, grapple, sunder, or trip) and you may use your Dexterity in place of your Strength for the purpose of these checks. Ammunition counts as a light weapon for the purpose of combat maneuvers.

For checks which must be maintained (such as grapple or pinned) you make one check, which remains the check for all subsequent checks. For grappling and pinning specifically, the target must be next to a wall (or the floor if already prone) or similar sufficiently large object for them to be pinned or grappled to.