teamdad Posted May 20, 2004 Share 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 ? Link to comment Share on other sites More sharing options...
Josbe Posted May 21, 2004 Share 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 Link to comment Share on other sites More sharing options...
teamdad Posted May 21, 2004 Author Share 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..... Link to comment Share on other sites More sharing options...
Valik Posted May 21, 2004 Share Posted May 21, 2004 Use the unstable build found here. Link to comment Share on other sites More sharing options...
bobheart Posted May 21, 2004 Share Posted May 21, 2004 Yes it work for me and thats what I'm using now . Link to comment Share on other sites More sharing options...
teamdad Posted May 21, 2004 Author Share 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!!! Link to comment Share on other sites More sharing options...
scriptkitty Posted May 21, 2004 Share Posted May 21, 2004 Some of us are normally a little unstable AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
sykes Posted May 21, 2004 Share Posted May 21, 2004 Some of us are normally a little unstable We have enough youth. How about a fountain of SMART? 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