The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
SIZE
Resizes the browser window.
Syntax
SIZE X=n Y=m
The size command is necessary mainly when using DirectScreen commands with fixed coordinates, but it may also be necessary when using Image Validation.
Parameters
- X
- Specifies the new width of the browser window in pixel.
- Y
- Specifies the new height of the browser window in pixel.
Notes
- The SIZE command ensures that the visible browser page is the specified size. The actual size of the entire browser window will be larger than the specified values when you factor in the size of the sidebar, toolbars, etc.
- This command does not work when iMacros is -silent or -tray mode.
- Available in iMacros for Firefox v10 and later
Examples
When using DS the size of the browser window is essential for the success of the command. If the window is resized between recording and replaying the macro the DS command might fail, because the position of the element which is to be clicked has moved. Therefore, it is advisable (especially when you distribute your macros) to add a SIZE command before all DS commands, so that potential window resizing by the user is undone.
SIZE X=800 Y=600 DS CMD=CLICK X=234 Y=42 CONTENT=Hello<SP>World!
See Also
DS, IMAGECLICK, What factors can cause a macro that uses DirectScreen or image recognition to fail on different machines?