Jump to content
Macro Express Forums

stevecasper

Members
  • Posts

    566
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by stevecasper

  1. 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
  2. "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"/>
  3. 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.
  4. 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/>
  5. 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
  6. 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.
  7. 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"/>
  8. 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?
  9. 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.
  10. 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?
  11. 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!
  12. ME3 does not experience this issue. It is, however, much much slower
  13. 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:
  14. 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.
  15. 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?
  16. 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
  17. 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. -----
  18. 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.
  19. 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.
  20. 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.
  21. Hello all, I haven't been on the forums much in the past year or so, mostly because I changed jobs and - much to my dismay - I now work for a company that automates virtually nothing. On top of that, they are so paranoid about... well, everything that they don't even let us plug stuff into our surge protectors, let alone install software which has not been previously and expressly approved on our machines. It is so bad here that I only very hesitantly asked my supervisor if there were any chance of getting approval for some ME licenses. Surprisingly, she told me to write a proposal, including cost/benefit analysis and she would take it to the powers that be. Getting to the point: I've used Macro Express for years... Originally using Keyboard Express starting in 2000, my company migrated to ME 3.x in '02 or '03, I believe. I have used it ever since, upgrading to MEP when it launched. I understand the benefits of the program very well, and can find a way to get it to do just about anything I need it to do - and when I am stumped, I know I can call on my PGM Forums friends and colleagues for input. The problem is, there are a lot of benefits of MEP that I've never used, which others on the board have. What I would like, if I may ask it, is for anybody reading this post to give me some very basic ideas of what you have been using ME for. Obviously, any tasks requiring boilerplate responses (with or without variables) would fit in this category. Also, if anybody has done any time/benefit analyses or has an effective way to estimate or calculate such a comparison, I would be very interested in something of that nature. To give a brief idea of the areas in my job where it would come in handy: We have a form with about a half-dozen drop down menus. This form must be filled out on every call. For some reason we cannot save preferred settings for these drop downs, even though they almost never change. ME can make this redundant step painless. We send out a number of boilerplate emails in order to update clients on the status of their tickets. Though canned responses are available in the system they say things like "Good <Enter Morning, Afternoon, Evening> <Enter Client's Name>," which is ridiculous and tedious to go through and delete. ME can eliminate the need to hunt down every variable and can fill in the blanks for me. There are a number of tasks where we are required to collect information from a .csv file, organize it, eliminate duplicates, reformat it, and save it to a separate drive. Insanely tedious. Takes about an hour to do the task each day, and with ME I imagine it would take a few seconds. There's more, but that's all that comes to mind immediately. Anyway, I want to thank everybody in advance for your suggestions and ideas.
  22. Thanks Cory. I knew this would be the case... it was more of a hopeful fantasy than an actual hope.
  23. I'm afraid I know the answer to this already, but I would be remiss if I didn't double-check. If I have my ME files on a flash drive, is there any way to run the .exe from various computers without having to purchase multiple licenses and downloading them to these computers? I'm sure the answer is a big "Negatory." Here's my reasoning: My new job won't allow me to download any software onto company computers, no matter how useful that software might be. Also, since we often have to bounce around from one PC to another, it would be nice to be able to take my license with me.
  24. Here's what I do when I can't be certain a path isn't going to change, or if a specific source file may be renamed by a 3rd party..... Maybe this won't suit your needs, Terry, but when I read the post, it sounded to me like you'd benefit from the Set String: Prompt for a filename command. It leaves setting the path in the hands of the user, so it's not going to be fool-proof, but you could probably add some code that compares the selected file against the name of the file that should be selected, and if the actual filename doesn't match, then the user didn't do what they were supposed to do. Ergo, you give a Text Box scolding the user, and telling them to try again; then "Macro Run: this macro" and Macro Stop [don't wait for this macro to finish] (or whatever), and they get to try again.
×
×
  • Create New...