Jump to content
Macro Express Forums

Pete

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by Pete

  1. With reference to the original problem of printing multiple .PDF files. You should be able to launch acrobat from the command line with parameters for the specific file, and to print to a specific printer. This might reduce the amount of window manipulation that needs to be done by MEx? https://stackoverflow.com/questions/619158/adobe-reader-command-line-reference There is also a utility which may help you here - http://www.columbia.edu/~em36/pdftoprinter.html I haven't looked at these options in any depth, but you may want to explore further.
  2. Solved. The issue was investigated by Kevin at Insight:- ME3 does not have an "Hour" option for scheduling a macro, but you could have a "minute" value of over 59. I had one ME3 macro with a value of 120 minutes, which after conversion, tripped up the ME6Pro scheduler. I changed the schedule to every 2 hours 0 Minutes and the problem was solved. Insight will update the conversion routine to correct this. Thanks Kevin.
  3. Update. It is restricted to one large macro file converted from ME3 The same file causes the same issue on 2 PCs The problem does not occur when the offending file is closed. The file has been sent to Insight for analysis.
  4. Thanks everyone, Cory. 1. Frequency is 2 secs, but behaviour doesn't alter with any frequency. 2. Synchronising is on but deactivating it makes no difference. 3. Backing up when the Editor closes. 4. ME runs at startup.The account logged in is an administrator, but I am not specifically running ME as administrator. terrypin There is no macro running, it is logged every time the scheduler checks (every 2 seconds if that is the setting) I will report to Insight.
  5. I have just upgraded from ME3 to Pro 6.1.3.1 Preferences are set to Log Unusual Events. Every time the scheduler checks for Scheduled Macros (whatever frequency is set) I get the following event logged 13 February 2020 09:15:48:206: Datafile.GetActMacros error: Invalid argument to time encode fname: F:\xxxxx\xxxxx\xxxxxxx.mex I doesn't seem to affect macro execution as far as I can tell, but it makes for a large log file, and means I have to have notifications of unusual events turned off. Anyone come across this? Thanks, Pete
  6. I know this topic is 6 months old but I thought I'd add something.... The following registry key can be accessed from and written to by VBA code. HKEY_CURRENT_USER\Software\VB and VBA Program Settings\ I have many ME macros which open an Excel Workbook and run a specific Excel macro utilising this registry key to pass data. To run a specific Excel Macro when a workbook is opened:- 1. Add the following code to the Excel Workbook Private Sub Workbook_Open() Dim sMacroName As String 'Run the Macro in Registry RunExcelMacro, Clear Registry value sMacroName = GetSetting("MyProject", "RunExcelMacro") SaveSetting "MyProject", "RunExcelMacro", "" If sMacroName <> "" Then Application.Run sMacroName End If End Sub 2. Write a registry string containing the name of the Excel Macro, E.G. HKEY_CURRENT_USER\Software\VB and VBA Program Settings\MyProject\RunExcelMacro 3. Launch your Excel workbook and the Excel Macro will run. Hope this helps someone, Pete
  7. Hi Strathos, thanks for the reply. That would be better if they were in static positions on the web page, unfortunately they're not! I've now got a working solution which parses the main page source code and writes the pdf file addresses to a file; I then open each pdf document in turn and save it to my PC. So I know the web addresses of the files, but not where they are physically on the web page. It would be nice to be able to just use a file copy command for the "http\\: directory", then I wouldn't have to wait for all the pdf files to load. I may resort to buying some software which downloads entire web sites, that would do the trick.
  8. Hi, I'm struggling to find a neat way to save a bunch of pdf files from the net to a local folder without loading the file in a browser and then interacting with the browser controls. Does anyone know a better way ? Thanks.
  9. Hi, I can't think of an easy solution, so here's a tricky one, which may or may not work..... Firstly the usual caveat - do not alter any registry entries unless you really know what you're doing, and even then take a back up first! How about setting the default device in the registry to what you want before entering the print dialog? I just had a quick look in my registry and this might be it.... HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\WINDOWS, Device read what it is store it set it to what you want print dialog set it back to what it was. You will probably have to re-enter the printer dialog each time after setting it for it to be selected. I haven't tried this and I don't know that it will work, but it's worth a try if there's no other solution - good luck. Pete.
  10. A few thoughts-- 1. Check under Options > Preferences > Playback that you are trying the correct key sequence to abort. 2. As this macro is running does the mouse cursor change state ? If so you could test that the mouse is as expected before any clicks, else abort. 3. Validate in other ways that the expected state of photoshop is correct at certain times - if necessary by pixel colour. 4. If you are clicking on controls maybe you could capture those instead of screen locations - it may be more reliable Pete.
  11. I just got a new pc and installed 3.5e. I have noticed a new unwelcome behaviour in macros which have worked peacefully many millions of times for years in 3.4b.... When trying to delete a file which doesn't exist I now get a message "Error Deleting File or Folder" - most annoying. Do I need to try and identify the error window and clear the message? (I'm not sure if I can as the macro seems to be waiting for the window to clear before proceeding.) The only (messy) way round this I can think of is running a .bat file with a dos command in it, as that won't complain about not finding the file? Any ideas ? Thanks, Pete.
  12. Hi Floyd. No its not close. The strange thing is, it works fine 29 times out of 30.
  13. I have an Excel application which spawns a msgbox when it is complete. My ME application has a "Wait For Window Title" command (waiting for the Excel Msgbox), it has a 15 sec timeout. Occasionally, it seems that the Excel app stops running UNTIL the wait for window command times out, and ME Macro is aborted - the Excel app then continues, and gives the msgbox. To me is seems that Macro Express is somehow stopping the Excel VBA from running - is this possible? I've tried using an "If window title is on top" command in a loop instead of the Wait for Window command, but the same thing happens.
  14. MIchele, if you post the code you are using and the web page URL, I'm sure someone will have a look at it. Pete.
  15. Hi Doreen, I think you need to use the command.... Variable Set to ASCII Char (I think TAB is ASCII decimal 9) Good Luck Pete
  16. Hi Ashley, attached is a playable macro which will do what you want Set String T1 = Peter Modify String Copy Char 1 of T1 to T2 Modify String Copy T2 to T3 Modify String Uppercase T3 Modify String Rplace T2 with T3 in T1 (NOT all instances) There are probably several other ways to do it too. Pete. capitalise.mxe
  17. Hi ffortino, I don't believe so. One way to get round this would be to append all the T variables to a file (CRLF after each one), then process the file using TEXT FILE BEGIN PROCESS. This would process one value at a time in a loop. Maybe you could populate the file instead of the T variables initially ? Pete.
  18. Hi. I have an application which does just this many thousands of times a day. ME passes control to Excel and waits for a dialog box before it continues. It works like this... ME focuses excel workbook. ME sends keystrokes [alt+z] to run Excel macro (VBA). ME waits for CLIPBOARD READY window. Excel Macro does some stuff, then goes to cell and copies to clipboard. Excel Macro spawns CLIPBOARD READY dialog box. ME sends keystroke [ENTER] to close CLIPBOARD READY dialog box. ME populates variable from clipboard. --------- Hope this helps Pete.
  19. From what you say the file is not currently tab delimited, and does not have CRLFs? If this is the case you will need to 1) I load up the text file, and save the text as a variable 2) I have to process the tabs, and CRs I assume? (by that you mean insert the tabs? I would use commas - slightly easier) 2b) append each row to a temporary text file (you can add the CRLF as you do this). Now you have a file you can work with (if you use commas it's in .CSV format). 3) now I can work with it and break out the information into individual variables starting with %T50% up to %T80% for instance. =================================================== I have done this many times to parse the source of a web page, to convert a table in to a .csv file so that it can be imported to excel. Pete.
  20. Hi Klutzo. A few pointers for using ASCII File Processing...... * For Every ASCII File Begin Process command, you need an ASCII File End Process command. * These commands act like the Repeat Loop, and will process the input file ONE ROW AT A TIME (up to the CR/LF). * If you state that the "Variable to Receive First Field" is T11, and you have 5 fields in the file, Then T11, T12, T13, T14, T15 will be populated with the strings in those fields. You need to perform any processing you require on those fields BETWEEN the Begin Process, and the End process commands. * Try putting a TEXT BOX DISPLAY, with an OK button in between the BEGIN and END commands. Make the Box content T11=%T11%:T12=%T12% etc. This will show you what is happening. If you still have problems, attach the file here. Good Luck Pete.
  21. Thanks Kevin, I think I'll go the registry flag route. Pete.
  22. Hi Joe! It makes no difference, I guess because the [main] macro is not window activated? Pete.
  23. Hi Jim, You are correct that only 1 macro can execute at a time, but if you schedule several macros to start at the same time - they will all run - one after the other. So there should be some sort of internal "queue" of macros waiting to execute? Well that's the way I see it anyway My macros wait for each other to finish, but it seems that disabling a macro after it's scheduled start time does not prevent it running (once). Pete.
  24. Hi! I have a macro [main] which runs continuously (every 1 second). To disable/enable this macro I have a 2nd macro [togglemain] which is activated from a menu (located on the taskbar). The problem I have is that by the time I DISABLE the [main] macro, it is already in the queue to run again - so it always runs one more time after [togglemain] issues the DISABLE command. I could get round this by getting the [main] macro to check a registry switch in line 1, and control that switch from [togglemain]. However, I wondered if there was a way of deleting macros already waiting in the queue to run ? Thanks - Pete.
  25. sfigg, there are 2 options on the Log Errors Command: * Log Messages to File * Log Errors to File Do you have these set correctly ? Help on this Pete.
×
×
  • Create New...