The problem with barking, as I think has been mentioned before, is that it is a very self-rewarding behavior. Barking makes the thing go away every time (or at least she thinks it's the barking that makes it go away), and dogs basically just like to hear themselves talk. This is why every time she barks at the window, whether you are home or not, she is getting rewarded; and this is why it's so important to take away her access to the window while you cannot supervise and do training sessions around it.
Is that going to teach her anything different than giving her a command while she barks? I'm afraid she'll still bark at me/at nothing outside, wanting me to click.
Yes. Giving her a command while she barks does work in some situations, but often it actually rewards the behavior. It takes away all of her responsibility in this situation - she doesn't really have to think about not barking, she just has to listen to you when you give her a cue.
It all basically works under the Premack Principle - a high-probability (easy) behavior rewards a low-probability (difficult) behavior. Example: If I put a bowl of food down, there is a high probablity that my dog is going to go to the food bowl and eat. So I am going to ask my dog to do a more difficult behavior - like a sit stay - and if he performs that behavior, I will cue him to go to the bowl and eat. The "go eat" cue is the reward for the sit stay.
In your case, if the behaviors you are asking for when the dog is barking are relatively easy (or highly rewarded), they are going to be high-probability behaviors. So, he barks at the window, and you ask him to do a sit, then he gets a treat. The "sit" cue is the reward for the barking, and the treat is the reward for the sit.
Backchaining to teach a series of behaviors also works off of the Premack Principle, so if you are familiar with backchaining maybe that will help you understand what I am trying to explain (and which I'm sure I'm not explaining well, sorry).
What I am suggesting instead, is to click (and of course, treat) her when you think she's about to bark, but just before she actually does bark. There are usually several body cues that signal that she's about to bark, such as (obviously) looking out the window, tensing up, pricking ears, growling (yes, click growling!), huffing (like a "silent" bark, yes, click that too!), charging the window, etc. It doesn't matter what she's doing, as long as she's not barking you can click. Eventually she'll figure out that just looking out the window will get her a click, and she will be able to look out and stay relaxed (because she's waiting for her treat). THAT'S GOOD! Then let her look out the window, and don't click; she'll probably look to you as if to say, "Didn't you see me look? Where's my treat??" You can click her looking at you, or you can ignore the look back and wait until she looks out the window a second time before you click.