Jump to content
Macro Express Forums

floyd

Members
  • Posts

    292
  • Joined

  • Last visited

Everything posted by floyd

  1. A mouse activated macro works like the "Or" part of your first question: Are you saying that within Opera, a Shft+Left-click is used to open the underlying link in a new page? If so, then you might want to try a Delay of 500ms as the first line in the macro, then shift-down, mouse click, and a shift-up. Like so: Delay 500 Milliseconds Shift Key Down Mouse Left Button Click Shift Key Up <MSD:500><SHIFTD><LCLK><SHIFTU> The reason for the delay at the beginning is to allow the system some breathing time between using the mouse to activate the macro and then stuffing it with a "click" when the macro runs. Also, I would set macro to be scoped to the Opera window, which will prevent it from being accidently invoked when Opera is not running.
  2. One simple solution is to use the Get Pixel Color command. The Windows Explorer Search dialog has two buttons, Search Now and Stop Search. You can use this command to trap a pixel color at some point on the Search Now button, do the search, and then wait until the button is restored to its original color. This will work because the button is disabled during the search and is re-enabled afterwards. The steps: Move mouse over a point on the Search Now button Get Pixel Color at that position Use the Mouse Left Button Click command to start the search Inside an infinite loop ... Delay for a second or two Get the pixel color again ... continue looping until the color is correct Exit the loop
  3. Wow! 400 machines ... now that is the kind of Macro Express automation that dreams are made of! Kudos to you.
  4. Yes, that is what I meant. I do not notice any slow downs using the Macro Run command. BUT ... that might be because everything we do here involves the Macro Run command. Have you checked the cache setting (Options | Preferences | Caching)? We set ours to 4,096 ... which is probably overkill. Also, have you attempted to adjust the Macro Priority setting in the Registry? This is accessed via the TweakMe3.mxe utility. Here's a good explanation of it from the Macro Express Explained book:
  5. Although it is true that one can access remote Registries on the network through RegEdit, the Read and Write Registry commands in Macro Express cannot. That being said, you can control RegEdit in a manner identical with any other program using standard Macro Express commands as jowensii suggests.
  6. Linda, When you refer to "breaking out" code snippets, are you meaning out to playable macros or out to other macros in the same library?
  7. Welcome to the forum! The answer to this is to wait for the next window to pop up rather than the "application" menu. Here is what I mean: Delay 250 Milliseconds Activate Window: "Program Manager" Wait For Window Title: "Program Manager" Text Type: VBS Edit Text Type: <APP> Text Type: r Wait Window Lose Focus: "Program Manager" Macro Return <MSD:250><ACTIVATE2:Program Manager><WAITWIN2:000000:000002:Program Manager><TEXTTYPE:VBS Edit><TEXTTYPE:<APP>><TEXTTYPE:r><WAITWLF2:000000:000005:Program Manager><MRETURN> The above example activates the Desktop and then sets focus to my VBScript icon. Then it uses the Application key rather than right-clicking the mouse button to activate the menu. Finally it activates the Properties window. Essentially we are waiting for any other window to gain focus other than the Desktop. This is done because the application menu is not capturable and application menus take different times to appear. So we push all of the keystrokes into the keyboard buffer, and then wait.
  8. You are correct that Macro Express does not directly implement xcopy features. It requires saving both the source and destination file dates in variables and doing some comparisons as you are looping through a folder. Xcopy is easily run using the Window's Run dialog or a DOS batch file. Which path to take is a matter of personal choice, parameters of the job, and expediency.
  9. Welcome to the forum! If it is true that you need to delete the first 5 and last 8 lines of a file and these numbers are fixed and each line ends with a CR/LF and that you do not need to rename them (i.e. they are to be overwritten) ... then you can use Macro Express to easily perform this task. Here is a sample macro: // T92 = Ascii CRLF Variable Set %T92% to ASCII Char of 013 Variable Set %T1% to ASCII Char of 010 Replace "%T92%" with "%T92%%T1%" in %T92% // Process each file in the folder. T1 holds the file name Repeat with Folder // Count the number of lines in the current file. T2 holds the current line // N1 holds the total number of lines in the file Variable Set Integer %N1% to 0 Text File Begin Process: "%T1%" Variable Modify Integer: Inc (%N1%) Text File End Process // Append to a string each line in the current file beginning // with 6 and ending with 9 lines from the end of the file // N2 holds the number of lines to keep in T3 Variable Modify Integer: %N2% = %N1% - 13 Variable Set String %T3% "" Text File Begin Process: "%T1%" Variable Modify String: Append "%T2%%T92%" to %T3% Text File End Process // Now save the string. Overwrite the file. Variable Modify String: Save %T3% to Text File Repeat End Macro Return <REM2:T92 = Ascii CRLF><ASCIIC:92:1:013><ASCIIC:1:1:010><TMVAR2:21:92:00:000:000:%T92%%T92%%T1%><REM2:><REM2:Process each file in the folder. T1 holds the file name><REP3:07:000002:000001:0001:0:01:C:\Temp2><REM2:><REM2:Count the number of lines in the current file. T2 holds the current line><REM2:N1 holds the total number of lines in the file><IVAR2:01:01:0><BTFBEG:002:000001:000000:%T1%><NMVAR:08:01:0:0000001:0:0000000><BTFEND><REM2:><REM2:Append to a string each line in the current file beginning><REM2:with 6 and ending with 9 lines from the end of the file><REM2:N2 holds the number of lines to keep in T3><NMVAR:02:02:1:0000001:2:0000013><TVAR2:03:01:><REM2:><BTFBEG:002:000006:N00002:%T1%><TMVAR2:07:03:00:000:000:%T2%%T92%><BTFEND><REM2:><REM2:Now save the string. Overwrite the file.><TMVAR2:17:03:00:000:000:%T1%F><REM2:><ENDREP><MRETURN> I've also attached this example. Of course you will need to change folders and do testing before actually running the macro. SampleMacroToDeleteLines.zip
  10. The work-around for this problem is to set your system clock to hh:mm:ss tt. This is a 12 hour clock using AM and PM.
  11. Yes, the 24 hour clock is still a problem. Chances are it will be fixed in the next update. However, I am unsure of when Insight is releasing the next update. The last update was Aug-13-2004. That being said, I was under the impression that only values > 12 were a problem.
  12. Welcome to the forum ... These kinds of errors displayed by Macro Express when using the email commands are being passed back from Windows. They are not Macro Express errors. I did a Google search on this and found many explanations. This one seems to be a pretty good summation:
  13. Here are some points to remember about Windows and Macro Express when creating macros: A window that is invisible to you and I may be visible to an application. There are very few instances in Macro Express where a window is not visible. An invisible window can be on top and/or have focus the same as a visible window. A window can be on top without having focus and vice versa. The command If Window On Top actually tests for the window having focus, and if it does not, it will return false whether it is on top or not. In other words, you can think of it as the If Window Has Focus command. A window that is minimized can still have focus, it depends on the state of the window that is next in the stack. Depending on how an application was written, the If Window On Top command works only on the top-level (parent) window and not on windows within windows.
  14. So for that one time, could it be that another window title from another application may be running somewhere with the same word(s) in it? This could also happen if you are running the macro from the editor and the macro name has the same word(s) in it.
  15. How is the macro activation set? How is the scope set?
  16. My understanding is that Macro Express works just fine with both Citrix and Terminal Services. However, you must be careful as to how the macro is programmed when working with thin-nets. For example, it may seem like your computer is doing the work when actually the Terminal Services server is doing it. You could be seeing something on the client side that is just an "image" of what the Terminal Server is actually doing. In other words, a real window or dialog may be being run, or even displayed, on the Terminal Server, but all you are seeing on the client side is an image of it ... there is no actual window running on your computer. It really depends on where Macro Express is loaded and which computer is doing the work. As to folders not being available when the connection is terminated, this makes perfect sense to me. It would be the same as attempting to access a folder on a local network when the server containing it is no longer available to the network. Because "the flow of the work" is different when using Terminal Services, I would strongly suggest that you contact support at Insight Software to go over your exact situation, and what is going wrong, so they can help you.
  17. Oh sure ... DOS programs like batch files are, after all, programs like any other program. This is really no different than calling any other MS program while passing it command line parameters. We are simply passing parameters to a "programmable" program ... something you create ... rather than a pre-written program like Excel, Word, and so forth.
  18. Is the title (if there is one) of the MsgBox dialog similar to the title of the current Excel window?
  19. Could the Discharge Packet.mex be an older version of the library? I only suggest this because with all the changes to your servers, maybe a change to a link from the existing server to another one caused Macro Express to load, what it thinks is the current library, but what is actually an older one.
  20. Another solution is to use the msinfo32.exe program. Here is a macro that will create a file of the printer names using the above program (mxe attached): // Program file Variable Set String %T1% "msinfo32.exe" Variable Set String %T2% "c:\Program Files\Common Files\Microsoft Shared\MSInfo" // Output file Variable Set String %T3% "printers.txt" Variable Set String %T4% "c:\temp" // Delete output file if it exists If File Exists "%T3%" Delete File or Files: "%T3%" End If // Launch program Program Launch: "%T1%" Wait for File Exist: "%T3%" // Strip the double-byte(?) characters Variable Set String %T5% from File: "%T3%" Variable Set Integer %N1% from Length of Variable %T5% Repeat with Variable using %N1% Variable Modify String: Copy Part of %T5% to %T6% Variable Set %N6% to ASCII Value of %T6% If Variable %N6% > 0 AND If Variable %N6% < 127 Variable Modify String: Append %T6% to %T10% End If Repeat End // We only want the printer section Variable Set Integer %N1% from Position of Text in Variable %T10% Variable Modify Integer: %N1% = %N1% + 9 Variable Modify String: Delete Part of %T10% Variable Modify String: Save %T10% to Text File Macro Return Note that, for whatever reason, the output file is created as double-byte characters ... or some such thing. So there is a loop that removes any characters from the string that are not between ASCII 01 and ASCII 126 and then re-saves the file. The file that is created will still need to be processed. Hint: each "field" in each of the remaining lines is separated by a <Tab> character. You will only want the first field. Also, you will want to ignore the "header" line. SystemPrinters.zip
  21. How about if you create a shortcut link to the Printers and Faxes within the Control Panel and then use the Launch Program command to fire it off. This would at least get you a window containing all of the printer names. You could also do a search for one of the printer names in your Registry to find out which hives contain the printer names.
  22. Okay Linda, take the same exact steps except capture the list box rather than the combo box. The idea is to determine if the capture is being ignored or is an ampty string being returned.
  23. Use the following command: Variable Set Integer %N1% from the size of file "testfile.txt"
  24. Even though your original question was about the Post Message command ... Whatever choice is currently displayed in a particular combo box in a particular application is not being captured by Window Controls in version 3.0.4.1? Do I understand this correctly? Does it return a blank string, or no string at all (i.e. nothing)? I would suggest taking the following steps: Run the program up to the point that the combo box contains something Launch Macro Express Set %T1% to some value, say "AaBbCc" Capture the combo box to %C1% Add a Variable Get Control Text: %C1% to %T1% command Run the macro Does %T1% still contain "AaBbCc" or has it been changed?
  25. This is the first time that I have heard of this. Have you looked at the revision history online to see if something concerning this problem shows up there?
×
×
  • Create New...