Jump to content
Macro Express Forums

joe

Members
  • Posts

    1,002
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by joe

  1. These changes will maximize your loop time to about 10 seconds. By changing the loop counter (%N2%) or the delay time (currently 0.5 seconds), you can increase or decrease the loop time. Variable Set Integer %N2% to 1 Get Pixel: Window Coords: 430,275 into %N1% Repeat Until %N1% = 1071789 Wait Time Delay 0.5 Seconds Get Pixel: Window Coords: 430,275 into %N1% If Variable %N1% = 1071789 OR If Variable %N2% >= 20 Repeat Exit End If Variable Modify Integer: Inc (%N2%) Repeat End
  2. I agree with everything but your first sentence. We've all benefited a great deal from your input and ideas. You have my gratitude ... wait ... what was that? ... yes ... yes ... ok ... er, Floyd says thanks, too.
  3. Change your %N3% to a %D3%
  4. Just as a tip - The "Variable Modify String: Trim" command trims all non-printable characters from a string, not just spaces. Therefore, stripping the CR/LF is not needed.
  5. There are no commands built directly in to Macro Express to extract data from the many different database engines out there. However, you can use Macro Express to control a script that extracts the data. There was a recent topic about this very subject. You can find it here. Macro Express does this. Macro Express does this.
  6. joe

    Vb To Db?

    Sweet! Thanks OzMan, er, Paul.
  7. joe

    Vb To Db?

    Cory - I'll bet this is what you're looking for: A majority of our clients are using Macro Express to control VBScript scripts that use ADO to access Excel workbooks as databases without the need for launching Excel. Extracting data, writing data, and so forth. But none of them have any use for Access. I imagine that the steps required are almost identical with those of Excel. So yes, you can use database techniques on Excel and Access. For that matter on text and CSV files, too! Hang on to your shorts, here's an example: On Error Resume Next Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adCmdText = &H0001 Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject("ADODB.Recordset") objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=X:\Data\Addresses.xls;Extended Properties=""Excel 8.0;HDR=Yes;"";" objRecordset.Open "Select * FROM [Main$]", objConnection, adOpenStatic, adLockOptimistic, adCmdText strSearchCriteria = "Name = 'Joe Weinpert'" objRecordSet.Find strSearchCriteria objRecordset("City") = "Cleveland" objRecordset.Update objRecordset.Close objConnection.Close The above code (let's call it "NameAddress.vbs") would: Open an existing Excel sheet named "X:\Data\Addresses.xls" as a database Open the sheet named "Main" as a table (in this example the whole table is a record set) Search the column titled "Name" for a cell that equals "Joe Weinpert" Then change a column named "City" in the same row to "Cleveland" Cake, baby! So how does Macro Express fit in? Simple! Look at the changes: On Error Resume Next Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adCmdText = &H0001 Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject("ADODB.Recordset") objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=%T1%;Extended Properties=""Excel 8.0;HDR=Yes;"";" objRecordset.Open "Select * FROM [%T2%$]", objConnection, adOpenStatic, adLockOptimistic, adCmdText strSearchCriteria = "Name = '%T3%'" objRecordSet.Find strSearchCriteria objRecordset("City") = "%T4%" objRecordset.Update objRecordset.Close objConnection.Close Notice the Macro Express variables? Create a macro to set variables using prompts: T1 = "X:\Data\Addresses.xls" T2 = "Main" T3 = "Joe Weinpert" T4 = "Cleveland" Then set a string variable, say %T10%, to everything between the CODE tags. Save it out to a file named "NameAddress.vbs" and then run it. It can be run by double-clicking on it via Windows Explorer or it can run via the Macro Express Launch Program command. Want more flexibility? VBScript files accept parameters. And to top it all off ... scripting is built into your operating system. Nothing to buy. Nothing to install. It's already there. The point is: you can do ANYTHING using Macro Express to control and run scripts. We know. We make our living at this stuff. All possible through Macro Express. Hubba hubba! Have at it.
  8. Geez Paul ... that was simple
  9. I think I understand. The macro will recognize the cursor has changed from an arrow to something else, but it can't see what that something else is because the software is using its own custom cursors, and they are not in the 21-set provided by Macro Express. Have you tried each of the 21 cursors in the set against, say, your no-drop cursor just to be sure it is not recognized?
  10. What happens if you change the target window title in your commands from "Macro Express" to "Macro Express -"?
  11. Terry - "dissemble" is such a nasty word don't you think? I think so. It means "To disguise or conceal behind a false appearance", in other words ... purposely deceive. You seem to be an intelligent person and once you learn more about Macro Express I'm sure that your input will be invaluable to all of us MX developers and users. But, don't ever accuse someone here, in my forum, of something like that again. Period. Okay ... on to the stuff that helps everyone! Not sure what you are talking about. Out of the 23 macros listed, only 8 do not have comments and the rest do. Here's the list that doesn't: Hide a Program Maximize and Minimize Menu and Question Open Explorer Folder Process Folder Variable and Mouse Counter from Run to Run Copy and Paste Repeatedly Yes, it's true. Comments can and do help a great deal. I'm positive that the ones that have no comments are older ones. Can't wreak havoc with something that isn't used and macex.ini is not used in Macro Express 3. Feel free to saw a way at it. It's there for the samples and whatever experimenting you would like to do with the samples.
  12. Hello! You can set a string variable of any length and have the macro type it. Which variable to type out, would be the question. Is there something different, say a window title, that Macro Express can know about? Something that will tell it to type m4 or M5 or m6? Is this what you mean?
  13. Hello! After the delay, Text Type a <TAB> and then an <ENTER>.
  14. Hello! Look, I know how frustrating it can be to have questions unanswered in a public forum. But remember, even the most simplest of questions can take a fair amount of time to answer. And I've learned over the years that there are simply times, for whatever reason, that questions remain unanswered. Believe me, it happens to ALL of us. And not just in this forum. It truly does. I should reiterate at this point that this is our forum (Macros LLC / Professional Grade Macros). We support it. We sponsor it. It is NOT run by Insight Software Solutions. They are generous to take the time to read all the questions. And Kevin is great at answering them when others, such as myself, cannot. But they are, by no stretch of the imagination, responsible for what, or what does not, happen here. The answer you need might not be as easy as you think it should be, but only because of your lack of programming experience. The answer to finding a string within another string is almost the same in any programming language. You need to to a sub string search, and in Macro Express that would be the Get Position of Text in a Text Variable command. There is your place to start. The Macro Express of today, bears little resemblance to the Macro Express I started using 8 or 9 years ago. So, like, you, I'm learning something new almost everyday. Take your time. Experiment with the examples in the sample.mex file. Go through the tutorials. Read the online knowledge-base. Examine the help file. All of these things will help you. And after all, THAT is the most important thing.
  15. joe

    Vmware

    Fred - We're using 5.5.3 Workstation here and haven't had a prblem problem ... at least not yet.
  16. Don - It could be that you need to slow Macro Express down a little. Add a Delay command of 1 or 2 seconds after the web page command. To slowdown the keyboard, add a Keystroke Speed command of, say, 50 ms prior to the section containing the TABs. This will force a 50 ms pause between each keystroke. Macro Express can outrun applications so you will need to experiment with delays to get the right flavor for your environment.
  17. Jim - One. Add a Delay after the Clipboard Copy command. Something small like 250 or 500 ms. Anything that Windows does with the clipboard takes a lot of computer time. Another one ... replace the Clipboard Copy command with the native Text Type: <ALT>ec. Use lowercase for the e and c. And leave the Delay command.
  18. Strathos - I haven't tried this yet, but if it works as you say ... then bless you my good man! Er, or lady, uh ... not sure by the name ... but thanks!
  19. Use the Set Variable to ASCII Character command. The resulting string can be used like any other string. In your case, the string created will be a TAB character, which is ASCII 009. Variable Set %T9% to ASCII Char of 009 <ASCIIC:9:1:009>
  20. Not knowing more of the specifics, I would guess that full-screen mode actually means non-window mode. Since the Mouse Locator dialog is a window, it probably can't be displayed unless you are in a window mode.
  21. Cannot read your file. See this thread: Uploading files In the mean time, it sounds like you need to use the Else command as in: If this is true Do this Else Do this instead End If
  22. A custom mouse cursor cannot be added to the list. However, if the custom cursor is going to appear after the current cursor, you should be able to trap the event by scripting something like "wait for the current cursor to disappear".
  23. Macro Express prints the whole script. You could print the script to an Adobe PDF document and then choose the pages from the Adobe Reader. Or you could copy-and paste lines from the Script Editor window into an external editor.
  24. One way to do it is by separating the components: Text Type: % Text Type: T1 Text Type: %
  25. I can't tell you what happened, but the results are that it sounds like your macro library was somehow corrupted. Do you have a backup? If not, you may be able to recover from a copy that gets placed in your assigned temp folder (something like "C:\Documents and Settings\You\Local Setting\Temp"). Look for the latest file with a ".$$$" extension. Something like "~macexp30.$$$". They are backups that Macro Express (automatically?) generates whenever you make a change to a macro.
×
×
  • Create New...