I'm not sure about 10.4, but in 10.3.x one of the updates fixed this problem. Anyway you can configure a Location in the Apple menu to log onto your own access point. Scroll down and create a new Location - call it Home (or the same as your SSID of choice). Then open the Network Preferences. Activate Airport in Show (this is in 10.3.9) and then choose Airport in the row of buttons and set By default join: A specific network and enter your Home (or whatever SSID you set your access point). Choose TCP/IP in the row of buttons and configure the IPv4 connection on your Mac - usually DHCP.
Having set the Location to your SSID, your MAC should no longer connect to the neighbours AP.
You haven't told us if you are using an Airport, but if you are using a
party access point or router, use Internet Connect to make the actual connection to you access point.
In System Preferences/Network/[Show] Airport, tell it "By default join [preferred networks]" and put YOURS at the top of the list, and/or just delete your neighbour's network. Also, click Options and tell it "Ask before joining an open network" (suspenders and a belt).
It's a confusing interface; I'll put some screenshots somewhere if you like.
You've solved my problem. Thanks for taking time to respond. That's working nicely now.
Now I'm looking into this Apple bug fix article to solve my auto connect problem for same connection: Mac OS X 10.4.8: AirPort does not auto-connect to existing networks after restart or wake from sleep
What the article get you to do is to delete all present network connections from within the Airport preferences. Then you start from scratch and configure them.
I followed all their instructions, but did not solve problem. I think their issue relates to one of the more recent protocols, something like WPA 2. So their technical support article probably does not apply to me.
What solved it in the end was lots of fumbling around. Redeleted all presets for WiFi networks, made sure to put in correct encryption setting (WEP 128 bit Hex). Then lots of testing, putting computer to sleep, waking it up, also switched off my WiFi router to see if it would pickup "foreign" networks on wake-up.
Neither does mine (still 10.3.9). I have the Airport icon on the menu bar and usually turn on Airport from there and also select my AP from there when the Mac wakes up from sleep - also, my Mac accesses the encryption key from the key chain.
Having a specific network prevents connecting to my neighbours access point, which is unencrypted.
When I switch access point, I first use Location in the Apple menu to set the AP and encryption key. For public access points, I use the Automatic Location that came with OS X.
Well, I'm using a Dlink DGL4300, using WPA2, AES encryption (set to fall back to WPA and TKIP). The Airport Extreme in my Mac Pro comes and goes flawlessly, after sleep or a reboot. I put the machine to sleep when I know I won't be using it for a while, and every night when I go to bed.
You might want to play around with the "Airport setup assistant" in your Utilities folder. I'm not really sure what it's for. It sees my router as an "airport base station" I think.
Just to clarify, my problem seems solved - all that fumbling around!
Now I see that Axel may have something similar to what I had.
Axel, if you're happy selecting your WiFi network from the list of options each time your machine wakes up, then please ignore my poorly informed suggestions. Don't forget I've only solved this problem once, so don't have clear explanation.