Jump to content
Macro Express Forums

wbeldman

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by wbeldman

  1. I've never used this in production and certainly not in Firefox, but it's probably worth the experiment... Ctrl+F Find dialog unique label text The text before the input-tag (doesn't matter whether its in a real label-tag or just some designating text before the input) Enter Find it, select (highlight) it Esc Close the Find dialog TAB To the input field Make shure the label can be found or handle the not found popup!
  2. Note that you can type %T2% directly but you must use upper case T... This should increase johnboy691's development process
  3. I'm not completely shure what yout mean, but selecting can be done in several ways. Going through multiple fields you might consider using TAB. Depending on the type of field the value probably is selected then. You can of course focus the text field by a mouse click and then do Text Type: <HOME><SHIFT><END> Is this a clue you're looking for?
  4. In the Macro Explorer (the editor) the Commands pane has a category Mouse. Double click the Mouse Left Button command (or middle or right) and a popup appears giving you variants as double clicking. Highlighting can be done with the left button but afaik you'll need the right button to copy (via the context menu). You can do Text Type: c Alternatives to copy and paste are of course the shortkeys Ctrl+C Ctrl+V Shift+F10 for context menu
  5. In Internet Explorer: use Alt+d (not shure about other browsers, but I assume they have a similar shortkey as well). Now the URL is selected, so you can copy it. I'm not at the office with a real Macro Express so beware of typos. Make a copy of the string variable containing the URL (here T90). Find out where this page argument begins: find the position of ?page= in the URL. Variable Set Integer %N90% from Position of Text in Variable %T90% N90 + 6 is the first digit of the number you're looking for. Get rid of everything before that point (that's why you should make a copy first). Copy from T90 to T90 beginning at the N90th character until the end of the string (the 99999th character). Variable Modify String: Copy Part of %T90% to %T90% Now you have to look for the first nonnumeric charcter (or the end of the string). Repeat Count 99999, Start 1, Step 1, Place Counter in Variable N91 Repeat Start (Repeat 99999 times) Copy from T90 to T91 1 character from Starting Position N91 Variable Modify String: Copy Part of %T90% to %T91% Loop until T91 contains another character, then break If Variable %T91% < "0" OR If Variable %T91% > "9" Break End If Repeat End N91 now holds the length of the number. Copy from T90 to T90 N91 characters from Starting Position 1 Variable Modify String: Copy Part of %T90% to %T90%
  6. I hope you realise you have to process the list of files from the highest number back to one? Suppose these files exist 01.jpg 02.jpg 03.jpg 04.jpg Now renameing 01.jpg to 02.jpg conflicts with the existing file 02.jpg etc. So rename 04->05, 03->04, 02->03, 01->02. Sorting: click on the column header in your Explorer window (maybe using Get Control). If sorting is the problem, try the built in Rename File or Files command. With a Repeat use the counter variable to rename the file directly.
  7. I asume you want to do the following: If "ACH Unathorized CCDs.csv" exists then do 3 copy actions. If "Five Star Credits.pdf" exists then do 3 copy actions. These two lines are not related to each other, but you placed an Else in between. Your code states: If "ACH Unathorized CCDs.csv" exists then do 3 copy actions Else (if "ACH Unathorized CCDs.csv" doesn't exist) and If "Five Star Credits.pdf" exists then 3 copy actions. Make separate code blocks for each file starting with If File Exists. Note that every Else is optional (see the bottem of your example).
  8. Do you mean something like this? If File Exists: "aaa11111.pdf" Rename File or Files:"aaa11111.pdf" Move File or Files "bbb11111.pdf" End If If File Exists: "QQtoday" Rename File or Files:"QQtoday" Move File or Files "QQ20070608" End If If File Exists: "x.csv" Rename File or Files:"x.csv" Move File or Files "Gross Sales.xls" End If In Macro Explorer: category Files/Folders (and category Logic for If and End If)
  9. You can calculate the center position yourself, assign screen width and height with Variable Set Integer. How can a macro determine the user's screen resolution is? (800 x 600, etc.) And of course divide by 2...
  10. FYI: Sort of... in date format YYYYMMDD you can do an ASCII comparison. The ASCII value (character number) of 3 is smaller than the ASCII value of 4... Date: Save YYYYMMDD (20000319) into %T90% If Variable %T90% > variable %T95% You'd better use the Text - Date command to get the proper format. Note that you can also compare timestamps (date & time) but remember that a date with time addition is always larger than one without. Date: Save YYYYMMDD (20000319) into %T90% Time: Save hhmm (1544) into %T91% Variable Modify String: Append %T91% to %T90% If Variable %T90% > variable %T95%
  11. Quoting Joseph Weinpert: Macro Express Explained: Try two Macro Run commands within the Ctrl Up en Down: Control Key Down Macro Run: MacroThatStartsWithControlJ Macro Run: MacroThatStartsWithControlK Control Key Up
  12. Neither did I miss GoTo and there might be a better way to code your problem. But answering your questing, try something like Repeat 1 times Action01 If Condition = Right Break End If Action02 If Condition = Right Break End If Action03 If Condition = Right Break End If End Repeat FinalAction Note that I coded this without ME so please pay no attention to the syntax
  13. You might be looking for User Submitted Macro: Heartbeat
  14. In the Replace Substring command, did you check the checkbox Replace All Instances?
  15. Consider something like this: The disadvantage is the obligation to wait a while (3 seconds) whether the Error popup appears...
  16. Use Variable Set Integer, tab Option 2 Variable Set Integer %N90% from Current Hour If Variable %N90% < 9 Macro Return End If
  17. I'll try to comment it. Note that you cannot copy this into Macro Express directly! //Previously one line from the Notepad document was copied to the Clipboard. //Don't use Ctrl+Shift+arrow but: Home Shift+End //Store this line in temorary text variable T4 Variable Set String %T4% from Clipboard //Get rid of leading and trailing spaces/tabs Variable Modify String: Trim %T4% // Get First Name //Set temporary variable N4 to the position of the first space in T4. //Double click the command in the Scripting Editor and click in 'Search Text' to see the space. Variable Set Integer %N4% from Position of Text in Variable %T4% //Decrease N4 (subtract 1) so that N4 is the position of the last character of First Name //and also the length of First Name. Variable Modify Integer: Dec (%N4%) //In case no spaces were found, N4 is 0 If Variable %N4% < 0 Text Box Display: Error: Macro Stop End If //Copy First Name to T1 //Copy N4 characters from T4 to T1 starting character 1. Variable Modify String: Copy Part of %T4% to %T1% //Delete First Name from T4 //Delete N4 characters from T4 starting character 1. Variable Modify String: Delete Part of %T4% //Get rid of leading and trailing spaces/tabs in First Name Variable Modify String: Trim %T1% //and display it Text Box Display: First Name: // Get Last Name //Reuse temporary variable N4 and set it to the length of the remaining: maybe Middle Name(s) & Last Name //which is also the position of the last character. Variable Set Integer %N4% from Length of Variable %T4% //Copy N4 to other temporary variable N3. We have to modify this value below and we also need N4 again. //You could also use Variable Modify Integer: Copy %N4% to %N3% Variable Set Integer %N3% to %N4% //Repeat: look througth T4 (from last to first character one by one) until a space was found. Repeat Until %T3% Contains " " //N3 initially points to the last character of T4. At each repeat loop: //Decrease N3 (subtract 1) so that it points to the previous character Variable Modify Integer: Dec (%N3%) //Copy the characters from position N3 to the end //Copy N4 characters from T4 to T3 starting character N3 Variable Modify String: Copy Part of %T4% to %T3% Repeat End //When a space was found, the Repeat was aborted. //This can be the space between Middle Name & Last Name or the space between First Name & Last Name. //T3 now contains the Last Name. //Delete Last Name from T4 //Delete N4 characters from T4 starting character N3 Variable Modify String: Delete Part of %T4% //Get rid of leading and trailing spaces/tabs in Last Name Variable Modify String: Trim %T3% //and display it Text Box Display: Last Name: // Get Middle Name //Copy everything that is left in T4 to Middle Name. If no Middle Name is present, T4 contains only //the space between First Name & Last Name. //You could also use Variable Modify String: Copy %T4% to %T2% Variable Set String %T2% "%T4%" //Get rid of leading and trailing spaces/tabs in Last Name Variable Modify String: Trim %T2% //and display it Text Box Display: Middle Name: //names with - between has to be one name. //In my case they sometimes look like this george-schmidt. //george-schmidt is one name. As we only consider space as a separator character, that's no problem.
  18. I don't know for sure for all browsers, but in Internet Explorer the End key will do.
  19. Now on import both the old, existing macro and the newly imported one are listed in the Macro Explorer list: Can we be sure that all Macro Run commands reference to the oldest macro? And that by deleting that macro all references point to to the newer copy automatically (then the only copy)? In that case we have a safe two step Import & Replace procedure...
  20. Mouse Move Window 390, 99 Mouse Left Button Click Clipboard Empty Wait Time Delay 3 Seconds Mouse Move Window 630, 97 Mouse Left Button Double Click Should there be some copy command here? Like: Clipboard Copy or: // Context menu -- Copy Mouse Right Button Click Text Type: c Variable Set String %T99% from Clipboard Replace " " with "" in %T99% Activate Window: "Excel -" Delay 5 Milliseconds Mouse Move Window 235, 486 Mouse Left Button Click Text Type: %T99% Delay 5 Milliseconds Mouse Move Window 389, 484 Mouse Left Button Click Text Type:
  21. Carriage Return/Line Feed characters show up this way in the Scripting Editor.
  22. The explanation above is very helpful but I'd change one bit of this scenario... Instead of modifying a macro in the .mex file which is in use on several production systems, I'd rather have a separate prod.mex and a dev.mex (and maybe a test.mex as well). The production PCs use prod.mex and all my modifications are made in dev.mex. To put an update into production, I would like to open prod.mex and import the update. But that causes two macros with duplicate names to show in the MacEdit's macro list! At least that's happening now, before we bring this locking into practice... Is it possible to turn this option off, prevent it in any way from working or do you have another solution?? TIA
  23. It's worth the question I think: IF T20 = SDN is not an option? In that case you can use the Switch command. If in your situation *contains* is appropriate, try the following: N90=0 IF T20 contains SDN Variable set T21: A Variable set T22: B Variable set N90: 1 End if [20 times...] //general Else statement IF N90=0 //none of the above tests was true Variable set T21: 1 Variable set T22: 2 End if
  24. If the city name is preceded by a space character: //for testing Variable Set String %T1% "20120 Malmö " // Get position of space character in T1 Variable Set Integer %N1% from Position of Text in Variable %T1% // Get position of character after the space Variable Modify Integer: Inc (%N1%) // Copy from T1 to T1: Starting Position: Variable N1, Characters to Copy 100000 // that will also work for shorter variables Variable Modify String: Copy Part of %T1% to %T1% //for testing Text Box Display: %T1%
×
×
  • Create New...