koden Posted November 18, 2005 Report Share Posted November 18, 2005 I have a macro that insert date in a program window. This program has a function where shift+% is inserting the date today in this format: 11/14/2005 12:00 am But sometimes i have to insert a date that is 2 or more days before today. lets just say I would make a macro that insert a date 2 days before today. How do I do that without doing anything manually??? Quote Link to comment Share on other sites More sharing options...
randallc Posted November 18, 2005 Report Share Posted November 18, 2005 Hi, Date/Time: Save "dddd, d MMMM yyyy" into %T1%Text Box Display: Two days ago <DT:dddd, d MMMM yyyyT:01:3:{P00002}{P00000}{P00000}{P00000}><TBOX4:T:1:CenterCenter000278000200:000:Two days agoTwo days ago, it was; %T1%> Best, Randall Quote Link to comment Share on other sites More sharing options...
koden Posted November 18, 2005 Author Report Share Posted November 18, 2005 I say thank you... But i'm a newbie, so it won't help me much :-)) If you have the time could you than ex. me were to put it in my macro? Quote Link to comment Share on other sites More sharing options...
kevin Posted November 18, 2005 Report Share Posted November 18, 2005 could you than ex. me were to put it in my macro?Highlight the Quoted macro in Randall's post (the one starts with '<' -- the second one) and copy it to the clipboard (Ctrl+c). Then open Macro Express, create a new macro (I would choose 'None' for activation) and paste from the clipboard (Ctrl+v). After examining the sample, you can either copy and paste it into your macro or adjust the macro commands inside your macro. Quote Link to comment Share on other sites More sharing options...
koden Posted November 22, 2005 Author Report Share Posted November 22, 2005 Thanks..very much.. I have copyed Quote number 2 and put it into my macro. When i run the macro it click in the date field and after this I have insert the qoute <DT:dddd, d MMMM yyyyT:01:3:{P00002}{P00000}{P00000}{P00000}> <TBOX4:T:1:CenterCenter000278000200:000:Two days agoTwo days ago, it was; %T1%> A boks comes up and tells me that 2 days ago was sunday. I click ok and nothing happens. But i need it to put the date from sunday in the field in this format: 11/20/2005 12:00 am Have i forgotten something??? Quote Link to comment Share on other sites More sharing options...
kevin Posted November 22, 2005 Report Share Posted November 22, 2005 Add a TextType command that types out the content of %T1%. You will probably have to use keystrokes or mouse movements to put the cursor in the correct location before you do the TextType. Quote Link to comment Share on other sites More sharing options...
randallc Posted November 22, 2005 Report Share Posted November 22, 2005 Hi, That text box should format as Two days ago, it was;Monday, 21 November 2005 starnge! Anyway, your format to follow Kevin's note should be; MM/dd/yyyy h:mm AMPMin the first line; thus; <DT:MM/dd/yyyy h:mm AMPMT:01:3:{P00002}{P00000}{P00000}{P00000}><TEXTTYPE:%T1%>Best, Randall Quote Link to comment Share on other sites More sharing options...
koden Posted December 5, 2005 Author Report Share Posted December 5, 2005 Hmm...can't get it working In my macro i choose text type Open the text type box and fill in this: <DT:dddd, d MMMM yyyyT:01:3:{P00002}{P00000}{P00000}{P00000}> <TBOX4:T:1:CenterCenter000278000200:000:Two days agoTwo days ago, it was; %T1%> I save the macro and run the macro. When it comes to the date field, it puts the string in the field. But i gets this error: Please enter the date as MM/DD/YYYY hh:mm a(am,pm) randallc: I'm not sure I understand your last answer?? Quote Link to comment Share on other sites More sharing options...
randallc Posted December 5, 2005 Report Share Posted December 5, 2005 hmmm...! You need to paste the gear (from my quote box, not yours) into the MEX Editor, into the "MacroScript" area when your macro is open for editing (NOT in a text box) Hope this helps, - else post your script and I'll change it, Randall Quote Link to comment Share on other sites More sharing options...
koden Posted December 6, 2005 Author Report Share Posted December 6, 2005 I hate to ask again, but I don't understand.... When I do as Kevin wrote. Copy and paste this qoute directly into the macro in editor. [<DT:dddd, d MMMM yyyyT:01:3:{P00002}{P00000}{P00000}{P00000}> <TBOX4:T:1:CenterCenter000278000200:000:Two days agoTwo days ago, it was; %T1%>] Then i get 3 lines in the macro. A date/time: save "dd-MM-yyyy" into %T1% A text type II A text box display 2 days ago If i run this macro it comes out and tell me that 2 days ago was sunday :-)) Wauuuhhh :-))) I understand so much, that the first line saves the day today in T1 (i supose that T1 is something I can't see ??). The next 2 lines i do not understand. I think I also understand that i need something more :-)) Quote Link to comment Share on other sites More sharing options...
randallc Posted December 6, 2005 Report Share Posted December 6, 2005 OK, Save your macro by. 1. File 2. Export "alt-P" [export as playable macro] 3. Name it and save (ext "mxe" comes bydefault) 4. reply to this post. 5. Attach [browse] yor mxe file 6. Add to post. 7. Submit post. I can see what you have got in your macro!... Best, Randall <DT:MM/dd/yyyy h:mm AMPMT:01:3:{P00002}{P00000}{P00000}{P00000}><TEXTTYPE:%T1%> Types into an area or field or notepad you have already selected [instaed of Display Box] Quote Link to comment Share on other sites More sharing options...
koden Posted December 6, 2005 Author Report Share Posted December 6, 2005 Hello randallc I have tryed a lot and suddenly it works :-) I only use the first line of the tree lines. Double click on it and use type out instead of variable and choose the right format. So the macro click the field and put the date line in and then click enter. It works... :-)) Thanks a lot I have attach my macro so you can see it... Mymacro.mxe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.