Send to the editbox of the status window, or send the oper command to some specific network? Assuming the latter:
Oper accounts are a delicate matter, please reconsider if it's worth automating the oper up process. Maybe you use a short custom alias instead (risks of a drive-stored password put aside), like:
alias operme { if ($network == mynetwork) oper bla pass }
If you want to automate it anyway, make sure you don't send the oper data to a "wrong" network (oper attempts are visible to ircops, and usually are logged). Thus check for $network like in the alias above, maybe add checks for $me or $server, too. In addition, you could check for "if (o !isin $usermode)" (= you don't have an oline assigned already)
Assuming there is any, you might trigger the oper command right after the nick identification routine: if you did identify successfully for your nick (you get usermode +r, and usually receive some kind of notice), check for if ($network == yournetwork), and have the oper command sent...