teamdad 0 Posted May 20, 2004 What I am attempting seems so simple but I guess I can't put two and two together and come up with the code needed. What I need help with is a button in the GUI that will launch another program and do another action within that program. GUICreate ("Program Master") GuiSetControl("button","OK",50,70,70) GuiSetControlNotify(2) $val = RunWait("Notepad.exe", "C:\WINDOWS") Send("Today's time/date is {F5}") GUIWaitClose () The above works backwards. It launches Notepad and does nothing; when Notepad is closed it then launches the GUI with the button on it that also does nothing. Any pointers for a lost soul ? Share this post Link to post Share on other sites
Josbe 1 Posted May 21, 2004 GUICreate ("Program Master") $button1= GuiSetControl("button","OK",50,70,70) GuiSetControlNotify() While GUIMsg() <> 0 If GUIRead() = $button1 Then Run("Notepad.exe") WinWaitActive("Untitled", "") ControlSend("Untitled", "", "Edit1", "Today's time/date is {F5}") EndIf Wend Look the changes.... AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Share this post Link to post Share on other sites
teamdad 0 Posted May 21, 2004 Something went wrong when I tried to run the script above.... I am using version 3.0.101.4 of the AutoIT-gui and get this error message. Line 6 While GUIMsg() <>0 While ^ERROR Error: Unknown function name. Any other thoughts..... Share this post Link to post Share on other sites
Valik 478 Posted May 21, 2004 Use the unstable build found here. Share this post Link to post Share on other sites
bobheart 0 Posted May 21, 2004 Yes it work for me and thats what I'm using now . Share this post Link to post Share on other sites
teamdad 0 Posted May 21, 2004 Thanks for the insight to use the unstable update. LOL I guess sometimes it pays to be a little risky and not so stable all the time. It works perfect now!!! Share this post Link to post Share on other sites
scriptkitty 1 Posted May 21, 2004 Some of us are normally a little unstable AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
sykes 0 Posted May 21, 2004 Some of us are normally a little unstable We have enough youth. How about a fountain of SMART? Share this post Link to post Share on other sites