mooredj Posted June 5, 2008 Share Posted June 5, 2008 I'm sure this is a stupid question--but I spent the entire day yesterday trying to figure out how to close Textpad and Notepad from this script. According to AUtoIT v3 Windows Info the controlID is 59548 for TextPad - [Document1]. For Notepad ControlID is 15. I do see when running the command "!F" appears to quickly popping up the ALT F menu, but it will never execute the "X" to close the program. I can manually do ALT F, and then X and all closes ok.. Why won't these script work? ControlSend("TextPad - [Document1]", "", "[iD:59648]", "!FX") Same problem with Notepad example. ControlSend("Untitled - Notepad", "", "15", "!FX") Thanks in advance! Link to comment Share on other sites More sharing options...
sandin Posted June 5, 2008 Share Posted June 5, 2008 If you wanna close a notepad (textpad), why not using simple WinClose() command? Opt("WinTitleMatchMode", 2) Run("notepad.exe") WinWaitActive("- Notepad") MsgBox(0, "", "Click OK to terminate notepad") WinClose("- Notepad") Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now