this iMacross script i want to use in facebook.
i want to create iMacross script that will click "Delete this photo" link, wait a second until a dialog box appear and will click "confirm" button.
this is my script so far :
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 1
SET !TIMEOUT_STEP 1
TAG POS=1 ATTR=TXT:Delete this photo
WAIT SECONDS=3
TAG TYPE=INPUT:BUTTON ATTR=NAME:confirm
WAIT SECONDS=3
but it not works and keep appear error :
SyntaxError: wrong format of TAG command, line 6 (Error code: -910)
can anyone help?
UPDATE
The worked code is here for deleting photos in not theater mode. :
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
WAIT SECONDS=3
TAG POS=1 TYPE=A ATTR=TXT:"Delete this photo"
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON ATTR=TXT:"Confirm"
WAIT SECONDS=5
The problem is with TAG POS=1 ATTR=TXT:Delete this photo
because the innerHTML (TXT for iMacros) contains Blank spaces to solve this you have 2 options
#1
replace each blank space with <SP>
in your TXT
attribute:
TAG POS=1 TYPE=A ATTR=TXT:Delete<SP>This<SP>Photo
#2
enclose your TXT
within double-quotes:
TAG POS=1 TYPE=A ATTR=TXT:"Delete This Photo"
Both solutions works, Here's what I have tested
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=https://www.facebook.com/photo.php?fbid={ID}
TAG POS=1 TYPE=A ATTR=TXT:"Delete This Photo"
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON ATTR=TXT:Confirm
UPDATE
To delete the photo in Facebook "theater" mode, we need to open the photo permalink then initiate the "theater" mode using TAG POS=1 TYPE=A ATTR=TXT:"Open Photo Viewer"
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=https://www.facebook.com/photo.php?fbid=162982897217166
TAG POS=1 TYPE=A ATTR=TXT:"Open Photo Viewer"
WAIT SECONDS= 5
TAG POS=1 TYPE=SPAN ATTR=TXT:Options
TAG POS=2 TYPE=SPAN ATTR=TXT:"Delete This Photo"
TAG POS=1 TYPE=BUTTON ATTR=TXT:Confirm
Further Reading: