Jump to content
Macro Express Forums

kunkel321

Members
  • Posts

    214
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by kunkel321

  1. Ah yes. That's what Cory meant when he mentioned the 'Update textbox' command. Here, this appears to be closer to what you're describing.. <VARIABLE SET INTEGER Option="\x05" Destination="%VarNum%" Minimum="4" Maximum="12"/> <TEXT BOX DISPLAY Title="Current Value" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs28 The variable, \"VarNum\" currently has the value %VarNum%. \\f1 (BEFORE LOOP)\\f0\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x02" Delay="0"/> <REPEAT UNTIL Variable="%VarNum%" Condition="\x02" Value="1"/> <DELAY Flags="\x01" Time="1"/> <TEXT BOX UPDATE Header="Current Value" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs28 The variable, \"VarNum\" currently has the value %VarNum%. \\f1 (DURING LOOP)\\f0\\fs20 \r\n\\par }\r\n"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%VarNum%" Value1="%VarNum%" Value2="1"/> <END REPEAT/> I made the text bigger so I could see it. Also, I got rid of one of the delays and put (BEFORE) and (DURING) in the dialogs, so you can actually see when the loop kicks-in. Tip: Remember that MacExpPro has an excellent context-smart help system. For example when you are editing a command such as 'update textbox' you can press "F1" and it will go right to that section of the help file.
  2. Here, this one seems to work as expected. I didn't have an activation... Just played it from the play button on them MacroExplorer (blue triangle button). <VARIABLE SET INTEGER Option="\x05" Destination="%VarNum%" Minimum="4" Maximum="12"/> <REPEAT UNTIL Variable="%VarNum%" Condition="\x02" Value="1"/> <MESSAGEBOX Caption="Current Value" Message="The variable, \"VarNum\" currently has the value %VarNum%. " Icon="0"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%VarNum%" Value1="%VarNum%" Value2="1"/> <END REPEAT/>
  3. It looks like you have the Repeat command right inside the textbox. I suspect your setup will need to be more like: Set Number Variable (NumVar) to random number. Repeat until NumVar is less than 1. -Textbox: Loops remaining is %NumVar% -Modify variable NumVar by "-1" End repeat Or something like that. (I haven't actually tried this.)
  4. I believe Clipmate is still "alive" though it hasn't been updated in years. If you're copying from Word, then back in to Word, VBA might be the way to go. And/or, Words native Quickparts feature...
  5. Did you try dissecting the sample macros that get installed with MacExpPro?
  6. I don't know much about arrays, but I'm trying to recreate this... Line 18 in your code refers to a comma-separated values (.csv) file. I'm guessing that's what the bottom part of your post is(?) If I paste it into a text editor though, it appears to be tab-delineated... Maybe MacExPro treats those the same (I don't know?) If not though, it could be that the entire csv file is treated as one value, since there are no commas... Maybe? EDIT: Actually I see that MacExPro has options for CSV or Tab-Delineated .TXT. I tried both, putting your data on my desktop and pointing line 18 to the files. There was no error message, but it didn't do anything else either... At least nothing that I could see. (FYI I was able to convert you data to CSV by pasting it into Excel, then doing Save As csv.)
  7. Doesn't Rot13 merely replace abc with nop and replace nop with abc -- Or does it do other stuff too?? It seems like you could make a macro do this... Once a string was in a variable, do "modify string" and replace one letter at a time. It wouldn't be any good to just replace all of the 'a' chars with 'm' because later when you change the 'm' chars to 'a', the macro wouldn't know which m's to change into 'a' chars. It would take a bit of trickery to get around this...
  8. I'm not an expert--so other people can give a better answer. But I'm wondering, what do you mean when you say "after a few clicks?" What are you trying to make the macro do? Are you sure that you didn't accidentally have the 'Scope' set to something other than 'Global?'
  9. One thing to try: From the list of macros in the macro explorer, right-click on it and choose 'copy.' You'll have to give it a new name and trigger, but the code will all be the same.
  10. I'm not familiar with the iOS side of things, but most PC based browsers let you export your bookmarks from within the bookmark manager. I think they get exporter/saved as a standard HTML file, so maybe you could import that into Safari (?)
  11. Good to know. Thanks for the follow up. I also recall that I had to stop using Actual Window Manager due to a similar problem in Chrome. Maybe I'll reinstall, and try your suggested fix.
  12. I haven't worked with variable arrays, but I wonder if this would be a good use for one. Like collecting and storing all the lines of text, and then going to the web page and entering them all. ...as opposed to getting a line of text, making your browser active, pasting in the single line of text, going back to your text file, and so on. When you say you're entering them in "a text entry box" on a webpage, what do you mean? Is it a series of boxes, and one line of text for each box; or do you paste the value, then click a button, then paste the next value into the same box? I think the second one would be much slower. Edit: I see now (from your second post) that it is the latter. Probably you have to press <Tab> then <Enter>. You may also have discovered that Shift+Tab jumps you back up to the text box. Depending on the website, there might be ways to have MacEx wait for the site to be ready for the next entry. Maybe the window title changes, or maybe the text cursor changes.
  13. I'm not a programmer, so others can probably give better answers... I think most implementations have Repeat Until Some steps to do End Repeat. This loops until the "repeat until" is satisfied. You can also have conditional exit points inside the loop. Repeat Until Some steps to do -Does %Var% = XYZ? ---if yes, Break ---otherwise keep going End Repeat. In the Sample Macros file that ships with MEpro is a macro called Repeat Until that uses this "if yes, Break" setup. You can open and dissect it. Note Also: MEp has a pretty good context-sensitive help system. SO you can (for example) click on the End Repeat command in the code or in the list of commands, and press the <F1> button. That section of the help file will popup.
  14. You probably have already thought of this... But have you tried embedding the formatting information in different ways in the multi choice box? For example with accelerator keys, such as Allegr&o &Allegro Would appear as Allegro Allegro But each would appear as just Allegro when it was sent to a variable from the multi choice box. Also, maybe tag1Allegro tag2Allegro Then Variable Modify String > Delete part of text after the variable is sent from the multi box.
  15. Wow, very cool! I'm curious, how many commands are in your 3 scripts? Looking at your video, it seems like there must be hundreds.
  16. Well that's some good left-brain exercise there! LOL. Not sure I'm understanding... Also as Cory recommends, reworking your logic flow might be good. Nevertheless: I see that there is a Macro Stop command. If you select it and press F1, you'll get the relevant page in the help file. There is a note at the bottom that suggests you can put the Macro Stop command in there, and the macro will continue to play to the end... I'm not sure how that even works, as I have never used the command.
  17. Regarding checking for letters: I see that you can change a string from lower- to upper-case and vise versa. You could save copies of the sting, to var1 and var2, then make var1 UPPER and var2 lower and compare the two using the 'case-sensitive' option. If they're the same--no letters. ...wouldn't detect numbers or special characters though...
  18. It's been a couple years since I googled this topic, but I seem to recall that there are programmatic reasons that no single utility can list all or the possible hotkey assignments...
  19. Some good thoughts here on pixel testing. It occurs to me that, with rbert's example of sampling a few specific points, you might have a problem if the zoom factor of the page were ever changed, then the points might be at different locations. This might be a good use for "Ctrl+0" which would set the page to 100% zoom. In my last post (above), I mentioned the other thread, "Issues navigating in browser." It occurs to me that, using the method discussed there, you might be able to identify a form. If a particular web form has a unique phrase such as "Referral," then you could do Ctrl+f, type "referral," then Esc. If the word is found it would (i.e. should) be left highlighted. You could then copy to clipboard, and check if the clipboard = "referral." This would be really cludgy and I would hate it. Still though, should work in theory.
  20. Good to know! I didn't even realize WCAG was a thing.. I'll suggest this to the developers. As I look closer, I see that there actually is a difference in the URL when I go to different forms. Unfortunately the difference appears to be a random number such as "document?q=3BOJIA9BUU." I compared a bunch of them and there doesn't seem to be a pattern. I like your pixel-sampling work-around. How long does it take to scan a normal sized window though?? Interestingly, the other topic on this forum "Issues navigating in browser," overlaps a bit with this one. For example using Ctrl+f to see if certain words are on a page. I don't think it's possible for MEp to "see" whether or not anything was found though. Another interesting thing: In Chrome, if you press F12, you can see the actual code of the webpage and search it. Again though, I'm not sure that you can utilize this with a Macro (also you might not want to mess about in the code of webpages).
  21. I like the Alt+d tip. Another good one is Ctrl+0, which sets the zoom to 100%. I'm not sure how you'd use that in a macro though. Regarding the top post, I do wish there was a way to make the macro "identify" the form. For example with my above-pasted special education form text, there are a couple different types of forms. "Referral for testing" which will be one of multiple different scenarios, or "results of testing" which will be one of multiple different scenarios. I'd like the macro to "see" which form I have open, and only offer text templates relevant to that form. With the web database I use, the window title never changes and the URL never changes.
  22. Yep. I use macros on webforms a lot. I find that navigating with the keyboard, is the way to go. Some tips: Tab to the droplist, then press "m" to go right to "mammogram." Or, if mammogram is the 4th thing in the list that starts with a m, then press "mmmm." Tab to a checkbox or radio button and use <Space> to check/uncheck or select the item. Shift+Tab will jump backwards, though I never use that in macros. Here's an example of some text that might get sent to the webform: <CTRLD>a<CTRLU><DELETE>Please find the attached consent-for-evaluation form. Upon receipt of %txtName%'s consent-for-eval form we will begin the evaluation process. Remember that this consent form is only for the evaluation. If %txtName% does qualify for an Individualized Education Program (IEP), then you'll need to sign an additional permission form for us to start %txtHisHer% services. Please call if you have any questions. Stephen Kunkel, School Psych @ %TxtSchool% <TAB><TAB><CTRLD>a<CTRLU><DELETE>No other options were applicable. A file review and input from parents and staff suggest that an evaluation is appropriate at this time. <TAB><TAB><CTRLD>a<CTRLU><DELETE>N.A. <TAB><TAB><CTRLD>a<CTRLU><DELETE>This is based on the recent referral for special education testing. I always click in the first edit field, then activate the macro. As you might guess, Ctrl+A is "select all." That allows me to delete/clear any old text that is in the text boxes.
  23. Did some more experimenting... Not looking at the the "Hello World" message, but rather whether or not this context menu (https://imgur.com/Ejp4dmO) pops up before the macro runs. I think the determining factor is whether a webpage is launched. I also tried setting variables, adding logic statements, and launching programs. None of those cause the context menu to show. <VARIABLE SET STRING Option="\x05" Destination="%sWindowTitle%"/> <IF VARIABLE Variable="%sWindowTitle%" Condition="\x06" Value="TED" IgnoreCase="FALSE"/> <WEB SITE URL="https://pgmacros.invisionzone.com" Wait="FALSE" Default_Browser="TRUE" NoEmbeddedVars="FALSE" _IGNORE="0x000C"/> <END IF/> <IF VARIABLE Variable="%sWindowTitle%" Condition="\x07" Value="TED" IgnoreCase="FALSE"/> <ACTIVATE OR LAUNCH Title="Word" Exact_Match="FALSE" Wildcards="FALSE" Path="WINWORD.EXE" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/> <END IF/> Running this macro, if I right-click the minimize button of TED N Pad, the context menu appears (and the forum opens), but if it's another app's menu button, the there's no context menu. EDIT: I see that it's not apparent in the above pasted code, but the macro is If window title contains "TED" then launch pgmacros.com If window title does NOT contain "TED", then launch Word.
×
×
  • Create New...