Jump to content
Macro Express Forums

All Activity

This stream auto-updates     

  1. Past hour
  2. Version 6.1.3.something. I have had to press Tab five times for a long time, but I'm not sure how long. Perhaps several months, and perhaps years. The inconsistencies in the "Set Variable..." windows that gave rise to this challenge might be relatively new, or only occur in newer versions. I have filed a bug report with Insight Software, noting that when Set Variable... windows open, either the first field has focus (the desired behaviour), or the user must give the first field focus by pressing Tab between one and five times. In the meantime, I'm good with our DIY fixes!
  3. Today
  4. What version of ME are you using? You said above, "... when "Variable Set String" opens, you must press Tab five times to get to the first field." Using a macro to insert commands (inspired by your other challenge), I believe I had to TAB only twice. Odd.
  5. This appears to be generally true with Macro Express command windows, but there may be exceptions. After posting this challenge, I decided to apply what I had learned in crafting a solution to the "Set Variable... " issue to handle another, similar situation... and so far, I have made zero progress with a particular class of command windows. I haven't given up yet. I'm still experimenting. In the next day or so, I’ll post my solution to the "Set Variable…" challenge – which includes a kludgy workaround that I’m almost embarrassed to share. I'm still trying to figure out why a workaround is needed at all. I don't think Terry experienced the problem I am seeing!
  6. Yesterday
  7. I've not used it. I know there are authentication settings that need to be made. Contact their support.
  8. I am testing out the Report Commander, but I can't get it to actually log into our server. Not sure what the issues is and/or if it is related to the fact that I have a trial version. ???
  9. I can see where this is useful when coding macros, and makes for one less irritation. I do little enough development these days that the irritation is good to keep me alert. What I never thought about before, however, is that every command window appears focused with its own name and therefore can trigger a macro to run. I will keep that in mind for the future -- it could be handy for tasks other than ironing out inconsistencies. As usual with your challenges, I learned something new even if I didn't write a macro.
  10. So, I finally got around to your suggestion for automating insertion of commands. The more I thought about it, the more I agreed with you that it could save a lot of time. Instead of using separate hot keys for each inserted command, I used a single hot key to start the “insert” macro. The macro displays a menu of commands to be inserted, with the ampersand (&) to make each menu item keyboard-selectable. There is more code for most commands to select generic options, so what is inserted is really a “dummy” command that must be modified afterwards. For example, the inserted “Variable Set String” sets a dummy variable to null. In addition, certain menu selections insert multiple dummy commands: selecting “Repeat Start” results in a skeleton loop: Repeat Start Repeat Exit End Repeat Selecting “If Variable” results in a skeleton If %T[99]% Equals “” Else End If // Log Messages to "C:\Temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt" "Macro executed: 2x_Insert_Common_Macro_Commands" Log Errors to "C:\Temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt" Keystroke Speed: 30 milliseconds Mouse Speed: 30 milliseconds // // Macro displays a multiple-choice box, inserts selected command into macro // If Not Window "Macro Express Pro - Script Editor" is focused Macro Return End If // // Multiple-choice box Multiple Choice Menu: Command List Variable Modify String: Replace "&" in %command% with "" If Variable %command% Equals "" // On null selection, end macro OR If Variable %command% Equals "X - Exit, No Command" // On null selection, end macro Macro Return End If // // Prepare command panel to insert the chosen instruction Text Type (Simulate Keystrokes): <ALTD><ARROW DOWN><ALTU> // Alt-DownArrow to move to "Search for command" field // Select the chosen command from the list Text Type (Simulate Keystrokes): %command% Text Type (Simulate Keystrokes): <ENTER> // ENTER to insert the command // // For some commands, do extra keystrokes and/or inserts If Variable %command% Equals "Comment" // COMMENT Text Type (Simulate Keystrokes): <SPACE><TAB><ENTER> // One blank space and ENTER to insert the comment End If // If Variable %command% Equals "Delay" // DELAY Text Type (Simulate Keystrokes): <ARROW DOWN><TAB>250<TAB><TAB><SPACE><TAB><ENTER> // Set 250ms, ignore macro speed factor, ENTER command End If // If Variable %command% Equals "If Variable" // IF VARIABLE For If Variable, also enter Else and End If Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB><TAB>%T[99]<TAB><TAB><TAB><TAB><TAB><ENTER> // ENTER to insert the command Delay: 250 milliseconds Text Type (Simulate Keystrokes): <ALTD><ARROW DOWN><ALTU> Text Type (Simulate Keystrokes): Else Text Type (Simulate Keystrokes): <ENTER> // ENTER to insert the command Delay: 250 milliseconds Text Type (Simulate Keystrokes): <ALTD><ARROW DOWN><ALTU> Text Type (Simulate Keystrokes): End If Text Type (Simulate Keystrokes): <ENTER> // ENTER to insert the command End If // If Variable %command% Equals "Mouse Move" // MOUSE MOVE Text Type (Simulate Keystrokes): <TAB><TAB><TAB><TAB><TAB><TAB><ENTER> // Set 250ms, ignore macro speed factor, ENTER command End If // If Variable %command% Equals "Repeat Start" // REPEAT START For Repeat Start, also enter a Repeat Exit and End Repeat Text Type (Simulate Keystrokes): <ENTER> // ENTER to insert the command Delay: 250 milliseconds Text Type (Simulate Keystrokes): <ALTD><ARROW DOWN><ALTU> Text Type (Simulate Keystrokes): Repeat Exit Text Type (Simulate Keystrokes): <ENTER> // ENTER to insert the command Delay: 250 milliseconds Text Type (Simulate Keystrokes): <ALTD><ARROW DOWN><ALTU> Text Type (Simulate Keystrokes): End Repeat Text Type (Simulate Keystrokes): <ENTER> // ENTER to insert the command End If // If Variable %command% Equals "Text Type" // TEXT TYPE Macro Return End If // If Variable %command% Equals "Text Box Display" // TEXT BOX DISPLAY Macro Return End If // If Variable %command% Equals "Variable Set String" // VARIABLE SET STRING Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB><TAB> Variable Set String %T[99]% to "%T[99]%" Text Type (Simulate Keystrokes): %T[99]% Text Type (Simulate Keystrokes): <TAB><TAB><TAB><TAB><ENTER> End If // If Variable %command% Equals "Variable Modify String" // VARIABLE MODIFY STRING Delay: 250 milliseconds Text Type (Simulate Keystrokes): <TAB><TAB> Variable Set String %T[99]% to "%T[99]%" Text Type (Simulate Keystrokes): %T[99]% Text Type (Simulate Keystrokes): <TAB><TAB><ENTER> End If // // // Macro Return // //////////////////////////////////////////////////////////// <COMMENT Value=" "/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Macro executed: 2x_Insert_Common_Macro_Commands" Stamp="TRUE"/> <LOG ERRORS Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Hide_Errors="FALSE"/> <KEYSTROKE SPEED Delay="30"/> <MOUSE SPEED Delay="30"/> <COMMENT Value=" "/> <COMMENT Value="Macro displays a multiple-choice box, inserts selected command into macro"/> <COMMENT Value=" "/> <IF NOT WINDOW Option="\x00" Title="Macro Express Pro - Script Editor" Partial="TRUE" Wildcards="FALSE"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <COMMENT Value="Multiple-choice box"/> <MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%command%" Title="Command List" Prompt=" Choose command to insert" Options="&Comment\r\n&Delay\r\n&If Variable\r\nMacro R&eturn\r\n&Mouse Move\r\nMouse &Left Click\r\n&Repeat Start\r\n&Text Type\r\nText &Box Display\r\nVariable Set &String\r\nVariable M&odify String\r\n&X - Exit, No Command" Left="Center" Top="Center" Monitor="0" Width="443" Height="226" OnTop="FALSE" Columns="Auto"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%command%" ToReplace="&" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <IF VARIABLE Variable="%command%" Condition="\x00" IgnoreCase="FALSE" _COMMENT="On null selection, end macro\r\n"/> <OR/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="X - Exit, No Command" IgnoreCase="FALSE" _COMMENT="On null selection, end macro\r\n"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <COMMENT Value="Prepare command panel to insert the chosen instruction"/> <TEXT TYPE Action="0" Text="<ALTD><ARROW DOWN><ALTU>" _COMMENT="Alt-DownArrow to move to \"Search for command\" field"/> <COMMENT Value="Select the chosen command from the list"/> <TEXT TYPE Action="0" Text="%command%"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="ENTER to insert the command"/> <COMMENT Value=" "/> <COMMENT Value="For some commands, do extra keystrokes and/or inserts"/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Comment" IgnoreCase="FALSE" _COMMENT="COMMENT"/> <TEXT TYPE Action="0" Text="<SPACE><TAB><ENTER>" _COMMENT="One blank space and ENTER to insert the comment"/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Delay" IgnoreCase="FALSE" _COMMENT="DELAY"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><TAB>250<TAB><TAB><SPACE><TAB><ENTER>" _COMMENT="Set 250ms, ignore macro speed factor, ENTER command"/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="If Variable" IgnoreCase="FALSE" _COMMENT="IF VARIABLE For If Variable, also enter Else and End If"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<TAB><TAB>%T[99]<TAB><TAB><TAB><TAB><TAB><ENTER>" _COMMENT="ENTER to insert the command"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<ALTD><ARROW DOWN><ALTU>"/> <TEXT TYPE Action="0" Text="Else"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="ENTER to insert the command"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<ALTD><ARROW DOWN><ALTU>"/> <TEXT TYPE Action="0" Text="End If"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="ENTER to insert the command"/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Mouse Move" IgnoreCase="FALSE" _COMMENT="MOUSE MOVE"/> <TEXT TYPE Action="0" Text="<TAB><TAB><TAB><TAB><TAB><TAB><ENTER>" _COMMENT="Set 250ms, ignore macro speed factor, ENTER command"/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Repeat Start" IgnoreCase="FALSE" _COMMENT="REPEAT START For Repeat Start, also enter a Repeat Exit and End Repeat"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="ENTER to insert the command"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<ALTD><ARROW DOWN><ALTU>"/> <TEXT TYPE Action="0" Text="Repeat Exit"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="ENTER to insert the command"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<ALTD><ARROW DOWN><ALTU>"/> <TEXT TYPE Action="0" Text="End Repeat"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="ENTER to insert the command"/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Text Type" IgnoreCase="FALSE" _COMMENT="TEXT TYPE"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Text Box Display" IgnoreCase="FALSE" _COMMENT="TEXT BOX DISPLAY"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Variable Set String" IgnoreCase="FALSE" _COMMENT="VARIABLE SET STRING"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<TAB><TAB>"/> <VARIABLE SET STRING Option="\x00" Destination="%T[99]%" Value="%T[99]%" NoEmbeddedVars="TRUE"/> <TEXT TYPE Action="0" Text="%T[99]%"/> <TEXT TYPE Action="0" Text="<TAB><TAB><TAB><TAB><ENTER>"/> <END IF/> <COMMENT Value=" "/> <IF VARIABLE Variable="%command%" Condition="\x00" Value="Variable Modify String" IgnoreCase="FALSE" _COMMENT="VARIABLE MODIFY STRING"/> <DELAY Flags="\x12" Time="250"/> <TEXT TYPE Action="0" Text="<TAB><TAB>"/> <VARIABLE SET STRING Option="\x00" Destination="%T[99]%" Value="%T[99]%" NoEmbeddedVars="TRUE"/> <TEXT TYPE Action="0" Text="%T[99]%"/> <TEXT TYPE Action="0" Text="<TAB><TAB><ENTER>"/> <END IF/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <MACRO RETURN/> <COMMENT Value=" "/>
  11. Last week
  12. This appears to work although I had some erratic behaviour. Decimal played hard to get but fiddling around with delays appears to have sorted it. Bool is very slow to display. My code is just plain stuff, slogging through the IFs and could no doubt be improved. Also I haven't figured out why I need to double click twice in the command list to get the dialog. EDIT: Activation is Window Title: Variable Set Window Gains Focus Title is a partial match (Coudn't get reliable triggering with Window Is Opened.) Whether I'll actually now use this macro is uncertain 😉 // Assumes that one of the Variable Set... dialogs has just been opened Wait for Window Title: Variable Set Variable Set String %tTitle% to topmost window title // BOOL If Variable %tTitle% Equals "Variable Set Bool" Text Type (Simulate Keystrokes): <TAB> // First a single tab Wait for Text Playback Delay: 0.1 seconds Text Type (Simulate Keystrokes): <F4> // Open drop-down Wait for Text Playback Delay: 0.1 seconds End If // CONTROL TEXT If Variable %tTitle% Equals "Variable Set Control Text" Text Type (Simulate Keystrokes): <TAB> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <F4> // Opens drop-down Delay: 0.1 seconds End If // DECIMAL If Variable %tTitle% Equals "Variable Set Decimal" Text Type (Simulate Keystrokes): <TAB> Delay: 0.2 seconds Text Type (Simulate Keystrokes): <F4> // Opens drop-down Delay: 0.1 seconds End If // FROM FILE If Variable %tTitle% Equals "Variable Set From File" Text Type (Simulate Keystrokes): <TAB> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <F4> Delay: 0.1 seconds End If // HANDLE If Variable %tTitle% Equals "Variable Set Handle" // Back with Shift+Tab Text Type (Simulate Keystrokes): <F4> // Open drop-down Delay: 0.1 seconds End If // INTEGER If Variable %tTitle% Equals "Variable Set Integer" Text Type (Simulate Keystrokes): <TAB> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <F4> // Opens drop-down Delay: 0.1 seconds End If // STRING If Variable %tTitle% Equals "Variable Set String" Text Type (Simulate Keystrokes): <TAB><TAB><TAB><TAB><TAB> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <F4> // Opens drop-down Delay: 0.1 seconds End If // ASCII CHAR If Variable %tTitle% Equals "Variable Set to ASCII Char" Text Type (Simulate Keystrokes): <TAB> Delay: 0.1 seconds End If // ASCII VALUE If Variable %tTitle% Equals "Variable Set to ASCII Value" Text Type (Simulate Keystrokes): <TAB> Delay: 0.1 seconds End If // MISC // As it's not one of the preceding nine, the dialog opened must be 'Variable Set From Misc' // No tabs needed, and no drop-down. <COMMENT Value="Assumes that one of the Variable Set... dialogs has just been opened"/> <WAIT FOR WINDOW TITLE Title="Variable Set " Partial="TRUE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <VARIABLE SET STRING Option="\x05" Destination="%tTitle%"/> <COMMENT/> <COMMENT Value="BOOL"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set Bool" IgnoreCase="TRUE"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="First a single tab"/> <WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<F4>" _COMMENT="Open drop-down"/> <WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="CONTROL TEXT"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set Control Text" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<F4>" _COMMENT="Opens drop-down"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="DECIMAL"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set Decimal" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <DELAY Flags="\x01" Time="0.2"/> <TEXT TYPE Action="0" Text="<F4>" _COMMENT="Opens drop-down"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="FROM FILE"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set From File" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<F4>"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="HANDLE"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set Handle" IgnoreCase="FALSE"/> <COMMENT Value="Back with Shift+Tab"/> <TEXT TYPE Action="0" Text="<F4>" _COMMENT="Open drop-down"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="INTEGER"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set Integer" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<F4>" _COMMENT="Opens drop-down"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="STRING"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set String" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB><TAB><TAB><TAB><TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<F4>" _COMMENT="Opens drop-down"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="ASCII CHAR"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set to ASCII Char" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="ASCII VALUE"/> <IF VARIABLE Variable="%tTitle%" Condition="\x00" Value="Variable Set to ASCII Value" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <END IF/> <COMMENT/> <COMMENT Value="MISC"/> <COMMENT Value="As it's not one of the preceding nine, the dialog opened must be 'Variable Set From Misc'"/> <COMMENT Value="No tabs needed, and no drop-down."/>
  13. In the Macro Express Pro Script Editor, ten different "Variable Set" commands are available. The most frequently accessed of these are probably "Variable Set Integer" and "Variable Set String." You may have noticed minor inconsistencies when different "Variable Set…" windows open: - When "Variable Set From Misc" and "Variable Set Handle" opens, the first field has focus. (This is good!) - When most "Variable Set…" windows open, you must press Tab to get to the first field. - But when "Variable Set String" opens, you must press Tab five times to get to the first field. The challenge: Change the behaviour of Macro Express. When any "Variable Set…" window opens, the first field automatically has keyboard focus. In other words, your macro solution will make it possible to immediately interact with the first field in these windows without the need to click the mouse or press the Tab key: Bonus: If the first field in a "Variable Set..." window is a drop-down list, your macro opens the drop-down list. Hint: Hotkeys to do this include Alt + Up, Alt + Down, and F4.
  14. I forgot to add that if the report viewer doesn't remember the last used printer, you can use MEP to change the default printer to the custom configured one then change it back.
  15. I found this also. $150 and you're done. Another trick to consider is to set up a printer in Windows for these reports with their defaults configured for your reports. That way when you print to it, you don't need to change any print parameters. I see one can generate reports, but I don't see any support for printing from the command line. In that case I'd have CR create the RPT files as I mentioned in my first post and then open the Report Viewer passing the RPT file in the command parameters with MEP. That way you avoid the whole "File open..." part. Then just have MEP do a CTRL+P to print. I think the last selected printer is remembered and you can simply click OK on the button control.
  16. You might not need MEP. I believe CR has command line properties that allow one to do many things including running reports. I would first look and see if that's the case and if so, use the Windows Scheduler to schedule the task every morning. If there's no option to directly print, you could create a report file in a batch file and then send it to the printer.
  17. I have a series of Crystal reports I need to send to a specific printer each morning at a designated time (with finishing options such as double sided and stapled). I haven't been able to find options within ME Pro to allow me to do this. Has anyone successfully accomplished a task like this yet? If so, can they share with me the specifics on how to do it? Much appreciated!
  18. Earlier
  19. Here are three methods for gathering information about a web page when programmatic methods are not available. Use one, two, or all three of the methods to infer whether you're on the "right" page. None of the approaches is 100% reliable, but one or a combination can yield pretty good results. On gathering information from the address line: In general, Alt + D is a more reliable than F6, as F6 is also the hotkey to jump from frame to frame. So if a page has frames, F6 might not do what you intend. In some browsers, Ctrl + L is an alternative way to navigate to the Address bar.
  20. If you come up with something for Gmail, let us know. I had a great macro that handled the list of emails on the Inbox screen to identify and delete duplicates. Gmail changed some time ago so the macro is now useless.
  21. I discovered that just yesterday when trying to use controls to click on a button. 😧 I have scripts for some web sites where a button or image appears, and maybe also changes color when the mouse hovers over it, once the page has loaded. Since I know where the button will be, I put the mouse there and keep checking the color until it gets to what I want. I also use Cory's method of examining the URL -- I didn't know F6 would highlight it, I have been using Alt-d. Also for some pages it works to click within the page, Ctrl-a to highlight everything and copy to clipboard, and look for identifying text. Typing END or clicking the mouse again usually clears the highlighting.
  22. I guess I didn't fully understand that until now. That could be an area of great improvement for MEP. I've been able to make some inroads into inspecting rendered pages, and drawing conclusions. And I see other people have as well. But most attempts are often unreliable, or not universal on more than one computer, or need frequent repair. I try to do a lot of error checking and taking screen shots for later diagnosis. It's a good idea. Because many web pages will immediately "redirect" to their own internal version of URL. Then at least you know the server is talking. Though, you dont know if page fully loaded and page scripting is completed. Thanks for the reply. I know it's a pretty vague question to answer.
  23. FYI MEP can't access web form controls. The only control is the entire rendered area. I like to F6 and evaluate the URI. Maybe it contains something like "myaccounts" in the path or you can use the entire URI. Or there could be parameters in the query that can be used.
  24. After logging into my bank they always display some advertisement before showing me my accounts. In general, what are some good ways to verify I'm on the right web page before tabbing or clicking around? I already have some scripting that looks for the words "No Thanks", and clicks it, if it exists. Because "No Thanks" is a pretty common button on the ad page. But sometimes they have other buttons instead, like "Remind me later" or "Drop dead" or whatever. So I want an additional check that looks for what SHOULD be there before continuing. I could just continue looking for specific words, like the phrase "Primary Account" or whatever. But instead I though I might look for specific controls that exist on the accounts page. However, in order to define a control into a variable, it has to EXIST at least once. I see no way to save a control variable for long-term use, like if this runs automatically every weekend. I hope this question makes sense. My scripts are years old and I have only recently come back to it. So I'm rusty. Edit: There is another compelling reason for looking for new ways to verify you've landed on the correct web page. On some pages my searching for certain text does not work. A good example is Gmail.com. Let's say I log in and search for the word "Compose" or "Primary". Those are prominent words near the top of the page. The behavior I hope for is that after <control>f, compose, <escape>, and that word "compose" remains highlighted. That way I can copy to clipboard and test for the word. If it's present, I'm likely on the right page. But on many web pages certain words do not remain highlighted. On Gmail almost nothing will. To see the difference do <control>a to highlight all. Notice very little is highlighted. What is a better test?
  25. Use the Catch Error command. In the Set Focus command you will see an "On Error" tab and the code for that error is 0x0028. I try to avoid Catch Error commands. I think it's better to test first with If If Control > Exists. You might also take care in how you do your Get Control command if you can see the control you want, but MEP doesn't see it. There are some technicalities one must understand in order to get this to work in some cases. The main part is MEP accesses controls by an address, and just because you see a blue 2020 Honda Civic and it looks like all the rest, the DMV sees them as distinct because they have different VINs.
  26. Hi Hans, Can you provide more information please. When your code above is run, what application is active (Excel?) and what is currently focused or selected? What result do you expect and exactly what result do you get? Do we need a specific file in order to reproduce the issue? Terry, UK
  27. Hi all, I am stuck hope someone can help me please. This is my Macro to close a search control: <WAIT FOR CONTROL Control="%Error1%" Option="\x06" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="<ENTER>"/> <IF CONTROL Option="\x06" Variable="%Suche ergebnislos%"/> <GET CONTROL Flags="0" Program_Name="EXCEL.EXE" Class="#32770" Title="Microsoft Excel" Control="\"OK\",\"Button\"" Variable="%Suche ergebnislos%" Caption="Microsoft Excel" Partial="FALSE" Wildcards="FALSE"/> <SET FOCUS Control="%Suche ergebnislos%"/> <TEXT TYPE Action="0" Text="<ESC>"/> <TEXT TYPE Action="0" Text="<ESC>"/> <END IF _COMMENT="1"/> Once the control is focused it closes the Control, the problem I have got is that once the control is not displayed I get the error control does not exist. No matter what I have tried I cant seem to catch that error message. What would be the correct way to capture the error message "Control does not exist" please. Kind regards Hans Peter Betzler
  28. Hi all, I am stuck hope someone can help me please. This is my Macro to close a search control: <WAIT FOR CONTROL Control="%Error1%" Option="\x06" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="<ENTER>"/> <IF CONTROL Option="\x06" Variable="%Suche ergebnislos%"/> <GET CONTROL Flags="0" Program_Name="EXCEL.EXE" Class="#32770" Title="Microsoft Excel" Control="\"OK\",\"Button\"" Variable="%Suche ergebnislos%" Caption="Microsoft Excel" Partial="FALSE" Wildcards="FALSE"/> <SET FOCUS Control="%Suche ergebnislos%"/> <TEXT TYPE Action="0" Text="<ESC>"/> <TEXT TYPE Action="0" Text="<ESC>"/> <END IF _COMMENT="1"/> Once the control is focused it closes the Control, the problem I have got is that once the control is not displayed I get the error control does not exist. No matter what I have tried I cant seem to catch that error message. What would be the correct way to capture the error message "Control does not exist" please. Kind regards Hans Peter Betzler
  29. Good idea to make the Direct Editor the default -- that would save a little time for each scan. Is that an ME 6 option? -- can't find it in ME 4. I wrote a driver for the scan macro and ran it on 33 macros. Nice round number. It took slightly over a minute in all. Screens flash by too fast for me to read much. Variable Set Integer %count% to 33 Repeat Start (Repeat %count% times) Macro Run: 9a_Search_Macros_for_Macro_Run_Commands End Repeat I also was not aware that Export could put out a text file. That file could probably be imported into an Excel spreadsheet, add a column to sequentially number each line from one to umpteen, sort to put all "Name:" lines together and all "Macro run" lines together, delete everything else, re-sort on the sequence column, and voila.
  30. Well done! Looking forward to trying it in the morning. It will be a neat complement to Cory’s macro, which I use to tackle the reverse task of finding those macros (if any) which run a specified macro as a ‘sub macro’.
  1. Load more activity
×
×
  • Create New...