All Activity

This stream auto-updates   

  1. Today
  2. Thanks for the helpful follow-up. Now reproduced your output (happily in UK dd/mm format, presumably via Win 10 international settings). And 'Learn VB Scripting' added to my long To Do list!
  3. Yes, I did include a sample script in the post. MsgBox(DateAdd("s",30,"31-Jan-10 08:50:00")) is a complete script. That one line is the entire text (script) file that my macro built. The display is NOT a Macro Express message box, it is a VBScript message box. A macro was used only to write that one line to a text file, to save the text file with the .vbs filetype, and to launch Windows WSCRIPT.EXE which runs the script file. You can simulate this manually by building and saving the one-line script file with Notepad, then typing "WSCRIPT.EXE filename.vbs" at a command prompt or the Windows "Start" command. For your purposes, a message box output is useless, so do some Googling and copy/paste file-building logic so that the (1) macro builds a bigger script, (2) the macro launches WSCRIPT to run the script, (3) the script writes the computed date result to a (second) text file, then (4) the macro retrieves the text file containing the result. It seems convoluted, but after you get it working you may come up with a simpler method. In my mind, the biggest advantage of using VBScript is that Microsoft has already written hundreds or thousands of lines of code to make DateAdd do accurate calculations that span day-end, month-end, year-end, etc. P.S. Getting familiar with Visual Basic and similar object-oriented languages IS painful for somebody used to step-by-step logic. I have suffered through it and have very far to go, probably will never get there at my advanced age. But it is worth it, so get going. Google is your friend.
  4. Thanks, VBS looks a fascinating alternative approach. It will mean using any suitable scripts I can find in "copy/paste and don't try to understand the detail" mode, painful for me. But the potential advantages outweigh that. Wish I'd thought of exploring it before I wrote my 114 liner yesterday! Did you mean to include a sample script in your post? Long time since I played with VBS and it's not immediately obvious to me how you got that date into an ME or MEP MsgBox?
  5. Yesterday
  6. This isn't two lines, but it's not many: Macro builds a text file containing the VBScript command DateAdd, with the appropriate number of seconds added to the date/time that the macro provides. For example: MsgBox(DateAdd("s",30,"31-Jan-10 08:50:00")) adds 30 seconds to the starting date/time and displays it in a pop-up message box. That one line is the entire text file that the macro must build. Macro saves the text file as testscr.vbs Macro uses the Program Launch command to run wscript.exe, passing it “testscr.vbs” as its parameter. This can be done easily with ME. It has the advantage that Microsoft’s VB Script language does all the date calculations for you – no small matter when you consider leap years, leap centuries, additions that take you from one month or one year to the next, and so on. I have used MsgBox for my example, and you can use it for testing. But for your live macro you will probably want to find a different VBS function that sends the result to another text file where you can retrieve it further down in your macro – or sends the result to some other easy-to-access location. I don’t know what VBS function to suggest, but starting from abject ignorance (almost) I got this far in half an hour, so you can take it from here. Keep us posted.
  7. By 'the problem" do you mean my original objective: "...to add or subtract a time in say the text form hh:mm:ss to an existing text string yyyymmdd-hhmmss to get the resultant text string YYYYMMDD-HHMMSS"? If so I'd be very impressed to see a two line macro that does it! I'm just putting the finishing touches to mine now: 114 lines. It includes a Repeat for applying it to a set of successive filenames which include a prefix in that form and has future scope (with variables set up) for 'adding' years, months, days, hours, minutes and seconds. It edits the originals in situ, in their File Explorer folder. It uses Run Macro in Variable, as I wanted to learn how to do that with Date/Time. I'm sure a more direct approach along the lines of my first post (working in seconds with conversions from and to text) would be shorter ... but not that short! Note that I gave up on trying to use existing macros for this exercise. The PGM macros looked promising but I could get none working, and as I mentioned in that thread I now hear it's a known issue, encountered by others. And the many others I tried are either buggy or 'empty' or corrupted, with no macro displayed once the MEX is opened in MEP. So I got stuck in and wrote my own. BTW, could you use Quote in your replies please Cory, to minimise ambiguity in long threads like this.
  8. You might consider making a feature request on their website. I've been thinking of creating a generic .NET webform that a macro could define. Mainly people want to have multiple text fields. In my vision there my program would take text file as a command line parameter. Each line of the text file would create the form controls in a simplified way. EG text boxes, buttons, radio buttons, check boxes. Look in my posts for my offer. I could see creating a 'wait for key press' control. However no one seems interested in it so I can't justify spending the time to make what could be a very useful add-in. I would also like to make add-ins for RegEx, Web tasks and other functions MEP doesn't have.
  9. I'm very behind with work and don't have time. Can you make a simple macro that demonstrates the problem. Also instead of using a dialog box to prompt the user, can you just set a text variable? I'm thinking it should be a 2 line macro.
  10. I meant to suggest you turn off ANTI-malware or ANTI-virus, not that you have malware. For instance I know McAfee makes it impossible to install Carbonite or any of it's updates. It blocks many changes the installer tries ot make. So I disable it, run the install, then re-enable.
  11. Yea i forgot to answer this thread. Thank you to rberg & paul. I think paul's solution is the best one. Hopeful the Macro Express Pro developer read this thread and bring out an usefull update in future.
  12. Simulation within a Firefox Private window worked fine. Reassured me that my Dropbox links will work for non-Dropbox users.
  13. Last week
  14. It's apparently a recognised issue. i did run Malawarebytes which found nothing of relevance.
  15. Thanks for the reply Cory. I was able to make a macro that works the way that I want it to by using "Set Window Order Always On Top". If I decide I want to change it up I'll try your method.
  16. Thanks Cory. Hoping for feedback from a non-DB user now! But I'll investigate your suggestions about simulating it.
  17. Thanks Cory. As you saw in my Saturday post, that was my first suspect. But it's odd. The macro uses proper variable names, introduced in ME Pro. Can't see how it can ever have worked if zero is not allowed? I just tried changing all five [0] strings to [1]. That got to the TBD at line 161, giving an incorrect warning: "Date entered is not in correct format mm/dd/yyyy or is invalid, Macro will Terminate" for any date entry! Anyway, this tempers my enthusiasm for using this to help with the macro I described, if significant debugging is likely,
  18. Correct. Here again you need to use MEP's file manipulation commands and stay away form Window File Explorer.
  19. Not much time to comment but waiting for for an unknown key is not something MEP does. Look in the forum and you will find dozens of times people have wanted this but it wasn't available. It's best to think of another way to do what you need. Paul has probably the most reasonable solution and to my way of thinking that's too complicated.
  20. Windows controls can interact with no-focused and even hidden windows. But why use Windows File Explorer? I would use MEP's file manipulation commands. If I wanted to open the third JPEG file in a folder I would do a Repeat with Folder until I found the third. Then Use the Program Launch command. In the parameters use whatever parameters (command line switches) your app uses to open a file. In most cases it's simply the file name with path. I used to do this a lot with PDF files. I've written thousands of macros and I have never found a need to use Windows File Explorer for anything. Much better to use the MEP file manipulation commands.
  21. So it's possible that anti-malware software on your computer could be blocking the creation of registry settings. This is how malware works, seems likely it could be interfering. You should try running the installer as an administrator and disabling all security software for the duration of the installation. I downloaded the PGM once when I first started using MEP. But every time I wanted a function it seemed the PGM did things a little differently than I wanted and i just ended up making my own. Eventually I gave up on it. At one time I had a fairly large library of Macros I used as sub-routines.
  22. The problem with your macro is that array variables in MEP are not zero based. IE unlike normal programming languages, they start at 1.
  23. I can simulate not having a DropBox account with Incognito in Chrome. You can too. I think it's called Private in FireFox. I see the same thing you describe and can optionally do the "Direct Download". It doesn't direct download. I get the same as #1. Same as #1 again. This time it doesn't prompt me and I the file automatically downloads. I don't see anything of DropBox.
  24. Thanks Sam. My bad! I gave the wrong link. That gives the result you and Cory found. (I'll aim to test the many others I have that I think were downloaded at the same time.) The correct macro that gives the problem I described is called Date String to Date Variable and hopefully it's attached! Keen to get it working if possible. I''ll correct the original post too. -------------------- Apologies for going OT, but I'm still trying to establish what happens to my new Dropbox links in forums that I use for those who do not have Dropbox accounts. (Do you?) Anyway, here are four different links to that same valid file, and I'd much appreciate feedback on them please. #1 https://www.dropbox.com/s/2xetvq1ie0a7bau/Date String to Date Variable.mex?dl=0 Here, this opens in my browser (Firefox), tells me it cannot be previewed, and - after a couple of seconds when it's presumably checking whether I have a DB account- it offers a Download button. #2 https://www.dropbox.com/s/2xetvq1ie0a7bau/Date String to Date Variable.mex?dl=1 Here, this automatically downloads it to my Downloads folder, with no user intervention. #3 https://www.dropbox.com/s/2xetvq1ie0a7bau/Date String to Date Variable.mex?raw=1 Here, this does exactly the same as #1 #4 https://dl.dropboxusercontent.com/s/2xetvq1ie0a7bau/Date String to Date Variable.mex?dl=0 Here, this opens the content of the MEX in Firefox. If I select it, copy/paste to a text editor and save as an MEX, it runs OK. Date String to Date Variable.mex
  25. Terry, I'm sorry. You did use the attachment link. I don't know why it would refer to dropbox, however. Like Cory, I downloaded the file from the link and opened it in Macro Express Pro. There were no macros in the file. I then packed the file and the size was set to 60 bytes. That is the size of an empty macro file. Maybe it will work better if you copy it from the dropbox link to a folder on your hard drive and then attempt to attach it from there.
  26. The PGM setup creates the keys. So, you don't have the PGM library?
  27. I don't know what is creating the keys but maybe some security software is preventing it?
  28. I'm trying to use macros from the full PGM library downloaded from the Insight page. Mainly with the objective about date/time arithmetic I described in my parallel forum post: http://pgmacros.invisionzone.com/topic/8052-integer-seconds-to-yyyymmdd-hhmmss/ But when I activate any of them and accept this request to allow registry values to be created https://www.dropbox.com/s/xdcrypvawynjhha/PGM-Setup-1.jpg?raw=1 I get the message "Line 81 ({ PGM Setup }): Debug Error: Could not access the specified registry value" I followed the instructions here to the letter as far as I know: https://www.macros.com/pgmfdownload.htm That line 81 is: Read Registry Value "HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders\Home" into %T[1]% As you see (if my attachment works!), I have no folder here called 'Folders' in registry key "HKEY_CURRENT_USER\Software\Professional Grade Macros\" Are others successfully using the PGM macros under Win 10? Last June in discussion here with Sam I appeared to be doing so too. Although that may possibly have been on my XP PC.
  1. Load more activity