Jump to content
Macro Express Forums


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About UAMike

  • Rank

Recent Profile Visitors

163 profile views
  1. Editing the contents of a string

    My apologies! It was around this time in November that I was dealing with various family issues. It is only this week that I have returned back to work and so I actually forgot that I posed this question to begin with. I do sincerely appreciate the effort that you put forth in helping members of this community. Terry, your script is very similar to what I ended up doing with Notepad. Corey, this app looks great! I will give it a try tomorrow
  2. I've started to incorporate the ASCII functions more frequently when building my macros. I'm wondering whether it is possible to utilize this (or related) function to work with larger blocks of formatted text. For example, my work periodically sends out excel spreadsheets with standardized texts that they expect us to copy and paste from. What I have always done is pre-program macros with variable set string to contain the corresponding text that I otherwise would have had to copy and paste from the spreadsheet. I am wondering if there is a way for me to have my macros reference a corresponding cell in the spreadsheet and copy the contents of the cell to either the clipboard or a string variable. This way, I would save myself time whenever a new version of the spreadsheet becomes available (which usually have simple changes like paragraph formatting, grammar, etc).
  3. I am trying to figure out a way to modify a long string variable (a paragraph or two of text) while the macro is running and then use the updated variable downstream in the macro. I want to be able to delete phrases, words, adjust spacing, etc, so any of the 'Variable Modify String' functions will not do the trick. I think I can get this done by having the macro paste the string into a notepad document, then I would do my manual edits, then copy the text to the clipboard and set the variable to the clipboard contents. Ideally I wouldn't have to fiddle around with this clipboard/notepad method, but I am not sure if there is an easier/better way. Any suggestions?
  4. Sort of... What it is is a "box" (looks like two columns in a spreadsheet) with several phrases from which you can pick one or more options. When you click on one of these phrases, it has a downstream effect on what else gets displayed on the page. I'm not sure if that constitutes a button, but is certainly an element of the page that I can interact with as opposed to a plain string of text. From what I can tell, the box itself can have focus, but not the individual phrases within the box. Here is a short sample of the source code, which is about 90% foreign to me. id='sidebar-region-one' class='screen-layout-region screen-layout-region-main screen-layout-region-main-sidebar1 screen-layout-region-resize' aria-label='Left Panel' role='complementary'><div class='screen-layout-region-content'><div class='sectionDivStyle' id='RULE_KEY' node_type='MAIN_RULE' node_name='PrismPortalNav' data-node-id='PrismPortalNav' version='1' objclass='Rule-HTML-Section' pyclassname='Data-Portal' readonly='false' NAME='BASE_REF' BASE_REF='' expandRL='' uniqueID='SID1510616504615' ><span class='inspector-span' ><div class='layout layout-noheader layout-noheader-section_divider'><div section_index='1' class='layout-body clearfix' ><div class='sectionDivStyle' id='RULE_KEY' node_type='MAIN_RULE' node_name='PrismActionItemLinks' data-node-id='PrismActionItemLinks' version='1' objclass='Rule-HTML-Section' pyclassname='Data-Portal' readonly='false' NAME='BASE_REF' BASE_REF='' expandRL='' uniqueID='SID1510616504616' ><div class='layout layout-outline layout-outline' id='EXPAND-OUTERFRAME' PARAM_NAME="EXPANDEDSubSectionPrismActionItemLinksB"><div class='collapsible Expanded ' id='EXPAND-PLUSMINUS' name='' aria-live='polite' ><div class='header header-bar clearfix' tabindex=0 role='heading' aria-expanded='true' aria-label='Hide Action' id='RULE_KEY' node_type='HEADER' onkeydown='expandHeader(this,event,null,true);' onclick="setUserStart(id);expandHeader(this,event);"><div class='header-left' title='Hide Action'><i class='icon icon-openclose'></i></div><div class='header-content'><h2 class='header-title' aria-level='2' id=''>Action</h2><nobr></nobr><span class='header-element header-title-table'><table cellspacing='0' cellpadding='0'><tr><td nowrap='nowrap' class='tdRightStyle'><table cellpadding='0' cellspacing='0' align='right'><tr><span style="display:none;"> <input type=hidden id=SpellChecker value= "Spell Checker" /> <input type=hidden id=More value= "More" /> <input type=hidden id=Edit value= "Edit" /> <input type=hidden id=Revert value="Revert " /> <input type=hidden id=RevertTo value= "Revert to" /> <input type=hidden id=IgnoreAll value= "Ignore all" /> <input type=hidden id=AddToDictionary value= "Add to Dictionary" /> <input type=hidden id=ChangeAll value= "Change All" /> <input type=hidden id=SpellChecking value= "Spell Checking" /> <input type=hidden id=NoSpellChecker value= "No SpellChecker Available" /> <input type=hidden id=NoSuggestions value= "No Suggestions" /> </span> <script language="javascript"> var haveActionChoices = false; function initActionChoices () { gStrSpellChecker = document.getElementById("SpellChecker").value; gStrMore = document.getElementById("More").value; gStrEdit = document.getElementById("Edit").value; gStrRevert = document.getElementById("Revert").value; gStrRevertTo = document.getElementById("RevertTo").value; gStrIgnoreAll = document.getElementById("IgnoreAll").value; gStrAddToDictionary = document.getElementById("AddToDictionary").value; gStrChangeAll = document.getElementById("ChangeAll").value; gStrSpellChecking = document.getElementById("SpellChecking").value; gStrNoSpellChecker = document.getElementById("NoSpellChecker").value; gStrNoSuggestions = document.getElementById("NoSuggestions").value; } var gStrSpellChecker = null; var gStrMore = null; var gStrEdit = null; var gStrRevert = null; var gStrRevertTo = null; var gStrIgnoreAll = null; var gStrAddToDictionary = null; var gStrChangeAll = null; var gStrSpellChecking = null; var gStrNoSpellChecker = null; var gStrNoSuggestions = null; </script> <td id='HeaderButtonIconsTDId'><script>try {var gHeaderButtonHTML=document.getElementById("HEADER_BUTTON_HTML");if(!pega.u.d.bModalDialogOpen){document.getElementById('HeaderButtonIconsTDId').innerHTML = gHeaderButtonHTML.innerHTML;}} catch(e) {}</script></td><td><input type="hidden" id="HeaderButtonSectionIndicator" value="SubSectionPrismActionItemLinksB" /></td></tr></table></td></tr></table></span></div><div class='header-right'></div></div></div><div section_index='1' id='EXPAND-INNERDIV' class='layout-body clearfix' ><div bSimpleLayout='true' class='content layout-content-simple_list content-simple_list ' ><div style='' class='content-item content-field item-1 ' STRING_TYPE='field' RESERVE_SPACE='false'><div class='content-inner '><div class='field-item dataValueWrite'><script type="text/javascript">/**/</script><div id='div-menu-1510616504617' style='display:none;'></div><script
  5. Indeed Chrome does work in the same fashion as Firefox and your notes proved to be very helpful for navigating a web page. Following your instructions will allow me to search for a button and then press on it using the Enter or Space key. There are a few instances where I haven't gotten this to work... if there is an element on the screen that is clickable, but not really a button per se, then pressing Enter or Space will not do the trick. I cannot figure this one out. Am I missing something really obvious?
  6. I'm trying to revisit some of the ideas from this post so that I can make my macros run with greater reliability. This post mentions "searching for text on the screen" followed by a way to get to that text using tabs or pixel colors. I like this idea, but I cannot figure out how to implement it. My macros primarily run in Chrome and I could perform a search for specific text using Ctrl+F, but how would I then get to that word? The only method I can think of is to have the mouse move a few pixels at a time until it finds the right color, but I can see this being a pain because of 1) false positives and 2) potentially having to look all over the screen for the right color. To address the former problem, I imagine that there's some extension available to change the highlighted text from orange/yellow (default in chrome) to a more unique color. Any advice is appreciated.
  7. Thank you for the feedback. I was recently reminiscing about playing games on my old Tandy 2000 and how you would have to calibrate the joystick every time you use it. I used this idea to set specific anchor points from which my mouse will move relative to that point. My thought is that when the elements deviate slightly from where they used to be, I will just have a script (haven't go that this part yet) to quickly change the coordinates of 4-5 anchor points. I would have liked to incorporate more tabbing into my macros, but it was not working as I had hoped and this new solution seems fine for the moment. I appreciate all the input.
  8. I use MEP to automate tasks at work. One of the primary apps that my macros run in is a Java program in IE. For some reason, whoever is in charge of maintaining this application periodically makes slight, seemingly useless modifications to the layout of the program and as a result, all of my macros that require a click will be off by a few pixels. Sometimes this makes no difference, but other times it's the difference between clicking on a button or not clicking on a button. Needless to say, it is infuriating because it renders most of macros useless. I've tried to use the 'Get Control' function, but the utility is not able to recognize any buttons in the application that I am using. In addition, sometimes I am not wanting to click on a button at all. Is there anything that you might suggest I think about when addressing this problem?
  9. Use clipboard to run macro

    This method worked perfectly! It took me a while to get the hang of using it and truth be told, I am not even that well versed in using arrays either, but I was amazed at how a few lines of code combined with a tab delimited document made this whole thing really easy. I was also worried about the ASCII file process taking too long to and slowing down the macro, but that wasn't an issue either. Thanks Cory and others for valuable suggestions. I can see myself using this method for other applications as well.
  10. I am trying to build some logic into my macro that would select a string of text, copy it to the clipboard, and then run a specific macro based on what is stored in the clipboard (or a variable that was set to the clipboard content). So far, I have created a bunch of code like this: If Clipboard contains "brown" Variable Set String %macroname% to "brown" End If Macro Run: %macroname% This definitely works, but as I have a few thousand macros that could potentially be run, I am hesitant to continue doing it this way. Any ideas on an alternate approach to accomplish the same thing?
  11. Text Box Display - erratic

    One thing that I think is weird is that the background application predictably takes focus or brings itself to the front. For example, when a certain box pops up to prompt the user to enter a value, I will input the value and press enter, but the background window will predictably bring itself to the front, forcing me to alt+tab and the press enter on the pop up box in order to continue the macro process. While I initially thought that this issue was caused by the background Java app randomly (random to me anyway) wanting focus, now I am thinking that there is something else at the root of the issue... still not sure what that would be, but I feel as though it is fixable somehow.
  12. Text Box Display - erratic

    I read through these posts and am not sure if it helps with my situation... my work recently switched from using a stand-alone application to a similar one that runs as a Java application in IE. I hate it. My macros require a lot of text box displays and user prompts to enter variable values, and even though I have the "always on top" and "keep focus" focus checked, it's like the Java app DEMANDS attention and retakes focus. I should note that the prompt does stay on top, it's just that it loses focus. Very annoying... any ideas on how to change this behavior?
  13. Output phrase with proper grammar

    Thank you both! very helpful
  14. I am trying to use a multiple choice menu where multiple answers can be selected. I would then like to use these answers to output a phrase that has correct grammar. For example, if the multiple choice options are A, B, C, X, Y, Z... the output could be something like: "The answer is A, B, and C" "The answer is Z" "The answer is B, X, Y, and Z" I can't seem to wrap my head around this problem. Any guidance is much appreciated.