Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,200
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. Another way to stop a macro: Options | Preferences | Playback | Miscellaneous tab allows you to set one of several hotkey combinations that stop running macros. I think using this option stops ALL running macros. So if you have others that you want to keep running, then some method like Cory describes is your best bet.
  2. As a variation on this idea -- if controls are not readily accessible to ME -- loop through the windows ("Repeat With Windows" command), activate the ones with matching names, and check pixel color(s) at known location(s) to see if you have the right window. For example, if there is a colored ENTER button or some such that is unique to the screen you want, use that. I even have a couple windows where a button changes color when the mouse is hovered over it, so I am able to use the color change to determine whether the screen has finished loading.
  3. ME is like low-level Assembler languages, in (sometimes) manipulating data at the bit and byte level; and in advancing by excruciatingly-small steps from beginning to end of a process. It’s also a bit like COBOL, where the procedural code is almost readable like English. COBOL is easy to learn, at least superficially, but I don’t think it is much used any longer. Those were languages I used extensively for many years. But I agree with Cory that, for a PC or server, one of the object-oriented and database-focused environments is where you want to be. I found the transition from the dinosaur languages, to object-oriented, to be mentally very taxing. Maybe it was just me; but it seemed a very different way of thinking. So perhaps you should skip learning something “most similar to Macro Express” – bite the bullet and go right to the modern stuff.
  4. I think you could start MX3 with a .bat file; and start the .bat file at Win10 startup. Not "perfect", perhaps, but if it works, be happy.😉 Personally, I prefer to start MEX manually, just so as not to muddy the waters if there's any other problem during Windows startup.
  5. I have very few macros that are less than 50 lines. However, splitting yours into two macros will be a learning experience.😐 The "Macro Run" command starts another macro. It's in the Macro Control group of commands. One more thing you could look at -- is it possible that the target of your Mouse Move is in a slightly different screen location than it was on the old PC and old Windows version? So the macro could be clicking at the wrong place? Use the Mouse Locator tool to manually check on that.
  6. By my count, line 51 is the one highlighted in blue in this screen image. Sorry, I can't see any reason the macro would stop at that point. I notice that a few lines before 51, there is a 100 second delay (red arrow). One minute and forty seconds. That's a pretty long time if you are sitting waiting for the computer to do something. Are you sure that is not where it stops -- or appears to stop?
  7. What version of MacroExpress 3 do you have? I believe the last version I used was 3.7.3, though I think there are later updates, like maybe 3.11. Some hotkey combinations that worked in older Windows versions, are now reserved by Windows, so the macro does not get initiated. Can you post an example of a short macro that fails and indicate where it is failing?
  8. Considering the snippet of code that you posted - 1) Is the window getting activated? 2) Are you using the "exact match" or the "partial match" option of the Window Activate command? 3) Did you use the Mouse Locator tool to determine the proper coordinates?
  9. Should you move the mouse to the proper area, before typing Control-r? Maybe with another short delay after moving the mouse...
  10. This has been working for me: If Window "Microsoft Excel - ComputeMF" is running Window Activate: Microsoft Excel - ComputeMF Delay: 500 milliseconds The "delay" may or may not be needed.
  11. Macro Express automatically defines string (text) variable "T" as an array with 99 items. So you would enter %T% in the ASCII Begin Process command. But in your Text Type command, you must specify %T[1]% %T[2]% %T[3]% %T[4]% and so on -- brackets around the number. It's possible your macro IS reading the CSV file correctly, but it's just the Text Type command that's wrong.
  12. Remove Adobe's "Sandbox" protections. Below are my notes. This change makes Acrobat Reader less secure, and subject to malware embedded in PDFs. So far I have had no problem, been running with this change for quite a long time. Adobe Reader blocks Macro Express hot keys -- how to fix: - Open Adobe Acrobat Reader - Click Edit, Preferences - For Adobe Acrobat Reader DC or XI click Security (Enhanced) - For Adobe Acrobat Reader X click General - Click to uncheck the "Enable Protected mode at startup" setting - Click the OK button to save - Restart Adobe Acrobat Reader
  13. Tabbing to a field is a good technique in many cases. If the web page changes you may have to change the number of tabs, which is a pain. Sometimes you can streamline the process by positioning within the page before tabbing. For example, the following snippet searches for the text "forgot your password?", then tabs backward a few times to get to the user id field. Most changes to the web page do not affect this logic. Text Type (Simulate Keystrokes): <CTRLD>f<CTRLU>forgot your password? Delay: 250 milliseconds Text Type (Simulate Keystrokes): <ESC> // escape from Firefox "find" mode Text Type (Simulate Keystrokes): <SHIFTD><TAB><TAB><TAB><TAB><SHIFTU> Delay: 250 milliseconds Text Type (Simulate Keystrokes): name<TAB> Text Type (Simulate Keystrokes): password
  14. If it's hit-or-miss on timing, one way is to find a specific spot on the screen with a predictable color when the web page is completely loaded. For example, this routine repeats for about 12 seconds, looking for the combination of white in one location, and blue for the login button, which occurs once the web page has finished loading. Repeat Start (Repeat 12 times) Mouse Move: 900, 500 Relative to Screen Mouse Left Click // Click white area to bring page into focus Delay: 500 milliseconds, without ability to halt Mouse Move: 770, 560 Relative to Screen // Hover over button area until expected dark blue color is found Delay: 500 milliseconds, without ability to halt Get Pixel Color from Beneath the Mouse into %N[1]% Get Pixel Color at (840, 540) Relative to Screen into %N[2]% If Variable %N[1]% Equals "6567680" // Blue AND If Variable %N[2]% Equals "16777215" // White Repeat Exit Else End If End Repeat // Type name and password, tab to Submit button and ENTER
  15. The web page may not yet be completely loaded when the macro clicks the mouse and types. As an experiment, remove the Website command from the macro; load the website manually; then run the macro. If it then does what you want, then it's a timing issue, so add the delay like acantor says, or try the "wait for website" command.
  16. Now I am questioning the need for my favorite macro. I think I wrote it originally for ME 3 under Windows XP, and it did resolve all difficulties with quick vs. slow clipboard copies. However, it appears that either ME or Windows or both are smarter now. Look at this very simple test macro, and at the log from running it. 300,000+ lines (15 MB) of text were copied to the clipboard, then pasted into Notepad. The ME clipboard delay preference is zero. But the results were perfect. Though the log shows the second "abc" to be typed a few thousanths of a second after the first "abc", there was actually about six seconds that elapsed as I watched the screen. So somewhere within ME and Windows 10 and Notepad the commands and clipboard and explicit text ("abc") are being presented in proper sequence. (The macro also worked if I changed it to paste into Microsoft Word, but the paste time was 20 minutes!) So -- conclusion -- clipboard copies and pastes seem to be coordinated by Windows, and my clipboard macro is no longer needed. Text Type (Simulate Keystrokes): <CTRLD>a<CTRLU> // highlight all text Text Type (Simulate Keystrokes): <CTRLD>c<CTRLU> // copy to clipboard Program Launch: "notepad" (Normal) Parameters: // launch Notepad Text Type (Simulate Keystrokes): abc<ENTER> // type "abc" Text Type (Simulate Keystrokes): <CTRLD>v<CTRLU> // paste from clipboard Text Type (Simulate Keystrokes): abc<ENTER> // type "abc" again Macro Return LOG FILE: Saturday, January 1, 2022 1:50:12:775 PM: Macro Started (ztest) Saturday, January 1, 2022 1:50:12:778 PM: Line 1: Text Type ctrl-a highlight all text Saturday, January 1, 2022 1:50:12:786 PM: Line 2: Text Type ctrl-c copy to clipboard Saturday, January 1, 2022 1:50:12:792 PM: Line 3: Program Launch launch Notepad Saturday, January 1, 2022 1:50:13:827 PM: Line 4: Text Type type "abc" Saturday, January 1, 2022 1:50:13:835 PM: Line 5: Text Type ctrl-v paste from clipboard Saturday, January 1, 2022 1:50:13:841 PM: Line 6: Text Type type "abc" again Saturday, January 1, 2022 1:50:13:852 PM: Line 7: Macro Return exit macro Saturday, January 1, 2022 1:50:13:855 PM: Macro Completed (ztest) 1/1/2022 1:50:20 PM: Macro executed: 3_Position_to_End_of_Macro_Express_Log_File <TEXT TYPE Action="0" Text="<CTRLD>a<CTRLU>" _COMMENT="highlight all text"/> <TEXT TYPE Action="0" Text="<CTRLD>c<CTRLU>" _COMMENT="copy to clipboard"/> <PROGRAM LAUNCH Path="notepad" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE" _COMMENT="launch Notepad"/> <TEXT TYPE Action="0" Text="abc<ENTER>" _COMMENT="type \"abc\""/> <TEXT TYPE Action="0" Text="<CTRLD>v<CTRLU>" _COMMENT="paste"/> <TEXT TYPE Action="0" Text="abc<ENTER>" _COMMENT="type \"abc\""/> <MACRO RETURN/>
  17. My most useful recently-implemented macro resulted from one of your suggestions or "challenges". My initial reaction to your idea was, that I would rarely use it. But once I wrote the macro, I found I very frequently used it. The macro pops up a multiple-choice menu when using the Macro Express editor, to insert instructions into the macro being edited. I coded it for commonly-used instructions like Delay, Set/Modify String, Set/Modify Integer, Text Type, etc.; and a few skeleton instruction groups like If/Else/Endif, and Repeat/Repeat Exit/End Repeat. My very favorite macro of all time is pretty simple, but addresses a weakness in Macro Express: the fact that Copy to Clipboard can be unreliable because it requires an unpredictable time duration to finish. There is a ME option for Clipboard Delay that helps a little. But often one has to put a delay into a script, following copy-to-clipboard, and hope that the delay will be sufficient. My macro, instead, empties the clipboard, issues the Copy to Clipboard command, and then loops until the clipboard is found to be non-empty. The ME Clipboard Delay option may be set to zero; so the copy-to-clipboard dynamically adjusts to very-fast or comparatively-slow depending on whether Windows responds very-fast or comparatively slow. My concern, initially, was that the clipboard copy might be only partially complete -- that is, the clipboard might be non-empty but ALL the data would not yet be copied. However, this has never been a problem. (The macro does nothing for Clipboard Paste, which can be extremely slow.) <COMMENT Value=" "/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Macro executed: 0_Generic_Copy_To_Clipboard" Stamp="TRUE"/> <LOG ERRORS Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Hide_Errors="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Set clipboard to nulls -- check to make sure it happens"/> <CLIPBOARD EMPTY/> <REPEAT START Start="1" Step="1" Count="10000" Save="FALSE" Variable="%N[1]%"/> <IF CLIPBOARD Option="\x00" CaseSensitive="FALSE"/> <REPEAT EXIT/> <ELSE/> <END IF/> <END REPEAT/> <COMMENT Value="Copy to clipboard (CTRL-c)"/> <CLIPBOARD COPY/> <COMMENT Value="Loop until clipboard is non-null, that is, copy to clipboard has completed. Since the value"/> <COMMENT Value="to be copied may in fact BE null, we limit the loop to a nominal 1 second, then quit, leaving it null."/> <COMMENT Value="(Due to overhead, the actual loop time will be more like 2 seconds than 1.)"/> <REPEAT START Start="1" Step="1" Count="100" Save="TRUE" Variable="%N[99]%"/> <DELAY Flags="\x12" Time="10"/> <IF CLIPBOARD Option="\x00" CaseSensitive="FALSE"/> <ELSE/> <REPEAT EXIT/> <END IF/> <END REPEAT/> <COMMENT Value="Debugging and repeat-loop logging -- writes to the log the count of how many times the REPEAT loop"/> <COMMENT Value="cycled, before the clipboard contained useful information. Note that when trying to copy a"/> <COMMENT Value="null field into the clipboard, the loop counter will always be the maximum. "/> <COMMENT Value="This logging may be commented out when you are comfortable that the macro is working properly." _ENABLED="FALSE"/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Copy-to-clipboard loop counter is %N[99]%" Stamp="TRUE" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Return to caller"/> <MACRO RETURN/>
  18. Nowhere near as dramatic as I feared, then. That's good! Thanks for the clarification.
  19. In the last couple days, I got half a dozen forum emails pointing me to links for naked ladies. I was not unduly distressed. But I'm guessing the forum site was compromised in some way, and is now in the process of being rebuilt.
  20. "images" should not be an array type. This macro (below) runs properly if %testvar% is defined as a text variable, not as an array. If %testvar% is defined as a text array, I get the same error you describe. Text File Begin Process: C:\Temp\windowlist.txt (specifies "testvar" to receive lines from the file) Text Type (Simulate Keystrokes): %testvar% Text File End Process Macro Return In the macro editor, select the Variables tab, select Properties for your variable, and un-check the "Create as array" box. See attached screen shot.
  21. It's a personal preference, but I use the ME option that does NOT automatically define variables. If you set that ME option, you should be able to delete the current variable, and then when you try to save the macro, it will prompt you through defining the variable. For Text File Process, it should be a Text variable. If you currently have a text array, possibly ME objects to that and wants a single text variable -- not sure, I haven't tried that.
  22. When you are editing the macro, click on the Variables tab, and at lower left there are options to add/delete/change variables. The Macro Express Help example for Text File Process shows an array variable, which is confusing, because it does not HAVE to be an array variable. It does not much matter whether you give it any content when you define it, because it will be overlaid with file data when the process runs. If you want the fields within each record to be placed in an array, look at ASCII File Process instead of Text File Process.
  23. WOW!!! It hasn't been that "effective" on my PC. Biggest problem I ran into during testing was that some window coordinates were mis-calculated and the windows were placed entirely outside the screen. Notepad disappeared completely even when I restarted it several times, and rebooted, because Notepad uses last-known window position when it starts. So it was running but invisible. Fortunately Google pointed me to a fix. Anyway, if you dare to try it, here is the latest version with some positioning bugs cleaned up. <COMMENT Value=" "/> <LOG ERRORS Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Hide_Errors="TRUE"/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Macro executed: Tile_2" Stamp="TRUE"/> <COMMENT Value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/> <KEYSTROKE SPEED Delay="10"/> <MOUSE SPEED Delay="30"/> <COMMENT Value=" "/> <COMMENT Value="Line Feed (New Line) character ascii 10"/> <VARIABLE SET TO ASCII CHAR Value="10" Destination="%LINEFEED%"/> <COMMENT Value="Carriage Return character ascii 13"/> <VARIABLE SET TO ASCII CHAR Value="13" Destination="%CARRIAGERETURN%"/> <COMMENT Value="Carriage Return / Line Feed combination characters ascii 13 + ascii 10"/> <VARIABLE SET TO ASCII CHAR Value="13" Destination="%CRLF%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%CRLF%" Variable="%LINEFEED%" NoEmbeddedVars="FALSE"/> <COMMENT Value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/> <COMMENT Value=" "/> <COMMENT Value="Macro tiles present window and all others previously selected for tiling"/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value="Restore variables previously stored "/> <VARIABLE RESTORE Option="\x01"/> <VARIABLE RESTORE Option="\x02"/> <COMMENT Value=" "/> <COMMENT Value="If any previously selected window has been closed, clear entire table of windows "/> <COMMENT Value="Also clear if slot 9 of table does not equal \"End of Table\""/> <IF VARIABLE Variable="%w_name[9]%" Condition="\x01" Value="End of Table" IgnoreCase="FALSE" _COMMENT="is last table slot formatted???"/> <MACRO RUN Use_ID="FALSE" Name="Tile_1" ID="-1" Wait="TRUE" _COMMENT="Run macro that clears table"/> <VARIABLE RESTORE Option="\x01"/> <VARIABLE RESTORE Option="\x02"/> <END IF/> <REPEAT START Start="1" Step="1" Count="8" Save="TRUE" Variable="%indx%"/> <IF VARIABLE Variable="%w_name[%indx%]%" Condition="\x01" Value="*" IgnoreCase="FALSE" _COMMENT="is this table slot empty (asterisk)???"/> <IF WINDOW Option="\x01" Title="%w_name[%indx%]%" Partial="FALSE" Wildcards="FALSE"/> <ELSE/> <MACRO RUN Use_ID="FALSE" Name="Tile_1" ID="-1" Wait="TRUE" _COMMENT="Run macro that clears table"/> <VARIABLE RESTORE Option="\x01"/> <VARIABLE RESTORE Option="\x02"/> <REPEAT EXIT/> <END IF/> <END IF/> <END REPEAT/> <COMMENT Value=" "/> <COMMENT Value="Find name of present window, store name in array if not already there "/> <REPEAT WITH WINDOWS ToRetrieve="\x01" SortOrder="\x01" Destination="%present_window%"/> <IF WINDOW Option="\x00" Title="%present_window%" Partial="FALSE" Wildcards="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %present_window%\\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" _ENABLED="FALSE"/> <REPEAT START Start="1" Step="1" Count="8" Save="TRUE" Variable="%indx%"/> <IF VARIABLE Variable="%w_name[%indx%]%" Condition="\x00" Value="%present_window%" IgnoreCase="FALSE" _COMMENT="present window already in table???"/> <REPEAT EXIT/> <ELSE/> <IF VARIABLE Variable="%w_name[%indx%]%" Condition="\x00" Value="*" IgnoreCase="FALSE" _COMMENT="is this table slot empty (asterisk)???"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%w_name[%indx%]%" Variable="%present_window%" NoEmbeddedVars="FALSE" _COMMENT="yes, empty slot, insert name of present window into table"/> <REPEAT EXIT/> <END IF/> <END IF/> <END REPEAT/> <END IF/> <END REPEAT/> <COMMENT Value=" "/> <COMMENT Value="AT THIS POINT THE W_NAME ARRAY CONTAINS PREVIOUSLY SELECTED WINDOWS PLUS THE ONE SELECTED BY THIS RUN OF THE MACRO "/> <COMMENT Value=" "/> <COMMENT Value="Count how many window have been selected for tiling, previously and now "/> <VARIABLE SET INTEGER Option="\x00" Destination="%win_count%" Value="0"/> <REPEAT START Start="1" Step="1" Count="8" Save="TRUE" Variable="%indx%"/> <IF VARIABLE Variable="%w_name[%indx%]%" Condition="\x01" Value="*" IgnoreCase="FALSE" _COMMENT="is this table slot empty (asterisk)???"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%win_count%" _COMMENT="no, add to count of windows to be tiled"/> <END IF/> <END REPEAT/> <IF VARIABLE Variable="%win_count%" Condition="\x00" Value="0" IgnoreCase="FALSE" _COMMENT="If no windows to be tiled, exit from macro"/> <VARIABLE SAVE Option="\x01" _COMMENT="Save updated state of all variables "/> <VARIABLE SAVE Option="\x02"/> <MACRO RETURN/> <END IF/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %win_count% windows to be tiled\\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" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Get display width and height, hard-code base location for top-left tile "/> <VARIABLE SET INTEGER Option="\x06" Destination="%scrn_width%"/> <VARIABLE SET INTEGER Option="\x07" Destination="%scrn_height%"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_base_top%" Value="3" _COMMENT="Change this if you want tiling to start at other than 0,0"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_base_left%" Value="3" _COMMENT="Change this if you want tiling to start at other than 0,0"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%scrn_height%" Value1="%scrn_height%" Value2="%tile_base_top%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%scrn_width%" Value1="%scrn_width%" Value2="%tile_base_left%"/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value="Compute size for tiling maximum four windows across and two down "/> <IF VARIABLE Variable="%win_count%" Condition="\x00" Value="1" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_width%" Value1="%scrn_width%" Value2="2"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_height%" Value1="%scrn_height%" Value2="1"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_rows%" Value="1"/> <END IF/> <IF VARIABLE Variable="%win_count%" Condition="\x00" Value="2" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_width%" Value1="%scrn_width%" Value2="2"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_height%" Value1="%scrn_height%" Value2="1"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_rows%" Value="1"/> <END IF/> <IF VARIABLE Variable="%win_count%" Condition="\x00" Value="3" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_width%" Value1="%scrn_width%" Value2="3"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_height%" Value1="%scrn_height%" Value2="1"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_rows%" Value="1"/> <END IF/> <IF VARIABLE Variable="%win_count%" Condition="\x00" Value="4" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_width%" Value1="%scrn_width%" Value2="2"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_height%" Value1="%scrn_height%" Value2="2"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_rows%" Value="2"/> <END IF/> <IF VARIABLE Variable="%win_count%" Condition="\x03" Value="4" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_width%" Value1="%scrn_width%" Value2="4"/> <VARIABLE MODIFY INTEGER Option="\x03" Destination="%tile_height%" Value1="%scrn_height%" Value2="2"/> <VARIABLE SET INTEGER Option="\x00" Destination="%tile_rows%" Value="2"/> <END IF/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value="Plug winlow locations and sizes into arrays "/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%" _COMMENT="set leftmost tile position to negative location"/> <IF VARIABLE Variable="%win_count%" Condition="\x03" Value="0" IgnoreCase="FALSE" _COMMENT="If no windows to be tiled, exit macro."/> <ELSE/> <VARIABLE SAVE Option="\x01" _COMMENT="Save updated state of all variables "/> <VARIABLE SAVE Option="\x02"/> <MACRO RETURN/> <END IF/> <REPEAT START Start="1" Step="1" Count="%win_count%" Save="TRUE" Variable="%indx%"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <IF VARIABLE Variable="%w_name[%indx%]%" Condition="\x00" Value="*" IgnoreCase="FALSE" _COMMENT="is this table slot empty (asterisk)??? If so, quit tiling."/> <REPEAT EXIT/> <END IF/> <IF VARIABLE Variable="%tile_rows%" Condition="\x00" Value="2" IgnoreCase="FALSE" _COMMENT="If done with top row of 2 out of 4 total tiles, reset tile location pointers for bottom row of tiles"/> <AND/> <IF VARIABLE Variable="%win_count%" Condition="\x00" Value="4" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%indx%" Condition="\x00" Value="3" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%tile_base_top%" Value1="%tile_base_top%" Value2="%tile_height%"/> <END IF/> <IF VARIABLE Variable="%tile_rows%" Condition="\x00" Value="2" IgnoreCase="FALSE" _COMMENT="If done with top row of 4 out of more than 4 total tiles, reset tile location pointers for bottom row of tiles"/> <AND/> <IF VARIABLE Variable="%win_count%" Condition="\x03" Value="4" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%indx%" Condition="\x00" Value="5" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%tile_base_left%" Value1="%tile_base_left%" Value2="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%tile_base_top%" Value1="%tile_base_top%" Value2="%tile_height%"/> <END IF/> <VARIABLE MODIFY INTEGER Option="\x06" Destination="%w_top[%indx%]%" Variable="%tile_base_top%"/> <VARIABLE MODIFY INTEGER Option="\x06" Destination="%w_left[%indx%]%" Variable="%tile_base_left%"/> <VARIABLE MODIFY INTEGER Option="\x06" Destination="%w_width[%indx%]%" Variable="%tile_width%"/> <VARIABLE MODIFY INTEGER Option="\x06" Destination="%w_height[%indx%]%" Variable="%tile_height%"/> <END REPEAT/> <COMMENT Value=" "/> <COMMENT Value="Place the window tiles on the screen "/> <MINIMIZE ALL WINDOWS _ENABLED="FALSE" _COMMENT="Minimize all windows"/> <TEXT TYPE Action="0" Text="<WIND>d<WINU>" _COMMENT="Show desktop"/> <REPEAT START Start="1" Step="1" Count="8" Save="TRUE" Variable="%indx%"/> <IF VARIABLE Variable="%w_name[%indx%]%" Condition="\x00" Value="*" IgnoreCase="FALSE" _COMMENT="is this table slot empty (asterisk)??? If so, quit tiling."/> <REPEAT EXIT/> <END IF/> <WINDOW ACTIVATE Title="%w_name[%indx%]%" Exact_Match="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/> <DELAY Flags="\x13" Time="999" _ENABLED="FALSE"/> <WINDOW MAXIMIZE Option="\x01" Title="%w_name[%indx%]%" Partial="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <WINDOW SHOW Option="\x01" Title="%w_name[%indx%]%" Partial="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <DELAY Flags="\x13" Time="999" _ENABLED="FALSE"/> <WINDOW MINIMIZE Option="\x01" Title="%w_name[%indx%]%" Partial="FALSE" Wildcards="FALSE" _IGNORE="0x0006" _ENABLED="FALSE"/> <WINDOW MOVE AND SIZE Use_Current="FALSE" Title="%w_name[%indx%]%" Exact_Match="TRUE" Use_Wildcards="FALSE" Left="%w_left[%indx%]%" Top="%w_top[%indx%]%" Width="%w_width[%indx%]%" Height="%w_height[%indx%]%" Monitor="0"/> <WINDOW RESIZE Option="\x01" Title="%w_name[%indx%]%" Partial="FALSE" Wildcards="FALSE" Method="\x00" Width="%tile_width%" Height="%tile_height%" _IGNORE="0x0006" _ENABLED="FALSE"/> <WINDOW REPOSITION Option="\x01" Title="%w_name[%indx%]%" Partial="FALSE" Wildcards="FALSE" Method="\x00" Left="%tile_base_left%" Top="%tile_base_top%" Monitor="0" _IGNORE="0x0006" _ENABLED="FALSE"/> <DELAY Flags="\x13" Time="999" _ENABLED="FALSE"/> <TEXT BOX DISPLAY Title="halt" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Press Enter to continue with next window\\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" _ENABLED="FALSE"/> <END REPEAT/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value="Save updated state of all variables "/> <VARIABLE SAVE Option="\x01" _COMMENT="Save updated state of all variables "/> <VARIABLE SAVE Option="\x02"/> <COMMENT Value=" "/> <COMMENT Value="Diagnostic display of variables "/> <VARIABLE SET STRING Option="\x00" Destination="%textbox%" NoEmbeddedVars="FALSE" _COMMENT="Diagnostic display of variables"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value="tile rows = " NoEmbeddedVars="FALSE" _COMMENT="************************"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%tile_rows%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value="tile height = " NoEmbeddedVars="FALSE" _COMMENT="************************"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%tile_height%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value="tile width = " NoEmbeddedVars="FALSE" _COMMENT="************************"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%tile_width%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value="Window Name - Top - Left - Height - Width" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <REPEAT START Start="1" Step="1" Count="9" Save="TRUE" Variable="%indx%" _COMMENT="************************"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%w_name[%indx%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value=" " NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%w_top[%indx%]%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value=" " NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%w_left[%indx%]%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value=" " NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%w_height[%indx%]%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%textbox%" Value=" " NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x04" Destination="%w_width[%indx%]%" Variable="%text%"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%text%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%textbox%" Variable="%CRLF%" NoEmbeddedVars="FALSE"/> <END REPEAT/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %textbox%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="923" Height="440" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <MACRO RETURN/> <COMMENT Value=" "/>
×
×
  • Create New...