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
Difference between revisions of "!TAGX"
(7 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
The coordinates refer to the ''middle'' of the HTML element. | The coordinates refer to the ''middle'' of the HTML element. | ||
− | === Value === | + | === Value [[Image:IMacros-icon.png|iMacros Browser]] [[Image:Ie-icon.png|IE Plug-in]]=== |
X-coordinate in pixel. | X-coordinate in pixel. | ||
+ | |||
+ | === Set By === | ||
+ | [X] Internal | ||
+ | |||
+ | [ ] [[SET]] | ||
+ | |||
+ | '''Internal''' means that the iMacros program itself sets the value of the variable during program run. [[SET]] means that the user can set this value via the [[SET]] command inside a macro. | ||
=== Examples === | === Examples === | ||
Line 23: | Line 30: | ||
!TAGX also works within frames. It returns the absolute coordinates (= relative to the browser window, not relative to the frame). | !TAGX also works within frames. It returns the absolute coordinates (= relative to the browser window, not relative to the frame). | ||
− | URL GOTO=http:// | + | URL GOTO=http://demo.imacros.net/Automate/Frames |
FRAME F=3 | FRAME F=3 | ||
− | TAG POS=1 TYPE= | + | TAG POS=1 TYPE=INPUT:TEXT ATTR=* CONTENT=F3 |
− | PROMPT <nowiki> | + | PROMPT TAGX=<nowiki>{{!TAGX}}</nowiki> !VAR1 TAGY=<nowiki>{{!TAGY}}</nowiki> |
− | FRAME F=7 | + | FRAME F=7 |
− | TAG POS=1 TYPE= | + | TAG POS=1 TYPE=INPUT:TEXT ATTR=* CONTENT=F7 |
− | PROMPT <nowiki> | + | PROMPT TAGX=<nowiki>{{!TAGX}}</nowiki> !VAR1 TAGY=<nowiki>{{!TAGY}}</nowiki> |
+ | |||
+ | Related forum post: [https://forum.imacros.net/viewtopic.php?f=7&t=6166 How can I extract the position of an HTML element?] | ||
=== See Also === | === See Also === | ||
[[!TAGY]] , [[!IMAGEX]] , [[!IMAGEY]], [[DS]] | [[!TAGY]] , [[!IMAGEX]] , [[!IMAGEY]], [[DS]] |
Revision as of 14:20, 21 November 2018
This value contains the X-coordinate of the HTML element found with the TAG command. The !TAGX/!TAGY values are automatically set after each TAG command.
The coordinates refer to the middle of the HTML element.
Value
X-coordinate in pixel.
Set By
[X] Internal
[ ] SET
Internal means that the iMacros program itself sets the value of the variable during program run. SET means that the user can set this value via the SET command inside a macro.
Examples
In this example we use the {{!TAGX}} and {{!TAGY}} values as input for two DirectScreen commands to enter text into a tricky JavaScript date selector box that can not be filled with the standard TAG command:
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:aspnetForm ATTR=ID:txtCoverStartDate CONTENT= 'Set focus on box DS CMD=CLICK X={{!TAGX}} Y={{!TAGY}} 'Send text DS CMD=KEY X={{!TAGX}} Y={{!TAGY}} CONTENT=11/01/2009
Example macros: Demo-AJAX-Drag-Drop , Demo-AJAX-Tree
!TAGX also works within frames. It returns the absolute coordinates (= relative to the browser window, not relative to the frame).
URL GOTO=http://demo.imacros.net/Automate/Frames FRAME F=3 TAG POS=1 TYPE=INPUT:TEXT ATTR=* CONTENT=F3 PROMPT TAGX={{!TAGX}} !VAR1 TAGY={{!TAGY}} FRAME F=7 TAG POS=1 TYPE=INPUT:TEXT ATTR=* CONTENT=F7 PROMPT TAGX={{!TAGX}} !VAR1 TAGY={{!TAGY}}
Related forum post: How can I extract the position of an HTML element?