Jump to content
Macro Express Forums

stevecasper

Members
  • Posts

    570
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by stevecasper

  1. To be honest, this gave me motivation to streamline my process anyway. I have a bunch of macros that act as Multiple Clipboards. Certain info is always hooked to specific clipboards. I have been meaning to start hanging customer names to one, but have been too lazy. I always have SR numbers on a hook, so this issue gave me a good reason to update some of my macros that relied unnecessarily on prompts. i.e. for this macro, I always ran the paste macro to enter the SR number into the prompt... so I was already wasting effort But I will take your suggestion to heart. I'll reach out to ISS through the feature request/bug report process and hope others do the same. I don't dislike the new function, but I can't imagine we're the only ones who have been impacted and had to make our processes more complicated to adjust to it. Thank you for your fix!
  2. OooooOOOooOOoo That was my problem. I was running the 'fix' from the primary, but it was also being activated 'naturally' by the prompt window itself. I pulled the Macro Run commands out of the primary, and that fixed Problem 1. Problem 2 (extra carriage returns) I resolved by prepending a <BACKSPACE> to the <TAB><ENTER> (the troublesome carriage returns were being generated by me hitting Enter to allow the 'fix' to proceed. Problem 3 (new problem introduced by the fix) was fixed by adding a delay between the first and 2nd prompts. Working Primary <VARIABLE SET STRING Option="\x01" Destination="%T[1]%" Prompt="What is the customer's name?" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/> <DELAY Flags="\x01" Time="0.25"/> <VARIABLE SET STRING Option="\x01" Destination="%T[2]%" Prompt="What is the Service Request Number?" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/> <TEXT TYPE Action="1" Text="Hello %T[1]%, \r\n\r\nI just wanted to follow up with you on service request: %T[2]%. I haven’t heard from you since my last correspondence and I wanted to see if you wish to continue working on this issue. Please contact me at your soonest convenience by replying to this email. I look forward to working with you towards a resolution on this service request. \r\n\r\nThanks,"/> Updated 'fix' <WAIT FOR KEY PRESS Key="ENTER" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="<BACKSPACE><TAB><ENTER>"/>
  3. I've been absent from the forums for a long time, but the new "feature" that allows multiple lines to be entered into the "prompt for variable" has brought be back seeking a solution to the impact this has on my work flow, and I saw this post. I want to 100% echo this sentiment. Cory has been an amazing resource for resolving just about every technical/syntactical issue I've had with ME and MEP for probably the past 15 years.
  4. Hey Acantor, Thanks for the work-around, though I am running into a problem with it that doesn't seem to make sense. I've built the 2nd macro and it runs fine when the Enter String Value prompt pops up. I enter my prompted value and press enter, the prompt goes away, but the first macro just sits there until I press Enter again. It's like the 2nd macro is running twice. What's worse is that it ends up adding a bunch of carriage returns into the text editor (notepad++, if that matters) when it pastes the info over. Here's my code so you (or anybody else) can tell me what I'm doing wrong. Primary Macro <VARIABLE SET STRING Option="\x01" Destination="%T[1]%" Prompt="What is the customer's name?" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/> <MACRO RUN Use_ID="FALSE" Name="Enter String Value feature fix" ID="-1" Wait="TRUE"/> <VARIABLE SET STRING Option="\x01" Destination="%T[2]%" Prompt="What is the Service Request Number?" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/> <MACRO RUN Use_ID="FALSE" Name="Enter String Value feature fix" ID="-1" Wait="TRUE"/> <TEXT TYPE Action="1" Text="Hello %T[1]%, \r\n\r\nI just wanted to follow up with you on service request: %T[2]%. I haven’t heard from you since my last correspondence and I wanted to see if you wish to continue working on this issue. Please contact me at your soonest convenience by replying to this email. I look forward to working with you towards a resolution on this service request. \r\n\r\nThanks,"/> Secondary "fix" Macro <WAIT FOR KEY PRESS Key="ENTER" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="<TAB><ENTER>"/> This new bug feature is going to mess with my work-flow (I use a lot of templates that prompt for values). It will probably be faster and easier for me to just learn to Tab-Enter (or Tab-Space, more likely) by default rather than track down every macro I have that uses a variable prompt and add in this extra Macro Run command. Hopefully Insight is paying attention and pushes an update that either reverts this or makes the 'multiple lines' feature optional. I'd be okay with a "ctrl+enter = OK" solution like so many other applications support. Thanks for anything you might be able to add to this. Steve
  5. Hahah, yeah, I noticed that, too. That's just how my clipboard copied it from MEP. I just highlighted the commands and used keyboard shortcuts for Copy/Paste. Alternatively, the right-click context menu offers Copy Command Text, which gives us the simplified output. I was just being lazy and using ctrl+c / ctrl+v. Text Type (Simulate Keystrokes): <ALT><ENTER> // Properties for desktop icon Delay: 500 milliseconds Text Box Display: Confirm Alt Enter Worked Text Type (Simulate Keystrokes): <ALT>c // Change icon... Delay: 500 milliseconds Text Box Display: Confirm Alt C Worked Text Type (Simulate Keystrokes): <ALT>s // Select an icon from the list below Delay: 500 milliseconds Text Box Display: Confirm Alt S Worked Text Type (Simulate Keystrokes): <HOME> // Select the icon in the top left Delay: 500 milliseconds Text Box Display: Confirm HOME Worked Text Type (Simulate Keystrokes): <ENTER> // OK Delay: 500 milliseconds Text Type (Simulate Keystrokes): <ENTER> // OK
  6. "Macro Stop" stops the macro. There's no way to continue beyond that command. That's why acantor suggested adding Macro Stop, testing, and then moving that command down to to the next command, testing, etc. However, I see from your screenshot exactly what's wrong. Your 1st command was copied into your macro from acantor's cleartext explanation of what his macro does. The actual first command for the macro is Step 3 of your macro. I would recommend deleting what you have for commands 1 and 2. I personally don't use Macro Stop for troubleshooting line by line. Instead, I use Text Box Display commands personalized for which line I'm on. I may add specific values/variables into the text box to make sure everything is the way it's supposed to be. And this way, usually, I can just continue on to the next step without having to modify the macro every step of the way. I've just confirmed that Ctrl+1 does not affect this macro at all. <TEXT TYPE Action="0" Text="<ALT><ENTER>" _COMMENT="Properties for desktop icon"/> <DELAY Flags="\x02" Time="500"/> <TEXT BOX DISPLAY Title="Confirm Alt Enter Worked" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <TEXT TYPE Action="0" Text="<ALT>c" _COMMENT="Change icon..."/> <DELAY Flags="\x02" Time="500"/> <TEXT BOX DISPLAY Title="Confirm Alt C Worked" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <TEXT TYPE Action="0" Text="<ALT>s" _COMMENT="Select an icon from the list below"/> <DELAY Flags="\x02" Time="500"/> <TEXT BOX DISPLAY Title="Confirm Alt S Worked" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <TEXT TYPE Action="0" Text="<HOME>" _COMMENT="Select the icon in the top left"/> <DELAY Flags="\x02" Time="500"/> <TEXT BOX DISPLAY Title="Confirm HOME Worked" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="OK"/> <DELAY Flags="\x02" Time="500"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="OK"/>
  7. Did you control for the "Macro Stop" at the point where the Properties window opens but before the macro presses HOME? While there can be conflicts between Windows system and Macro Express hotkeys, I've never encountered them when using Ctrl+1. In fact, I've used Ctrl+1 through Ctrl+0 for decades (under Keyboard Express, then non-pro Macro Express, initially) as Copy commands for multiple clipboards and the corresponding Alt keys for the Paste function.
  8. Took your suggestion to heart: <COMMENT Value="Establish Multiple Choice Defaults (optional)"/> <VARIABLE SET STRING Option="\x00" Destination="%Selection%" Value="MEProTest Folder&1" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%Type%" Value="A" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%Title%" Value="Name This Document" NoEmbeddedVars="FALSE"/> <COMMENT Value="Choosing Where and How to save."/> <VARIABLE SET STRING Option="\x01" Destination="%Title%" Prompt="File Name" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/> <MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%Selection%" Title="Save this where?" Prompt="Choose a desitnation folder." Options="MEProTest Folder&1\r\nMEProTest Folder&2" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/> <MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%Type%" Title="Save this as?" Prompt="Choose a file type." Options="&Word Document\r\n&PDF\r\nPlain &Text" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%Selection%" ToReplace="&" ReplaceWith=" " All="FALSE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <COMMENT Value="For the purpose of this macro, I've created two folders that are both in the D:\\ drive, but if the macro complexity were to scale, this next variable could be set as part of the earlier Multiple Choice menus."/> <VARIABLE SET STRING Option="\x00" Destination="%Directory%" Value="D:/%Selection%" NoEmbeddedVars="FALSE"/> <TEXT TYPE Action="0" Text="<F12>" _COMMENT="F12 is the \"Save As\" shortcut in the latest versions of Word."/> <WAIT FOR WINDOW TITLE Title="Save As" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/> <TEXT TYPE Action="0" Text="%Directory%\\%Title%"/> <IF VARIABLE Variable="%Type%" Condition="\x01" Value="A" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="<TAB>"/> <IF VARIABLE Variable="%Type%" Condition="\x00" Value="B" IgnoreCase="FALSE"/> <TEXT TYPE Action="0" Text="p"/> <TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/> <ELSE/> <TEXT TYPE Action="0" Text="pp"/> <TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/> <END IF/> <END IF/>
  9. Well, here's what I came up with. Word is kind of a nightmare to work with from a Macro standpoint. <COMMENT Value="Establish Multiple Choice Defaults (optional)"/> <VARIABLE SET STRING Option="\x00" Destination="%Selection%" Value="MEProTest Folder&1" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%Type%" Value="A" NoEmbeddedVars="FALSE"/> <COMMENT Value="Choosing Where and How to save."/> <MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%Selection%" Title="Save this where?" Prompt="Choose a desitnation folder." Options="MEProTest Folder&1\r\nMEProTest Folder&2" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/> <MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%Type%" Title="Save this as?" Prompt="Choose a file type." Options="&Word Document\r\n&PDF\r\nPlain &Text" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%Selection%" ToReplace="&" ReplaceWith=" " All="FALSE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <COMMENT Value="For the purpose of this macro, I've created two folders that are both in the D:\\ drive, but if the macro complexity were to scale, this next variable could be set as part of the earlier Multiple Choice menus."/> <VARIABLE SET STRING Option="\x00" Destination="%Directory%" Value="D:/%Selection%" NoEmbeddedVars="FALSE"/> <TEXT TYPE Action="0" Text="<F12>" _COMMENT="F12 is the \"Save As\" shortcut in the latest versions of Word."/> <WAIT FOR WINDOW TITLE Title="Save As" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/> <TEXT TYPE Action="0" Text="<ALTD>d<ALTU>" _COMMENT="Alt+D is the shortcut to the file directory"/> <TEXT TYPE Action="0" Text="%Directory%<ENTER>"/> <TEXT TYPE Action="0" Text="<ALTD>t<ALTU>" _COMMENT="Alt+t is the shortcut to the File Type menu"/> <IF VARIABLE Variable="%Type%" Condition="\x00" Value="A" IgnoreCase="FALSE" _COMMENT="Word (default type)"/> <TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/> <ELSE/> <IF VARIABLE Variable="%Type%" Condition="\x00" Value="B" IgnoreCase="FALSE" _COMMENT="PDF Type"/> <TEXT TYPE Action="0" Text="p"/> <TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/> <ELSE/> <TEXT TYPE Action="0" Text="pp" _COMMENT="Plain Text Type"/> <TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/> <END IF/> <END IF/> This macro could possibly utilize Controls, but I found them to be inconsistent (and possibly broken) when testing in Word. I've never had much luck with them in general, to be honest. Another approach I thought of after finishing this macro would be to use another Set Variable prompt where you'd give the file it's name, and then rather than specifying the file type with a series of If > Else commands, the file type is just appended to the file name. But this doesn't work (I tried it). FileName.pdf saves as FileName.pdf.docx
  10. Thanks, acantor I peek in from time to time when I need a quick refresher on how to do something and don't feel like going through trial and error to figure it out for myself. Especially when I know it's something that should be simple. But I so rarely have enough free time to participate anymore. Oddly enough I saw a string of posts with "challenge" in the title and that motivated me to find some time (it was Easter weekend... I made time to relax). I really wanted to find a way to incorporate ASCII or Text File Begin/End loops, but gave up on that approach right away. It's been too long since I've had to build one from scratch, and don't use them very frequently anymore in my day-to-day macros (not sure if any of my current day-to-days even use them). Since we're not playing with formatted, structured tables or whatever, I don't think they would have really been much use anyway. I don't think I'd ever used a Boolean variable in a macro before, but as I was attacking this problem, Boolean just made sense. The real struggle for me was the non-space special characters. I'd have it almost dialed in except it would either ignore (or duplicate!) any text following a special character. I'd come up with something that I was 99% sure would fix the problem... and it generally fixed the problem by ignoring the rest of the macro. I came up with some pretty complex ways to generate a text file that was identical to the original text . I may take a look at some of your earlier challenge posts just to see what's there and throw in my ideas (if I have any). From prior experience, if Cory takes a stab at a problem, he inevitably comes up with the superior solution.
  11. I haven't been on the forums in a while, but just wandered in over the weekend and saw this challenge. And put myself to work on it. This is what I came up with. I didn't look at the other posts until after I had gotten this one working, and I already see that mine is probably not as good or elegant as others already posted, and while there are some things that came out the same, I did take a slightly different path. I sure enjoyed the challenge! 😀 <COMMENT Value="Setting it All Up"/> <VARIABLE SET STRING Option="\x00" Destination="%Alphabet%" Value="abcdefghijklmnopqrstuvwxyz" NoEmbeddedVars="FALSE" _COMMENT="These are the characters we will ONLY keep if they are at the beginning of a word, or are following a special character."/> <VARIABLE SET STRING Option="\x02" Destination="%Unedited%" NoEmbeddedVars="FALSE" _COMMENT="Copy the Original Text to clipboard before Running this macro."/> <VARIABLE SET TO ASCII CHAR Value="13" Destination="%CR%"/> <VARIABLE SET TO ASCII CHAR Value="10" Destination="%LF%"/> <VARIABLE SET STRING Option="\x00" Destination="%CRLF%" Value="%CR%%LF%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%Unedited%" ToReplace="%CR%%LF%" ReplaceWith="¬" All="TRUE" IgnoreCase="TRUE" NoEmbeddedVars="FALSE" _COMMENT="Replacing carriage returns and linefeeds with a nonsense character."/> <VARIABLE SET INTEGER Option="\x0D" Destination="%SizeOfUnedited%" Text_Variable="%Unedited%" _COMMENT="Length of the text will tell the macro when to stop."/> <VARIABLE MODIFY STRING Option="\x09" Destination="%FirstLetter%" Variable="%Unedited%" Start="1" Count="1" NoEmbeddedVars="FALSE" _COMMENT="Assuming the first character will always be kept, so not including it inside the Repeat function."/> <VARIABLE SET STRING Option="\x00" Destination="%LastLetter%" Value="%FirstLetter%" NoEmbeddedVars="FALSE"/> <COMMENT Value="//"/> <COMMENT Value="Putting the \"Kept\" characters/symbols directly into a text file rather than a variable so I can troubleshoot in 'real time' with a File Explorer with Preview enabled."/> <VARIABLE MODIFY STRING Option="\x11" Destination="%FirstLetter%" Filename="D:\\Edited Story.txt" Strip="FALSE" NoEmbeddedVars="FALSE" _COMMENT="This command creates the .txt file from scratch, even if it previously existed from prior runs."/> <VARIABLE SET BOOL Destination="%UseIt%" Command="263" Value="FALSE"/> <COMMENT Value="Start the Filter"/> <REPEAT START Start="1" Step="1" Count="%SizeOfUnedited%" Save="FALSE"/> <VARIABLE MODIFY STRING Option="\x0A" Destination="%unedited%" Start="1" Count="1" _COMMENT="Remove the most recent character from consideration."/> <VARIABLE MODIFY STRING Option="\x09" Destination="%NextLetter%" Variable="%Unedited%" Start="1" Count="1" NoEmbeddedVars="FALSE" _COMMENT="Check the next character"/> <COMMENT Value="Step 1:\r\nIf the character is in the Alphabet, %UseIt% will be False\r\n\r\nIf it is not in the Alpahbet, %UseIt% will be True and %special% will retain that character for future consideration."/> <IF VARIABLE Variable="%Alphabet%" Condition="\x07" Value="%NextLetter%" IgnoreCase="TRUE"/> <VARIABLE SET BOOL Destination="%UseIt%" Command="263" Value="TRUE"/> <VARIABLE SET STRING Option="\x00" Destination="%special%" Value="%NextLetter%" NoEmbeddedVars="FALSE"/> <ELSE _COMMENT="Step 1a)\r\nI struggled with differentiating spaces from other special characters. I may have found a way around it, but am leaving this in as an OR statement."/> <IF VARIABLE Variable="%LastLetter%" Condition="\x00" Value=" " IgnoreCase="FALSE"/> <OR/> <IF VARIABLE Variable="%LastLetter%" Condition="\x00" Value="%special%" IgnoreCase="FALSE"/> <VARIABLE SET BOOL Destination="%UseIt%" Command="263" Value="TRUE"/> <ELSE/> <VARIABLE SET BOOL Destination="%UseIt%" Command="263" Value="FALSE"/> <END IF/> <END IF/> <COMMENT Value="If our Boolean is True, we want to keep the special character only if it is NOT a carriage return. I found that while a carriage return shows up in String variable as \"\", it was not treated as \"\" when performing If Variable checks."/> <IF VARIABLE Variable="%UseIt%" Condition="\x00" Value="True" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%NextLetter%" Condition="\x01" Value="¬" IgnoreCase="FALSE"/> <VARIABLE MODIFY STRING Option="\x12" Destination="%NextLetter%" Filename="D:\\Edited Story.txt" Strip="FALSE" NoEmbeddedVars="FALSE"/> <END IF/> <IF VARIABLE Variable="%NextLetter%" Condition="\x00" Value="¬" IgnoreCase="FALSE" _COMMENT="And here we re-add the CR/LF back to the .txt file so our output can maintain its structural integrity."/> <VARIABLE MODIFY STRING Option="\x12" Destination="%CRLF%" Filename="D:\\Edited Story.txt" Strip="FALSE" NoEmbeddedVars="FALSE"/> <END IF/> <VARIABLE SET STRING Option="\x00" Destination="%LastLetter%" Value="%NextLetter%" NoEmbeddedVars="FALSE"/> <VARIABLE SET BOOL Destination="%UseIt%" Command="263" Value="FALSE"/> <END REPEAT/> <TEXT BOX DISPLAY Title="Modifications Complete" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Lucida Fax;}}\r\n{\\colortbl ;\\red128\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\b\\f0\\fs44 Done!\\cf0\\b0 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
  12. Hey everybody! I know it's been years since I've posted, and I've missed this place a lot. I changed jobs and my new employer didn't want to automate anything. Anyway, I've moved again and now I have a forward-thinking, efficiency-driven employer once again, who has allowed me install MEP on my machine. Not less than 24 hours later I started running into an issue that I'm hoping can be fixed. It's been so long since I had to build a macro from scratch that I may just be missing something obvious, but it also may be a limitation of Windows (or of my machine due to Administrative lockdowns). Here we go: I have a timekeeping program that I have to run at the end of the day. I'm not trying to automate that program, specifically, but I am trying to automate the launching of the program. Here's the process and the problem. I use a Launch command to launch the program. I use a Macro Run command to input the User ID and Password (I have a password macro that enters passwords for me so I don't have to remember all of them as they each have different security level requirments and min/max characters) I have tested to make sure that the macro is not getting stuck in the called "password" macro... it is returning successfully to the parent "launch" macro. At this point, the computer always gives a User Account Control prompt. I can't seem to find any way to eliminate that prompt, and MEP seems to completely ignore that window when I use Wait for Window, Activate Window, or even if I just put in a delay followed by a Text Type <ENTER> to move past that prompt. There are more problems after this one, such as Java prompts that the macro also appears to be ignoring, but this is the one that I need to know right up front if MEP has the ability to manipulate or not. I tried to get a screenshot of the prompt, but for whatever reason I couldn't do that, either. Any thoughts?
  13. Okay, I have found a consistently successful work-around for my problem. And I've got to be honest, I don't know how this could possibly make a difference (if it is my computer and not MEP), but it does. <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\MEPVariables\\Clipboard001" Destination="%cb%"/> <VARIABLE MODIFY STRING Option="\x10" Destination="%cb%"/> <CLIPBOARD PASTE/> I honestly believe my computer must be contributing to the problem, but I can't help but think there is something wrong with the Text Type > Use Clipboard to Paste function, since the Clipboard Paste command works just fine. Anyway, the work-around is simple, if not quite as elegant as I would like, and for now it seems I only really have to worry about it on my own PC. Thanks to everybody for looking at the issue and giving me pointers.
  14. I was wrong: I was looking at something else that is set at 300. The paste was set at 20. I've now adjusted this, increased it to 300. This definitely slowed the macro down considerably. And yet, I still ended up with: I love my computer... why can't it play nice?
  15. Thanks for the input, Cory. I had thought about that, but the destination application doesn't appear to be the issue in this case. I experience it in Notepad, Excel, IE, Chrome, etc. btw I got your email, when I get a sec I'll take a closer look at the vbscript. Thanks!
  16. ME3 does not experience this issue. It is, however, much much slower
  17. I take it back. Results are similar - if not identical - on other clipboards. I adjusted the paste macro, adding a counter to the repeat and adjusting the pasted text. <REPEAT START Start="1" Step="1" Count="100" Save="TRUE" Variable="%N[1]%"/> <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\MEPVariables\\Clipboard002" Destination="%cb%"/> <TEXT TYPE Action="1" Text="%N[1]% - %cb%\r\n"/> <END REPEAT/> Clipboard 1: Clipboard 2:
  18. Thanks Kevin. I checked this, and it was set at 300. I adjusted it by multiples of 10 as high as 30,000, with no improvement - in fact I didn't notice any change whatsoever in any of the clipboard-related macros I tried - and before you ask: Yes, I made sure that I saved my changes ) I did however discover something: Apparently I had only tried my "Clipboard 1" macro. I don't seem to be experiencing any problems with clipboards 2-10. I cannot imagine why this is, however, as I have changed the activation for clipboard 1 - originally set to Alt+1, but changed to Alt+Q - without any improvement. Also, the macro actually runs - as demonstrated with the repeat test-version. So the activation itself isn't likely the cause. The application I'm pasting into for the tests is a simple notepad.exe, though I experience it when pasting into anything (Excel, fields in browsers, text boxes like the one I'm typing in right now, etc). It's the most bizarre bug - and I really don't think it's MEP. I'm going to test it in ME3. Will report back.
  19. Ugh, so I just tested it on my wife's laptop (Windows Vista Ultimate 64 - Core 2 Duo - 2.0GHz - 4GB RAM). Works fine on hers. I guess it might be my machine. Any ideas how I could find the source of the error and fix it?
  20. I know I brought this up over a year ago, but can't seem to find the original thread. I use ME for multiple clipboards. Example: COPY <CLIPBOARD EMPTY/> <CLIPBOARD COPY/> <REPEAT UNTIL Variable="%cb%" Condition="\x01"/> <VARIABLE SET STRING Option="\x02" Destination="%cb%"/> <DELAY Flags="\x11" Time="0.5"/> <END REPEAT/> <WRITE REGISTRY VALUE Key="HKEY_CURRENT_USER\\MEPVariables\\Clipboard002" Destination="%cb%"/> PASTE <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\MEPVariables\\Clipboard002" Destination="%cb%"/> <TEXT TYPE Action="1" Text="%cb%"/> The COPY functions perfectly every time. So I'm not worried about that. The PASTE, however, constantly pisses me off. I run macros that pull information from various files across the network, and stores that information locally so that users can utilize the multiple clipboard function to paste it in wherever necessary. Quick example: Clipboard 1 contains: NAME Clipboard 2 contains: Street Address Clipboard 3 contains: City Clipboard 4 contains: State Clipboard 5 contains: ZIP It would be nice if exercising the paste function would work right. If I change the settings to keystrokes (rather than paste) it works perfectly. And for short things like names and states, it isn't a big difference - however, there are occasions where the amount of data being pasted is a bit larger (nothing the PC can't handle, and nothing ME can't handle), but typing it - even at ME speeds - takes forever by comparison. I've tried changing the storage from the registry to a simple text file in the temp folder - same exact results. I've tried adding delays between the read registry command and the text type command - no improvement. Here is the test I performed, in case anybody wants to try to duplicate my results. Use the following code: COPY <CLIPBOARD EMPTY/> <CLIPBOARD COPY/> <REPEAT UNTIL Variable="%cb%" Condition="\x01"/> <VARIABLE SET STRING Option="\x02" Destination="%cb%"/> <DELAY Flags="\x11" Time="0.5"/> <END REPEAT/> <VARIABLE MODIFY STRING Option="\x11" Destination="%cb%" Filename="C:\\Temp\\Clipboards\\0001" CRLF="FALSE"/> PASTE <VARIABLE SET STRING Option="\x03" Destination="%cb%" Filename="C:\\Temp\\Clipboards\\0001" Strip="FALSE"/> <REPEAT START Start="1" Step="1" Count="100" Save="FALSE"/> <TEXT TYPE Action="1" Text="%cb%\r\n"/> <END REPEAT/> This should paste the copied text 100 times. My results varied from once to 23 times. I can't be the only person experiencing this. FWIW: Windows Vista Ultimate 32 - Intel Core 2 Quad @ 2.66GHz - 4GB RAM
  21. The trick (besides learning VBScript - which I've been planning on doing "someday" forever) is making it happen without opening the worksheet. Example: I have a list of IP addresses 5 columns wide, 2000 rows deep. Column A is dedicated to the store number; B = Router IP; C = Server IP; D = Printer IP; etc. First, the macro prompts for Store Number, provided by the User, or perhaps grabbed from the trouble-ticket. Second, the macro prompts for the specific IP (router, server, etc.) Third, if the file were a .csv, the macro would process the file, locate the store, and provide the required IP. If I could find a way to make MEP process the spreadsheet exactly the same way as it processes text files, my life would be made simple. Even if I could just find a way to have the macro convert and save the file invisibly to a CSV located on the C: drive, that would be fine. ---- I'm thinking that I might just pre-arrange to have the .xls file pre-saved as .csv on my C: drive before the sales-pitch begins, just to keep things smooth. -----
  22. Hello all, Quite some time ago I asked the question: How do I convert an Excel file to a CSV invisibly? The answer pretty well came back in this Earlier Topic that I cannot do so. Ok, that's understandable, if disappointing. It was hinted at, in the above linked post, that I Joe was maybe working on some features for MEP that would make Excel more accessible to MEP. MEP can process the heck out of CSV files, but I can't figure out how to make it dig info from Excel. And I really need it to I'm wondering if there is any status update on that front. Thank you! NB: The key here is that I need it to work invisibly - I know I can have the macro process the Excel information if I open the WB and copy the info, but this would defeat the purpose of the macro I'm trying to build. I need to sell the idea of Macro Express to the Head Honchos, and this particular function should be a no-brainer.
  23. Hi Terry, I don't know if this will answer your question, but I've found that whenever I need a program to be a specific size and in a specific position upon launch, but don't want it to get adjusted every time I focus it (I do this with Notepad a lot - I want it to start in the bottom-right corner, but I may want to move it for various reasons), the easiest thing - for me - is to simply launch it with a macro. That way, it launches, gets sized and positioned, and then I don't have to concern myself with that macro fiddling with my windows anymore.
  24. Accidentally posted this to the ME3 board originally (though ME3 also displays this same behavior). For reasons I won't go into right now, I'm using a repeat command to increment a decimal's value. Because the "Modify Decimal" command doesn't offer an Increment option, I am using a very basic addition routine. %D[1]% starts with a value of .001 and on each run-through it adds .001 to the total. It works fine... until it gets to .072 .071 + .001 (according to MEP) = 0.0720000000000001 This continues until %D[1]%=.1, after that, it gets back to normal: .101, .102, etc. I built the same macro in ME 3.x and got the same result. Here's the relevant MEP Code: Variable Set Decimal %D[1]% to .001 Repeat Start (Repeat 75 times) If Variable %n[1]% Is Greater Than "69" Text Box Display: 1 End If Variable Modify Decimal: %d[1]% = %D[1]% + .001 If Variable %n[1]% Is Greater Than "69" Text Box Display: 2 End If End Repeat <VARIABLE SET DECIMAL Option="\x00" Destination="%D[1]%" Value=".001"/> <REPEAT START Start="1" Step="1" Count="75" Save="TRUE" Variable="%n[1]%"/> <IF VARIABLE Variable="%n[1]%" Condition="\x03" Value="69" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="1" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %d[1]%\r\n\\par \\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END IF/> <VARIABLE MODIFY DECIMAL Option="\x00" Destination="%d[1]%" Value1="%D[1]%" Value2=".001"/> <IF VARIABLE Variable="%n[1]%" Condition="\x03" Value="69" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="2" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %d[1]%\r\n\\par \\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END IF/> <END REPEAT/> Very strange. Any explanation? I did figure out a simple work-around: Add a second Modify Decimal line: Round to 3 decimal points. That seems to have fixed the issue. Follow-up Oh, and one other thing: If I start with %D[1]% = .018 or higher, the bug doesn't happen. Weird.
×
×
  • Create New...