Jump to content
Macro Express Forums

joe

Members
  • Posts

    1,002
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by joe

  1. Magic wrote Which bug question was missed?
  2. Hello Bernd! A little more background may help. What is the purpose of this macro? Is it to get an email address of the user's choosing from the address book and place it into the clipboard? It certainly seems like it is more than that because I can see other keystrokes. But, I have no way of knowing what those other keystrokes are for.
  3. Welcome to the forum! I am no expert on creating intranets, so I could be wrong. However, my understanding is that javascript is run internally using a browser and that it is imbedded in the HTML (or whatever) code. You can have external .js files that are read in by the browser, but they cannot be run externally or standalone, unlike VBSsript files. This means that Macro Express has no means to access them, at least not that I am of aware of.
  4. Noggin - The values being passed to batch file %1 and %2 reside in the Parameters field of the Program Launch command ("%T2%" "%T3%"). Variables are handled in Macro Express by simple substitution much like a #DEFINE so what the batch file receives are actually the two literals "c:\temp\xfer.zip" and "c:\temp\results.txt". Then the batch file replaces the first and second parameters (%1 and %2) with the passed literals. Which results in: attrib c:\temp\xfer.zip > c:\temp\results.txt Not the quotation marks ("%T2%" "%T3%") are important if you are passing filenames with spaces in them.
  5. Hello and welcome to the forum! This can be done through a batch file: attrib %1 > %2 and a macro: // T1 = DOS batch file // T2 = File to get attribute from // T3 = File to store results Variable Set String %T1% "c:\temp\test.bat" Variable Set String %T2% "c:\temp\xfer.zip" Variable Set String %T3% "c:\temp\results.txt" // Run the batch file and wait for the results to be written Program Launch: "%T1%" Wait for File Ready: " // Parse the results file Variable Set String %T4% from File: "%T3%" Replace "%T2%" with "" in %T4% Variable Modify String: Trim %T4% // Test for an "R" If Variable %T4% contains "R" Text Box Display: Else Text Box Display: End If Macro Return <REM2:><REM2:T1 = DOS batch file><REM2:T2 = File to get attribute from><REM2:T3 = File to store results><TVAR2:01:01:c:\temp\test.bat><TVAR2:02:01:c:\temp\xfer.zip><TVAR2:03:01:c:\temp\results.txt><REM2:><REM2:Run the batch file and wait for the results to be written><LAUNCHDEL2:0:01%T1%<PARAM>"%T2%" "%T3%"><WFREADY:000000:000005:000000%T3%><REM2:><REM2:Parse the results file><TVAR2:04:04:%T3%T><TMVAR2:21:04:00:001:000:%T2%><TMVAR2:01:04:00:000:000:><REM2:><REM2:Test for an "R"><IFVAR2:1:04:7:TR><TBOX4:T:4:CenterCenter000250000150:000: %T2% is a read-only file><ELSE><TBOX4:T:4:CenterCenter000250000150:000: %T2% is NOT a read-only file><ENDIF><MRETURN><REM2:> You will, of course need to change the files to suit your own needs. A word of explanation about parsing the results file is in order. On my system the resulting line contains 11 spaces and/or attributes along with a fullpath filename no matter if you supply the fullpath or not. So I simply remove the filename from T4 and then trim it before testing for an "R". I have attached the files to this post. Hope this helps! GetAttribute.zip
  6. Welcome to the group Laurence! When talking about edit boxes and the Text Type command (Send Text to Control), I find that they act in whichever manner the software is set. For example, if I have the text input set for INSERT then the text will be inserted wherever the cursor is located. If the software is set to OVERWRITE then the text will be overwritten at the cursor position. Additionally, sending text to the control using Text Type will NOT set focus to the edit box. The only other way to enter text in an edit box is to set focus to the dialog that it is located in and use the Text Type command normally. This gives you the advantage of being able to select existing text, delete it, and the type the new text all with the same Text Type command line. Send Text to Control does not allow for these editing keys.
  7. Sure Noggin ... your idea would work, too. There are some bad things involved in scanning for pixel colors. Speed, knowing which color, and so forth. My idea has some big flaws. The good thing about it is that there is no need to worry about which color to look for, only that a color has changed. The bad thing for this approach is a web site may have animated gifs or flash boxes so colors change constantly. Another bad thing is that searching for the next link could scroll the screen if the next link is not in the window. It used to be that a count of links could be made by parsing the source code for any web site. But with today's web sites that is next to impossible to do. Something that I've been trying lately is to turn off cache and loop (tab by tab) through a page keeping a count as I go.
  8. Hello Michael! Try a lowercase p Activate Window: "Notepad" Wait For Window Title: "Notepad" Text Type: <CONTROL>p
  9. Welcome to the forum! It would be nice if the Move Mouse to Text command worked on Internet Explorer links, but it doesn't. My guess is that IE, like Word, uses its own text cursor. So, one alternative is to take a snapshot of the screen, saving pixel pairs to a text file. Then use your sequence: Edit -> Find Enter link text Cancel Find dialog <TAB> to select link Now the link is highlighted, therefore the colors have changed. Now rescan the screen comparing the pixel pairs until a difference is found, then move your mouse to that point. I have not tried this yet, but I am about to because it sounds fun. My only concern is the speed, but this can be cut down by scanning every 10th pixel or so, by only concentrating on part of the screen, and so forth.
  10. Welcome to the forum! When you are viewing a macro from the Direct Editor, you are looking at Macro Express native code. A macro is one long string of unbroken text without CR/LFs. If you attempt to add CR/LFs then your macro will no longer work properly.
  11. Hello! Can you post the URL? I would like to try a couple of things.
  12. Welcome to the forum Dean! I am not encountering the same problem as you. I set up a test to drag (from the Desktop) a wav file onto the Windows Media Player, which is set to the Now Playing tab. It played just fine. Mouse Move Screen 127, 927 Mouse Left Button Down Mouse Move Screen 726, 490 Mouse Left Button Up Is your macro much different from this one?
  13. Welcome to the forum! What is the web site and field that is giving you a problem?
  14. Hello Bryan ... welcome to the forum! The Text File Begin Process command is made to do what you are asking. Within the process loop it takes the next line in a text file and places it in a text variable of your choosing. You only need to parse the variable to determine what to do, if anything. If you find that an action is to take place, then do that action. All of your commands to do an action are placed between the Text File Begin Process and Text File End Process command lines. In other words, inside the loop like so: Text File Begin Process If Variable contains an action Do stuff End If Text File End Process
  15. Hello! Macro Express is already launched and running so launching another instance does not work. To run a playable macro simply use the Macro Load Text File command in place of the Program Launch command. Load Macro Text File: "Track-It_PDT Comm.mxe" Load Macro Text File: "Track-It_New Inventory.mxe" <TFILE:N:\Info Resources\Track-It\MacEx\Track-It_PDT Comm.mxe><TFILE:N:\Info Resources\Track-It\MacEx\Track-It_New Inventory.mxe>
  16. Welcome to the forum! This sounds very odd. Never heard of it happening. Do you have to hold the d down when you are running the software yourself (i.e. without using a macro)? Maybe the application would prefer that the macro pause for a few milliseconds between keystrokes. If so, then use the Set Keystroke Speed command, which sets a delay between each key sent to the keyboard buffer. Drawing on your example: Keystroke Speed: 100 Milliseconds Text Type: ddddddd The above would take 700ms to type out. However, since we are talking about a single d and not a string of them, have you tried the Wait Text Playback command? From the Macro Express help system: Text Type: d Wait Text Playback
  17. Hello and welcome to the forum! Here is a small example that scans the screen for the color red, moves the mouse to that pixel when found, and then stops. Repeat Start (Repeat 1024 times) Repeat Start (Repeat 1280 times) Get Pixel: Screen Coords: %N1%,%N2% into %N3% If Variable %N3% = 255 Mouse Move Screen %N1%, %N2% Macro Stop End If Repeat End Repeat End <REP3:01:000000:000001:01024:1:02:><REP3:01:000000:000001:01280:1:01:><GETPX:3:S:%N1%:%N2%><IFVAR2:2:03:1:255><MMS2:1N,2N><MSTOP><ENDIF><ENDREP><ENDREP> My screen is 1280x1024 so you will need to change the macro to your screen size. It takes about 45 seconds to scan the whole screen. There are things that you can do to speed this up. Scan every other pixel for example, or scan only certain sections of the screen.
  18. Hello Burt! Yes, there is a CR/LF sequence added when saving clipboard content to a text file. It is unclear if it is added by Windows or Macro Express, but either way, based on the code in your last post, it is a moot point. You are no longer saving the clipboard to a text file. To answer your question, however, CR/LF characters can be ignored when using the Clipboard Type Text command by checking the Ignore CR/LF checkbox. So the "option to remove them" already exists in this version of Macro Express. As to the code in your last post (specifically the last two lines), you do not need to use the clipboard to type out text. Use the Text Type command instead, since the text is already in a variable: Text Type: %T1% And what I meant by: was simply to highlight the filename and then: Text Type: <ALT>ec Variable Set String %T1% from Clipboard Hope all of this helps!
  19. Hello Burt! If I understand the situation from one of your previous posts, you simply want to make a copy of the highlighted filename, using the default "Copy of", saving it to the current folder, and without moving the cursor so that you can keep leisurely scrolling through the folder. The following code works on my system. You may want to adjust the delays up or down to suit your system. Keystroke Speed: 25 Milliseconds Text Type: <ALT>ec Delay 250 Milliseconds Text Type: <ALT>ep Keystroke Speed: 0 Milliseconds <SPKEY:0025><TEXTTYPE:<ALT>ec><MSD:250><TEXTTYPE:<ALT>ep><SPKEY:0000> Also. there was a question of how to get Macro Express to add the fullpath portion to a simple filename. This is easily done by first copying the name (while in Explorer) to a variable and then using the Variable Set from File Path command to automatically add the drive, path, and so forth.
  20. Welcome to the Macro Express forum! Try this coding. You can copy and paste it, but you may want to change variables and file names, and so forth. Click on button for webpage (This works fine) Date/Time: Save "hh:mm:ss" into %T1% Variable Modify String: Append ";" to %T1% Wait for Web Page: "" Date/Time: Save "hh:mm:ss" into %T2% Variable Modify String: Append "%T2%;" to %T1% Variable Modify String: Append %T1% to Text File <DT:hh:mm:ssT:01:1:><TMVAR2:07:01:00:000:000:;><WAITWEB2:000010:000000:><DT:hh:mm:ssT:02:1:><TMVAR2:07:01:00:000:000:%T2%;><TMVAR2:20:01:00:000:000:test.txtF>
  21. Hello Burt! Question for you: How do you know which files you want to make a copy of? Do you know ahead of time before opening Windows Explorer? Or is copying files done on-the-fly?
  22. Welcome to the forum! How about using the scheduling feature to fire the macro?
  23. Welcome to the forum! I am having a tough time deciphering what you have written. When you say "behaving funny", what do you mean?
  24. Welcome to the forum! Here is a (link) to a topic covering what it is that you want to do.
  25. Hello! There is no "mass change" feature that will allow multiple macros to be changed all at once. You could, however, create a macro to do it.
×
×
  • Create New...