eliass123 Posted December 19, 2017 Share Posted December 19, 2017 Hey, I want to make a macro that sends a timestamp to a background window like notepad and then send ctrl s How do I do that? Greetings Link to comment Share on other sites More sharing options...
Earthshine Posted December 19, 2017 Share Posted December 19, 2017 Show us your script and maybe we can help My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
eliass123 Posted December 19, 2017 Author Share Posted December 19, 2017 (edited) 28 minutes ago, Earthshine said: Show us your script and maybe we can help I really have no clue how to do timestamps even this page couldn't help me https://www.autoitscript.com/autoit3/docs/macros/TimeAndDate.htm edit found it out Edited December 19, 2017 by eliass123 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 19, 2017 Moderators Share Posted December 19, 2017 Begin with looking in the help file under the Date Management section. Look at _Now(), _NowDate(), and _NowTime() and see which works best for you. Then we can go from there. "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...
mrmacro Posted December 19, 2017 Share Posted December 19, 2017 I agree with reading the manual, its helped me a little with my project, then I can ask further for clarification, I have learned more by trying myself and failing rather than asking here for someone to do it for me but I am too a beginner and using the help of the help file and the internet I have come up with this expandcollapse popupExample() Func Example() Run("notepad.exe") AutoItSetOption("WinTitleMatchMode", 4) WinWaitActive( "Untitled - Notepad", "", 5 ) ControlFocus ( "Untitled - Notepad","" , "Edit1" ) ControlSend ( "Untitled - Notepad", "" , "Edit1","{F5}" ) Sleep(500) Send("+{UP 2}") Sleep(500) Send("!f") Send("x") WinWaitActive("Notepad") Send("y") Sleep(500) Send("+{UP 2}") Sleep(500) Send("!f") Send("x") WinWaitActive("Notepad") Send("{ENTER}") Sleep(500) Send("heeeeeeee.txt") Sleep(500) Send("{ENTER}") WinWaitClose("Untitled - Notepad") EndFunc ;==>Example Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 19, 2017 Moderators Share Posted December 19, 2017 @mrmacro That is the exact reason we suggest new folks look at the help file. You could take your 37 lines, and boil it down to a simple: #include <Date.au3> FileWrite(@DesktopDir & "\Output.txt", _Now()) mrmacro 1 "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...
mrmacro Posted December 20, 2017 Share Posted December 20, 2017 16 hours ago, JLogan3o13 said: @mrmacro That is the exact reason we suggest new folks look at the help file. You could take your 37 lines, and boil it down to a simple: #include <Date.au3> FileWrite(@DesktopDir & "\Output.txt", _Now()) thought i could help another beginner with what i had worked out but , i got loads to learn still , seem i not worked that one out yet but thanks Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted December 20, 2017 Share Posted December 20, 2017 You want hotkey or even hotstrings. I like the use of hotstrings for things like this. when you type the word timestamp it will automatically put the time stamp if the file you are working with. #Include <HotString.au3> #Include <Date.au3> HotStringSet("timestamp{space}", inserttime) HotKeySet("{Escape}", terminate) While 1 Sleep(10) WEnd Func inserttime() Send("{Backspace 10}") Send (_Now()) EndFunc Func terminate() Exit EndFunc 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