El3ctroded Posted April 6, 2011 Share Posted April 6, 2011 So I am starting with AutoIt. I downloaded and installed the latest, and started doing the tutorials. However, the notepad one is not completely working. It does open notepad and insert the text, and sends the close command. The do you want to save pops up, and then nothing else happens. Using the AutoItSetOption ("TrayIconDebug", 1); shows that it is at this line of the tutorial: WinWaitActive("Notepad", "Do you want to save") And it gets stuck there. I'm running Vista 64. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted April 6, 2011 Share Posted April 6, 2011 Hi, Welcome to the Forum.Change WinWaitActive("Notepad", "Do you want to save") to WinWaitActive("Notepad", "Do you want to save changes to Untitled") - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 6, 2011 Moderators Share Posted April 6, 2011 El3ctroded,Welcome to the AutoIt forum. I am afraid MS have changed the name of the "Do you want to save?" dialog since the tutorial was written. Change the line to:WinWaitActive("Notepad")and all should work. The Help file change is already noted for the next release. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
El3ctroded Posted April 6, 2011 Author Share Posted April 6, 2011 Bruce, that did not work. I noticed you missed the "?" at the end; I added that to it and it still did not work. M23, that worked, thanks. However I'm confused... From looking at the WinZip tutorial, I thought the text in dialog only had to Contain the text used in the AutoIt command; see this piece of code from the WinZip tutorial: WinWaitActive("WinZip Setup", "into the following folder") So why is the following also not working for the notepad dialog? WinWaitActive("Notepad", "want to save") Thanks El3ctroded Link to comment Share on other sites More sharing options...
El3ctroded Posted April 6, 2011 Author Share Posted April 6, 2011 (edited) Odd, I used the AutoIt Window Info tool and it doesn't see the text... Here's the summary of the window info: expandcollapse popup>>>> Window <<<< Title: Notepad Class: #32770 Position: 449, 288 Size: 366, 138 Style: 0x96C80284 ExStyle: 0x00010101 Handle: 0x0000000000170D02 >>>> Control <<<< Class: DirectUIHWND Instance: 1 ClassnameNN: DirectUIHWND1 Name: Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:1] ID: Text: Position: 0, 0 Size: 350, 102 ControlClick Coords: 205, 31 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x0000000000430B30 >>>> Mouse <<<< Position: 662, 347 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &Save Do&n't Save Cancel >>>> Hidden Text <<<< Edited April 6, 2011 by El3ctroded Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 6, 2011 Moderators Share Posted April 6, 2011 El3ctroded,The "visible text":&Save Do&n't Save Cancelactually refer to to the button texts - not that of the window itself. That is why my suggestion works and the other one did not. The "Title" and "Text" parameters are very sensitive - they must be or they would not do their jobs - so you have to be careful that you use the correct values. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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