SyntaxError: wrong format of TAG command at line 5

Discussions and Tech Support specific to the iMacros for Chrome extension.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Wed Mar 17, 2010 10:19 pm

My macro is (Google Chrome)
VERSION BUILD=6600217 RECORDER=FX
TAB T=1
URL GOTO=http://farmerstory.org/files/vote/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:voted.php ATTR=NAME:name CONTENT=brian890
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://farmerstory.org/files/vote/voted.php
But when I execute it, it says

SyntaxError: wrong format of TAG command at line 5

How do I fix it?

P.S I used the iMarco In firefox to find the script because all Chrome recorded was
VERSION BUILD=1110311 RECORDER=CR
URL GOTO=http://farmerstory.org/files/vote/
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Fri Mar 19, 2010 5:52 pm

Hello,

You need an ATTR attribute in this command:

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://farmerstory.org/files/vote/voted.php
Daniel, iOpus Support
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

Re: SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Fri Mar 19, 2010 11:08 pm

How do I do that?
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Mon Mar 22, 2010 6:52 pm

Add ATTR to the TAG command. For example ATTR=TXT:Submit or an equivalent. This will let iMacros identify the button you want it to press. Please see this wiki article for more details.
Daniel, iOpus Support
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

Re: SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Mon Mar 22, 2010 9:01 pm

I'm guessing ATTR=TXT:SUBMIT means the attribute will be identified by its text "submit".

In my website the text would be Go Vote For Us!
When I Do

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://farmerstory.org/files/vote/voted.php ATTR=TXT:Go Vote for Us!
I receive SyntaxError: wrong format of TAG command at line 5


When I do

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://farmerstory.org/files/vote/voted.php ATTR=TXT:Go<SP>Vote<SP>for<SP>Us!
I receive RuntimeError: element INPUT specified by TXT:GoVoteforUs! was not found, line: 5
Are my spacees no being detected?


I tried checked the button's value with Google chrome(developer tools) for the buttons name but could not find anything.

What do I do now
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Mon Mar 22, 2010 10:28 pm

Does the 2nd line work with Firefox?
Daniel, iOpus Support
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

Re: SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Tue Mar 23, 2010 7:43 pm

Do you mean the 2nd one I tried?
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://farmerstory.org/files/vote/voted.php ATTR=TXT:Go<SP>Vote<SP>for<SP>Us!

No it doesn't but it works if I change ATTR=VALUE:Go<SP>Vote<SP>for<SP>Us!
But when I try that for chrome I still get
RuntimeError: element INPUT specified by VALUE:GoVoteforUs! was not found, line: 5
I don't think Chrome is recognizing the spaces
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Wed Mar 24, 2010 3:17 pm

Hello,

I don't know... It worked for me with this command:

Code: Select all

VERSION BUILD=1110311 RECORDER=CR
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:Go<SP>vote<SP>for<SP>us
and this html:

Code: Select all

<input type="submit" value="Go vote for us"/>
Are you using the latest version of the add-on? What is Chrome's version?

Thanks,
Daniel, iOpus Support
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

Re: SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Wed Mar 24, 2010 7:09 pm

I'm using Chrome Version 4.1.249.1042 The latest version and imacros is the same version as yours. Maybe I messed up somewhere. Can you paste the entire macro for me to see?

I get error RuntimeError: element INPUT specified by VALUE:Govoteforus was not found, line: 5 with the one you tried
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Fri Mar 26, 2010 8:47 pm

Hi,

This is the whole macro... I only recorded that. Or may be manually typed it in - I don't remember exactly. But that works just fine here.
I have same version of Chrome and the current iMacros plugin version.

What happens if you only run the code I submitted?
Daniel, iOpus Support
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

Re: SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Sat Mar 27, 2010 12:30 am

RuntimeError: element INPUT specified by VALUE:Govoteforus was not found, line: 2
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Tue Mar 30, 2010 9:32 am

Hi Brian,

I could reproduce the same error when I used wrong case in the Value part, but this works perfectly:

Code: Select all

VERSION BUILD=1110311 RECORDER=CR
URL GOTO=http://farmerstory.org/files/vote/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:voted.php ATTR=NAME:name CONTENT=brian890
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:Go<SP>Vote<SP>for<SP>Us!
Could you try it?
Daniel, iOpus Support
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Tue Mar 30, 2010 9:37 am

The spaces are only ignored in the error message. We will fix that.
Daniel, iOpus Support
brian890
Posts: 8
Joined: Wed Mar 17, 2010 10:13 pm

Re: SyntaxError: wrong format of TAG command at line 5

Post by brian890 » Tue Mar 30, 2010 11:07 am

It worked! THANKS
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: SyntaxError: wrong format of TAG command at line 5

Post by Daniel, Tech Support » Tue Mar 30, 2010 11:49 am

Not at all! Thanks for helping us to find that funny problem with the error message! :)
Daniel, iOpus Support
Post Reply