GUI ListBox Example

I use a similar set of scripts to autologin to my vSphere Client for multiple servers. I make Windows launch onLogin.ahk during startup so it’s always running in the background. Both scripts need to reside in the same directory.

**onLogin.ahk** monitors the list open windows for the vSphere Client login prompt. When it finds the prompt it then starts the vmMenu.ahk script and waits for it to close before starting to monitor again.

**vmMenu.ahk** displays a listbox populated with a list of servers and IP addresses. Once an entry is double-clicked it will then fill in the username, password, and IP address. Then it’ll trigger the Login button before finishing the script. The script will wait for the login prompt to disappear before closing.