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 "Demo-AJAX-Tree"
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | This script automates an AJAX tree view, using drag & drop. Note that | + | This script automates an AJAX tree view, using drag & drop. Note that this solution does '''not''' require fixed coordinates, rather it uses the position of certain HTML page element, as returned by the [[!TAGX]] and [[!TAGY]] variables. With this method, iMacros can '''locate (and move) tree elements anywhere on the page'''. The only requirement is that the tree elements are visible in the web browser, so the [[DirectScreen]] command can grab and move them. |
<nowiki> | <nowiki> | ||
− | + | VERSION BUILD=10.4.28.1074 | |
− | + | TAB T=1 | |
− | + | TAB CLOSEALLOTHERS | |
− | + | URL GOTO=http://demo.imacros.net/Automate/DragDropDemo | |
− | + | SIZE X=1050 Y=750 | |
− | + | SET !EXTRACT_TEST_POPUP NO | |
− | + | 'select Germany node from treeview and move it to the first position | |
− | + | 'Use EXTRACT to avoid to "click" on the element | |
− | + | TAG POS=1 TYPE=A ATTR=TXT:Germany EXTRACT=TXT | |
− | + | DS CMD=LDOWN X={{!TAGX}} Y={{!TAGY}} | |
− | + | WAIT SECONDS=1 | |
− | + | 'find Europe node and move Germany here | |
− | + | TAG POS=1 TYPE=A ATTR=TXT:Europe EXTRACT=TXT | |
− | + | DS CMD=MOVETO X={{!TAGX}} Y={{!TAGY}} | |
− | + | DS CMD=LUP X={{!TAGX}} Y={{!TAGY}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 09:06, 21 May 2015
This script automates an AJAX tree view, using drag & drop. Note that this solution does not require fixed coordinates, rather it uses the position of certain HTML page element, as returned by the !TAGX and !TAGY variables. With this method, iMacros can locate (and move) tree elements anywhere on the page. The only requirement is that the tree elements are visible in the web browser, so the DirectScreen command can grab and move them.
<nowiki>
VERSION BUILD=10.4.28.1074 TAB T=1 TAB CLOSEALLOTHERS URL GOTO=http://demo.imacros.net/Automate/DragDropDemo SIZE X=1050 Y=750 SET !EXTRACT_TEST_POPUP NO 'select Germany node from treeview and move it to the first position 'Use EXTRACT to avoid to "click" on the element TAG POS=1 TYPE=A ATTR=TXT:Germany EXTRACT=TXT DS CMD=LDOWN X=Template:!TAGX Y=Template:!TAGY WAIT SECONDS=1 'find Europe node and move Germany here TAG POS=1 TYPE=A ATTR=TXT:Europe EXTRACT=TXT DS CMD=MOVETO X=Template:!TAGX Y=Template:!TAGY DS CMD=LUP X=Template:!TAGX Y=Template:!TAGY