Moderators JLogan3o13 Posted November 15, 2012 Moderators Share Posted November 15, 2012 (edited) If you are meaning you would like to encapsulate your entire snippet above for re-use, you would do so in a Function. The help file can give you a lot more information, but here is a quick example. You put the lines in a function, then call that function by its name: _myFunc() Func _myFunc() BlockInput(1) Run("notepad.exe C:UsersBenjyDesktopfff.txt") WinWaitActive("fff - Notepad") AutoItSetOption("SendKeyDelay", 100) Send("ummm so this is supposed to be on a different line {enter} not sure what that means though." & @CRLF & "This should be on a new line!") WinClose("fff - Notepad") WinWaitActive("Notepad") Send("!s") $sData = MsgBox(0, "To Commander Atg", "Everything has been done as ordered Sir!", 4) BlockInput(0) EndFunc Edited November 15, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
BenjaminAlvarado Posted November 15, 2012 Author Share Posted November 15, 2012 yes exactly what I meant! I thought that was a variable lol thanks a lot! 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