Jump to content
Macro Express Forums

acantor

Members
  • Content Count

    826
  • Joined

  • Last visited

  • Days Won

    5

acantor last won the day on April 11

acantor had the most liked content!

Community Reputation

8 Neutral

About acantor

  • Rank
    Master

Contact Methods

  • Website URL
    www.cantoraccess.com
  • ICQ
    0

Profile Information

  • Location
    Toronto

Recent Profile Visitors

552 profile views
  1. If you're in Windows Explorer, or a similar window, this might work: F2 // begin edit mode Short pause Shift + End // extend the selection from the end of the file name to the end of the extension Ctrl + c // copy to the clipboard
  2. Terry, Your solution is cleaner and more elegant than mine, and I can imagine it might run a bit faster. Thank you for posting! It's interesting, educational, and entertaining to develop one's own string manipulation tools. I was going to write Insight and request they add features like reverse, pre-pend to a string (to complement the already-existing append). But if Insight had added these features in the past, I wouldn't have taken the time to learn how to build them myself!
  3. For a script I am developing, I need to reverse the order of characters. For example, "12345" needs to transform into "54321". Macro Express does not appear to have an instruction for reversing strings, so I wrote a script that does just that. I would be curious to know if there are ways to make a script like this run faster. It's quick for strings consisting of a few dozen or hundred characters, but noticeably slower when the string contains thousands of characters. (This test script is set to use "0123456789" as its input.) // String reverse // %Text% = String before processing // %Result% = String after processing Variable Set String %Text% to "0123456789" Variable Set String %Result% to "" // %Len% = Number of characters in %Text% // %Start% = Starting position of the character to copy. (Begin with the last one) Variable Set Integer %Len% to the length of variable %Text% Variable Set Integer %Start% to %Len% // Begin by copying the final character in %Text%. Next time, copy the second last character, etc. // Each time, append the character, %Char%, to the end of %Result% Repeat Start (Repeat %Len% times) Variable Modify String: Copy part of text in %Text% starting at %Start% and 1 characters long to %Char% Variable Modify String %Result%: Append Text (%Char%) Variable Modify Integer %Start%: Decrement End Repeat Text Box Display: Result <COMMENT Value="String reverse"/> <COMMENT Value=" %Text% = String before processing"/> <COMMENT Value=" %Result% = String after processing"/> <VARIABLE SET STRING Option="\x00" Destination="%Text%" Value="0123456789" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%Result%" NoEmbeddedVars="FALSE"/> <COMMENT/> <COMMENT Value=" %Len% = Number of characters in %Text%"/> <COMMENT Value=" %Start% = Starting position of the character to copy. (Begin with the last one)"/> <VARIABLE SET INTEGER Option="\x0D" Destination="%Len%" Text_Variable="%Text%"/> <VARIABLE SET INTEGER Option="\x00" Destination="%Start%" Value="%Len%"/> <COMMENT/> <COMMENT Value="Begin by copying the final character in %Text%. Next time, copy the second last character, etc."/> <COMMENT Value="Each time, append the character, %Char%, to the end of %Result%"/> <REPEAT START Start="1" Step="1" Count="%Len%" Save="FALSE"/> <VARIABLE MODIFY STRING Option="\x09" Destination="%Char%" Variable="%Text%" Start="%Start%" Count="1" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%Result%" Value="%Char%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x08" Destination="%Start%"/> <END REPEAT/> <COMMENT/> <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs40 %Result%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END REPEAT _ENABLED="FALSE"/> <TEXT BOX DISPLAY Title="Done" 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" _ENABLED="FALSE"/>
  4. In theory the answer is yes. But it may not be practical. The first digit would need to always be the same. Let's say it's zero. Then configure Macro Express so that "0" is a prefix key for ShortKey activation. Then create 100,000 macros with these nicknames: 00000 00001 00002 ... 99998 99999 You can automate the process of creating these macros using a Macro Express script. It might take a couple of hours to run, but you'd only need to do so once. This would be a fun and interesting exercise, but in my view, Macro Express is not the ideal tool for this task!
  5. You cannot affect the Fn key with Macro Express. On the other hand, you cannot affect the Fn key in any third-party scripting tool that I am aware of. So you may be stuck performing the task manually. On the other hand, I can think of one remote possibility that would enable you to automate the task. Go into the Bios, and see if you can change the hotkey to something that doesn't involve Fn.
  6. Click the "Activations" tab Click the "Properties" button Find the checkbox at the bottom of the resulting "Select a HotKey" screen
  7. The first line of your script should open the Edit menu. I would expect your command will cause the Edit menu to be visible. It's not unusual for a script like this to need a short delay after to give time for the menu to open. Some people find this works better, although I don't usually find it necessary: Text Type (Simulate Keystrokes): <ALTD>e<ALTU> If it's still not working, the source of the problem might be the activation you have chosen, Ctrl+6. For fun, try changing the activation to a function key without a modifier key, e.g., F11. I've seen instances of Macro Express accepting the Ctrl key as input and output, so the application might be seeing Alt+e as Ctrl+Alt+e. If this is what's happening, there may be workarounds. If you have unchecked the checkbox that says "Wait for the Hotkey to be released before activating" in Properties -- the Properties button is at the bottom of the "Activations" tab in Macro Express -- check the checkbox, save the macro, and try again. Unchecking this checkbox can cause all kinds of mischief.
  8. Do accelerator keys appear in any of the "tabs," or does a menu become selected, when you press Alt? Do the accelerator keys and/or menu selections disappear when you press Alt a second time? The part of the window you are trying to give focus to, to or click on.
  9. I think the key to easily searching for a blue pixel in the "I" icon hinges on whether this Macro Express instruction works in the application. (It works in some programs, but not others): Mouse Move: To the Text Cursor Position See if the instruction causes the mouse pointer to jump somewhere within the selected item. Try it both with the checkbox checked and unchecked. If it works, report back! Another approach which is more brute force and computational. In outline... 1. Search down from the top of the window in one pixel increments to find the top of the green selection. 2. Continue to search down to to find the bottom of the green selection -- the background colour of a non-selected item. 3. The centre of the target icon appears to be a fixed distance from the bottom of the selection. Or perhaps a fixed proportion of the height of the selection. 4. Move the mouse cursor "north" by that distance. 5. Search right, starting from the left edge of the window, in one pixel increments to find the blue icon. 6. Click!
  10. Let's see a screen shot of the application. What happens to the menus or tabs if you press and release the Alt key repeatedly?
  11. // Perform steps to search the computer. For example... Text Type (Simulate Keystrokes): <CONTROL><ESC> // Call up the Start menu. The search box has keyboard focus // Paste the contents of the clipboard in the Search box. The search begins immediately Clipboard Paste
  12. What a creative solution! However, the developers of the web site (or application) have not done their homework, and perhaps you should approach them and ask for this change. The del facto international standard for web accessibility requires that "Web pages [should] have titles that describe [their] topic or purpose," and assigns this as a Level A criterion which means it's fundamental for accessible content. https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-title.html For many years I had to deal with a web application that gave zero information in the title about the the page. The Macro Express scripts that I developed to circumvent this shortcoming were very complex, and took days, maybe weeks, of effort. And all for nothing. The developers apparently thought it was OK to standardize the <title> tag so that every page had the same title, instead of saying something about the page in the title.
  13. I tried. When I set the size to values larger than a maximized window, the application's menubar disappeared under the top of the screen, but there were no changes to the left, right or bottom of the window. Press Alt + spacebar (to access the System menu, and then you can easily resize, minimize, or close the oversized window)
  14. I made a one-line script, coloured the line in yellow, saved the script, closed the script, and reopened the script. The line is yellow.
×
×
  • Create New...