I'm working on a script for work and am in the process of getting AHK to zip a bunch of folders together. My plan will be something like this:
run explorer.exe winWaitActive Libraries controlFocus Edit1, Libraries sleep 50 send %filePath% sleep 50 send {Enter} sleep 50 send {Home} sleep 50 send +{End} sleep 50 send {Up} sleep 50 send {Appskey} sleep 50 while ([[buttonText]] != WinZip) { Send {Down} Sleep 100 } send {Enter} Sleep 50 Send {Down 2} sleep 50 Send {Enter}
The bit marked with two brackets is the bit that I'm not sure exists, or how to get working. I've already coded a workaround not using the Context Menu but it needs to run WinZip and function with that program. That program is full of pop-ups at launch that may or may not exist on each computer, and some of those pop-ups have the same title as WinZip itself, so I'm worried to run an ifWinExist script on those.
A reason I don't just want to input the exact number of {Down}s is because my computer has a different context menu than other computers, and being a big office, each computer is different. I want the script to check each button going down the list until it finds the WinZip button. I could even do fancy stuff and bring up an error box if it finds that WinZip isn't in the context menu/installed.
Is there anything I can use to read the text of the buttons in the basic Explorer context menu? Thanks