Converting a piece of Code from iMacros Firefox to Chrome

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
Post Reply
Thrilling
Posts: 37
Joined: Fri Aug 11, 2017 2:02 pm

Converting a piece of Code from iMacros Firefox to Chrome

Post by Thrilling » Tue Jan 08, 2019 7:52 am

Hi,

I was using iMacros 8.9.7 on FIrefox 45.9.0 ESR on Solaris 11.3 (x64, german)

I'm trying to convert a piece of code to iMacros 10.0.5 on Chrome on WIndows 7 Professional

I'm inputting data from an .csv File into a website
I'm having two problems with the following code:

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}

SET !VAR1 EVAL("var x='{{!COL16}}'; var z; if((x=='RETIRED')||(x=='HOUSEWIFE')||(x=='UNEMPLOYED')||(x=='PUPIL')||(x=='STUDENT')||(x=='HOUSEMAN')){z=0;} else{z=1;}; z;")
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
Problem 1:
Upon executing this code i get the following error Message:
"BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 16"
The Line "TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}" is then not being executed.
Seems to me like this version of iMacros doesn't accept the "IF ELSE" command like the old version did, because if I remove the "IF ELSE" command and put "SET !Var! 0" there instead, the page is filled as it should.

Problem 2:
When i force !VAR1 to be 0 (with SET !Var! 0) so i can test the rest of the code, i get the message: "Tag waiting (6s)" and have to wait 6 seconds for each line of code it's supposed to ignore (even though Errorignore is YES) It ultimately does ignore the lines successfully, but i'd like not having to wait 6 seconds four times.

Please help!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by chivracq » Wed Jan 09, 2019 12:37 am

Thrilling wrote:
Tue Jan 08, 2019 7:52 am
Hi,

I was using iMacros 8.9.7 on FIrefox 45.9.0 ESR on Solaris 11.3 (x64, german)

I'm trying to convert a piece of code to iMacros 10.0.5 on Chrome on WIndows 7 Professional

I'm inputting data from an .csv File into a website
I'm having two problems with the following code:

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}

SET !VAR1 EVAL("var x='{{!COL16}}'; var z; if((x=='RETIRED')||(x=='HOUSEWIFE')||(x=='UNEMPLOYED')||(x=='PUPIL')||(x=='STUDENT')||(x=='HOUSEMAN')){z=0;} else{z=1;}; z;")
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
Problem 1:
Upon executing this code i get the following error Message:
"BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 16"
The Line "TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}" is then not being executed.
Seems to me like this version of iMacros doesn't accept the "IF ELSE" command like the old version did, because if I remove the "IF ELSE" command and put "SET !Var! 0" there instead, the page is filled as it should.

Problem 2:
When i force !VAR1 to be 0 (with SET !Var! 0) so i can test the rest of the code, i get the message: "Tag waiting (6s)" and have to wait 6 seconds for each line of code it's supposed to ignore (even though Errorignore is YES) It ultimately does ignore the lines successfully, but i'd like not having to wait 6 seconds four times.

Please help!
Pb_2:
Same Behaviour in v8.9.7 for FF, unless you had "drastically" shortened the Default '!TIMEOUT_PAGE' Setting to 5 sec or max 10 sec in the iMacros Options, instead of the Default =60 sec like you now have on CR.

Easy Solution:
Use '!TIMEOUT_STEP' (=> "=0")...! :idea:

Pb_1:
Hum-hum, I'm not sure, the Line_16 mentioned in the RuntimeError is not the Line you mention about the "CONTENT=%{{!VAR1}}"... :?
But use 'PROMPT' to follow your Vars and debug the Script, I would say, to make sure you don't get any "_undefined_"...:

Code: Select all

PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
And instead of your 'SET !VAR1 EVAL(...)' Statement, you could use this other Implementation, though I would expect to get the same Results...:

Code: Select all

'SET !VAR1 EVAL("var x='{{!COL16}}'; var z; if((x=='RETIRED')||(x=='HOUSEWIFE')||(x=='UNEMPLOYED')||(x=='PUPIL')||(x=='STUDENT')||(x=='HOUSEMAN')){z=0;} else{z=1;}; z;")
'>
SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"
SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
(Not tested..., but hum, maybe not such a good "Idea" if '!COL16' might contain "EMPLOYED" for example, oops...! But hum, you get the Principle I guess, could use 'ocp.split(',')' on the Comma instead + 'indexOf(x)' which might be more "accurate", ah-ah...!)

And not mentioned, but I take for "granted" that you are using the 'PE' Version for v10.0.5 for CR, and that you've installed the 'FIO' Module needed for using a DataSource...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Thrilling
Posts: 37
Joined: Fri Aug 11, 2017 2:02 pm

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by Thrilling » Wed Jan 09, 2019 8:09 am

Hi Chivracq, as always, thank you for helping, you're a lifesaver

Problem 2:
The Timeout_Step command seems to work just fine, thank you very much

Problem 1:

After executing this:

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}

SET !VAR1 EVAL("var x='{{!COL16}}'; var z; if((x=='RETIRED')||(x=='HOUSEWIFE')||(x=='UNEMPLOYED')||(x=='PUPIL')||(x=='STUDENT')||(x=='HOUSEMAN')){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_


Set !TIMEOUT_STEP 0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
I get this:
COL16: _RETIRED_ VAR1: __
and then this error message:
BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 20

-------------------

After executing this:

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}

SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"
SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_


Set !TIMEOUT_STEP 0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
I get this:
COL16: _RETIRED_ VAR1: __
and then this error message:
BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 21

And not mentioned, but I take for "granted" that you are using the 'PE' Version for v10.0.5 for CR, and that you've installed the 'FIO' Module needed for using a DataSource...
I have that Module installed that allows using DataSources, and it's inputting data successfully. I'm not sure what the "PE" version is, an IT guy of my firm prepared this windows 7 OS and installed the imacros for chrome for me to be used in the future. When looking at the chrome extensions installed, and selecting "details" on the imacros extension, it says "version 10.0.5". When recording a macro with this version, the first line is

Code: Select all

VERSION BUILD=1005 RECORDER=CR
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by chivracq » Sat Jan 12, 2019 7:14 am

Thrilling wrote:
Wed Jan 09, 2019 8:09 am
Hi Chivracq, as always, thank you for helping, you're a lifesaver

Problem 2:
The Timeout_Step command seems to work just fine, thank you very much

Problem 1:

After executing this:

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}

SET !VAR1 EVAL("var x='{{!COL16}}'; var z; if((x=='RETIRED')||(x=='HOUSEWIFE')||(x=='UNEMPLOYED')||(x=='PUPIL')||(x=='STUDENT')||(x=='HOUSEMAN')){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_


Set !TIMEOUT_STEP 0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
I get this:
COL16: _RETIRED_ VAR1: __
and then this error message:
BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 20

-------------------

After executing this:

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}

SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"
SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_


Set !TIMEOUT_STEP 0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
I get this:
COL16: _RETIRED_ VAR1: __
and then this error message:
BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 21

And not mentioned, but I take for "granted" that you are using the 'PE' Version for v10.0.5 for CR, and that you've installed the 'FIO' Module needed for using a DataSource...
I have that Module installed that allows using DataSources, and it's inputting data successfully. I'm not sure what the "PE" version is, an IT guy of my firm prepared this windows 7 OS and installed the imacros for chrome for me to be used in the future. When looking at the chrome extensions installed, and selecting "details" on the imacros extension, it says "version 10.0.5". When recording a macro with this version, the first line is

Code: Select all

VERSION BUILD=1005 RECORDER=CR
Yeah, sorry-sorry, I had seen your Reply 2 days ago and I saw you checking the Forum a few times since, but pfff, not easy to debug your Script "remotely" as I don't have the URL nor the same FCI like yours nor your DataSource, and I was a bit "busy' in the last 2 days, but OK, some mini-Update..., here is a Script to help you debug your Pb:
(I modified a bit the/"my" 'EVAL()' to make it even easier to debug more thoroughly and for each part/Var in it..., as I don't understand why '!VAR1' returns an empty String ("__") in the 'PROMPT'...)

Code: Select all

SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"

SET !VAR0 "HOUSEWOMAN"
'SET !VAR0 {{!COL16}}
'SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")

'SET !VAR1 EVAL("var c='{{!COL16}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR1 EVAL("var c='{{!VAR0}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

'PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
=> (1) You first need to test with that hard-coded '!VAR0' => "HOUSE[WO]MAN" + "RETIRED" + "XETIRED" (Deliberate Typo, to trigger the "z=1", same with "HOUSEWOMAN"), then in the 'EVAL()', return => 'z' + 'y' + 'x' + 'ocp' + 'c', one by one, (by changing the Return Var at the end of the 'EVAL()'). (This is as far I can test myself, and that part works for me... (on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x84).)

(2) Then check again for all 5 Vars with 'SET !VAR0 '{{!COL16}}' (to pull the Data from your '.CSV'), and especially if 'c' returns "__undefined__".

(3) Then try also with \" instead of the Single Quotes around '{{!COL16}}' or '{{!VAR0}}' though it shouldn't play a role with '{{!VAR0}}' as the "Link" with '{{!COL16}}' has already been defined "before"..., but depending on how your Data is stored in your '.CSV', with Single/Double Quotes, that could play a Role for the 'EVAL()'...

OK, I hope you understand what I mean, takes me 2 min to test all different Cases if I have "access" to everything, but like I said, I miss too many Parameters that I don't control in your Case..., so you need to understand the Debug-Process and do the Debug yourself...
And you might find out that there is a Bug, very possible..., but hum..., I never stop there, I always try to find a Workaround... 8)

=> Reason actually why I came to the Forum 6 years ago, first time I had a "real" Bug and couldn't find a Workaround (I had already been using iMacros for a few years then), to report that Bug, "my" Bug never ever/even got acknowledged ah-ah...!, is still there (well, except in v10.0.2 for FF as it was/is related to the 'EVENT' Mode which is not implemented anymore in that Version for FF, ah-ah...!), but I finally found a (stupidly very simple!) Workaround about 2 years ago, but OK, 6 years ago, I had a look at the Forum and was surprised I knew how to answer/solve maybe 80% of all Qt's on the Forum, and 6 years later, I'm still here, now my "80%" is maybe "95%" ah-ah...! (Hum, even if that "Rate" is maybe going down again, as I don't use any of the v10.x 'Free'/'PE' Versions myself..., which often seem to "behave" differently from the previous Versions...)
And like I said, even if there is a Bug, yeah...!, that's not the end, try to find a Workaround, this is how I "work", I used to "destroy" Software and Web-Sites for a Living, but always finding Workarounds for my Findings then again new Way(s) to void again my Workaround(s) until it would get so cumbersome that nobody on this Earth could have gone the same "Thinking-Path" (well, happened a few times though, ah-ah...!, I'm not always "the Best", ah-ah...!), a bit like if I had been playing Chess with myself, playing both White + Black, and each time being "completely" White, then "completely" Black on each turn... :idea:

But hum, if you find out there is really a Bug, Dev is actually working on a new Release (=> v10.0.6 I guess), related to some other (very recent) Thread on the CR Sub-Forum, a Fix for this current Thread could maybe be included in that same Release, but you'll need to be very "precise" in your Testing/Debugging or to provide some reproducible Testcase/Script for TechSup to be able to reproduce your Pb... :idea:
But hum, like I said, it's "better" not to care (too much) about Bugs, and rather try to find Workarounds, ah-ah...!
Yeah, to be honest, I never really care about Bugs and Limitations, I always (try to) find a "Workaround"...! :twisted:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Thrilling
Posts: 37
Joined: Fri Aug 11, 2017 2:02 pm

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by Thrilling » Mon Jan 14, 2019 2:32 pm

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"

SET !VAR0 "HOUSEWOMAN"
'SET !VAR0 {{!COL16}}
'SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")

'SET !VAR1 EVAL("var c='{{!COL16}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR1 EVAL("var c='{{!VAR0}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

'PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
This returns:
VAR0: _HOUSEWOMAN_ VAR1: _1_

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"

SET !VAR0 "RETIRED"
'SET !VAR0 {{!COL16}}
'SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")

'SET !VAR1 EVAL("var c='{{!COL16}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR1 EVAL("var c='{{!VAR0}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

'PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
This returns:
VAR0: _RETIRED_ VAR1: __

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"

SET !VAR0 "XETIRED"
'SET !VAR0 {{!COL16}}
'SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")

'SET !VAR1 EVAL("var c='{{!COL16}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR1 EVAL("var c='{{!VAR0}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

'PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
This returns:
VAR0: _XETIRED_ VAR1: _1_

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

SET Occupations_0 "RETIRED,HOUSEWOMAN,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"

SET !VAR0 "RETIRED"
'SET !VAR0 {{!COL16}}
'SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")

'SET !VAR1 EVAL("var c='{{!COL16}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR1 EVAL("var c=\"{{!VAR0}}\", ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

'PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
Changed brackets round VAR0, while using RETIRED, that returned this:
VAR0: _RETIRED_ VAR1: __


Since retired doesnt seem to be working (if i'm understanding this correctly) even when its put in via code, not pulled from the datasource, im not sure if i'm even supposed to continue. Shouldn't it return 0?

Anyways, when setting Var0 as RETIRED and changing the variables the eVAL is supposed to return i get the following:
When returning "c":
VAR0: _RETIRED_ VAR1: _RETIRED_
When returning y:
VAR0: _RETIRED_ VAR1: _2_
When returning "x":
VAR0: _RETIRED_ VAR1: _,,HOUSEWOMAN,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN_
When returning "ocp":
VAR0: _RETIRED_ VAR1: _RETIRED,HOUSEWOMAN,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN_
When returning "z":
VAR0: _RETIRED_ VAR1: __

When setting Var0 as "123" and changing the variables:
When returning "c":
VAR0: _123_ VAR1: _123_
when returning "y":
VAR0: _123_ VAR1: _1_
When returning "x":
VAR0: _123_ VAR1: _RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN_
When returning "ocp":
VAR0: _123_ VAR1: _RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN_
When returning "z":
VAR0: _123_ VAR1: _1_

I hope this helps at all. Please tell me if I should test anything further
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by chivracq » Mon Jan 14, 2019 4:14 pm

Grrrr...!!, I'm completely puzzled by the "VAR1: __" (and "z=__") => Empty String with an Entry in the List like with "RETIRED"...!?!? :? :? :?

I thought for a while the Commas in the List could play a role as the 'split()' also uses Commas to separate all parts, but the 'length' of the 'split()' (my 'y' Var) is correct with "y=2", but the "if(y>1){z=0;}" is not working...! Pfff..., shit-shit-shit...! Oops...!

OK, next "Step"..., and shortened Script, as we first need to get the 'EVAL()' with "hard-coded" Vars to work...:

Code: Select all

SET Occupations_0 "RETIRED_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN"

SET !VAR0 "RETIRED"
SET !VAR1 EVAL("var c=\"{{!VAR0}}\", ocp=\"{{Occupations_0}}\"; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
=> Check again what x,y,z return (in this order, like in the 'EVAL()')...

If the 'z' still returns "z= __", try returning some other Value than the "0", like "999" (=> "if(y>1){z=999;}"), and the "0" as a String (=> "if(y>1){z='0';}"), and a "real" String (=> "if(y>1){z='ABC';}").
Could also try (=> "if(y==2){z=0;}"). (+ Try also with "XETIRED" to make sure the 'else' still works...)
And also "reversing" the Logic (=> "if(y==1){z=1;} else{z=0;}"). (+ Try also with "XETIRED" to make sure the 'else' still works...)
(For each Test, you only need to post the Results for c,x,y,z (in this order), in "simplified" Format, I know what to expect...)

Notice I've replaced the Commas in the List with Underscores, to make sure to exclude any "Collision" between the Commas from the List and the Comma(s) from the 'split()', => check once anyway that 'ocp' is correct also...

Well..., good luck...!! :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Thrilling
Posts: 37
Joined: Fri Aug 11, 2017 2:02 pm

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by Thrilling » Tue Jan 15, 2019 10:26 am

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

SET Occupations_0 "RETIRED_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN"

SET !VAR0 "RETIRED"
SET !VAR1 EVAL("var c=\"{{!VAR0}}\", ocp=\"{{Occupations_0}}\"; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
"c" returns:
VAR0: _RETIRED_ VAR1: _RETIRED_
"x" returns:
VAR0: _RETIRED_ VAR1: _,_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN_
"y" returns:
VAR0: _RETIRED_ VAR1: _2_
"z" returns:
VAR0: _RETIRED_ VAR1: __

z=999:
VAR0: _RETIRED_ VAR1: _999_
hey, it works!

z='0'
VAR0: _RETIRED_ VAR1: _0_

Well, that fixed the problem. I input the '0' into my original script, which now works as it should. Thank you so much, Chivracq. If you hadn't helped we couldn't have keep using imacros, since our IT-Department banned the Firefox-Version we have been using our previous iMacros addon on, for security reasons. what a headache this was.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by chivracq » Tue Jan 15, 2019 9:26 pm

Thrilling wrote:
Tue Jan 15, 2019 10:26 am

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36

SET Occupations_0 "RETIRED_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN"

SET !VAR0 "RETIRED"
SET !VAR1 EVAL("var c=\"{{!VAR0}}\", ocp=\"{{Occupations_0}}\"; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
"c" returns:
VAR0: _RETIRED_ VAR1: _RETIRED_
"x" returns:
VAR0: _RETIRED_ VAR1: _,_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN_
"y" returns:
VAR0: _RETIRED_ VAR1: _2_
"z" returns:
VAR0: _RETIRED_ VAR1: __

z=999:
VAR0: _RETIRED_ VAR1: _999_
hey, it works!

z='0'
VAR0: _RETIRED_ VAR1: _0_

Well, that fixed the problem. I input the '0' into my original script, which now works as it should. Thank you so much, Chivracq. If you hadn't helped we couldn't have keep using imacros, since our IT-Department banned the Firefox-Version we have been using our previous iMacros addon on, for security reasons. what a headache this was.
Hum, you should have tried exactly like in my Script, without the '!ERRORIGNORE' and without the '!DATASOURCE_DELIMITER', those 2 could be playing a "Role" and I would have been interested if there was any RuntimeError...

So, OK, Pb occurs only with "0" returned as a Number, it works with other Numbers (<>0), we haven't tried with Negative Numbers, and it works also with Strings... OK, strange, sounds like a Bug to me, I will alert TechSup to have a look... (And some new Version for CR is supposed to be released very soon, maybe that could be included in that Version...) And I "suspect" v10.0.2 for FF will probably behave the same...
The Script I had used during the Beta-Testing Phase for v10.0.2 for FF does contain a lot of 'EVAL()' => "1"/"0" Returns as Numbers and I "could" have noticed it then already, but my (5000 Line) Script was not "doing" much actually and I was "fighting" already a little bit too much to keep it running until the end, so I didn't really pay attention to the "expected" Behaviour and Functionality and following the Return Values of my 'EVAL()' Statements...

And concerning FF55 (that I still use myself) with v8.9.7 for FF, well an Alternative could be to use Pale Moon (like me) that keeps being updated with Security Releases, and PM27 or PM28 still work with iMacros for FF v8.9.7 as PM doesn't use WebExtensions... (I actually still use PM26 + v8.8.2 for FF myself for all my "Prod" Scripts, ah-ah...!)

But OK, glad we finally got you a Solution for your Script...! :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Thrilling
Posts: 37
Joined: Fri Aug 11, 2017 2:02 pm

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by Thrilling » Wed Jan 16, 2019 8:26 am

I'm glad too, i began to worry we'd have to work without the script, it'd have meant we would have to type all the visa applications out by hand. My team used to do that until I came along. I experienced it one year long and then had to put a stop to it, any way possible, that's how i stumbled over imacros :D
Hum, you should have tried exactly like in my Script, without the '!ERRORIGNORE' and without the '!DATASOURCE_DELIMITER', those 2 could be playing a "Role" and I would have been interested if there was any RuntimeError...
I'd test it for you, but my IT department took back the laptop i got to test imcaros Chrome for Windows on, until they get it working on a remote server for all of us. I'll do it then, if you're still interested

Thanks again!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by chivracq » Thu Jan 17, 2019 12:02 am

Well, don't worry, I've alerted TechSup to have a look and they'll be able to test thoroughly, and I managed to test also on v10.0.5 ('Free') for CR and I can definitely confirm THE Bug...! :shock:
Any Return=0 as a Number is treated like an empty String by 'EVAL()'...!

I had to completely convert the Script I was using on PM and v8.8.2 for FF to be able to run in a Bookmarklet in v10.0.5 for CR 'Free', which is a complete Hassle btw, because of the stupid Limitation with only 3 Vars ('!VAR[1-3]'), but OK, here is the Script I used:

Code: Select all

'SET Occupations_0 "RETIRED_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN"
SET !VAR1 "RETIRED_HOUSEWIFE_UNEMPLOYED_PUPIL_STUDENT_HOUSEMAN"

'SET !VAR0 "RETIRED"
SET !VAR2 "RETIRED"

'SET !VAR1 EVAL("var c=\"{{!VAR0}}\", ocp=\"{{Occupations_0}}\"; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR3 EVAL("var c=\"{{!VAR2}}\", ocp=\"{{!VAR1}}\"; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")

'PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR2:<SP>_{{!VAR2}}_<BR>VAR3:<SP>_{{!VAR3}}_
Negative Numbers also work fine, everything works fine as long as it doesn't return Numeric "0". (Also "+0" and "-0" and "0.0" etc...)

And even easier to test with the following mini-Script:

Code: Select all

SET !VAR1 EVAL("var z=0; z;")
PROMPT VAR1:<SP>_{{!VAR1}}_
Then, "z=1" works, or "z=1+1", but "z=1-1" doesn't work, etc...

(Tested on iMacros for CR v10.0.5 'Free', CR71, Win10_x64.)

Hum, and I noticed as well that the '<BR>' in the 'PROMPT' is not working either, it is replaced by a '<SP>'. :shock:

And I found another dozen of other mini-Bugs and "Annoyances", beurk...!, I still don't like at all this CR Browser and iMacros for CR, many similar (and already reported) in v10.0.2 for FF during the Beta-Testing Phase, of which a few Changes were implemented in the v10.0.2 for FF Version that finally got released but strangely enough not in v10.0.x for CR... (About 'Pause'/'Resume' and Editor Position and Resize...) Hum, and "interesting" to notice it's possible to run the same Macro 3x times in parallel at the same time and on the same Page, ah-ah...! :twisted:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by Tom, Tech Support » Thu Jan 17, 2019 4:21 pm

chivracq wrote:
Thu Jan 17, 2019 12:02 am
And even easier to test with the following mini-Script:

Code: Select all

SET !VAR1 EVAL("var z=0; z;")
PROMPT VAR1:<SP>_{{!VAR1}}_
Here's an even more concise test case that demonstrates the issue:

Code: Select all

PROMPT EVAL("0")
Another workaround would be to always return a string value from EVAL, for example:

Code: Select all

SET !VAR1 EVAL("var z=0; z.toString();")
PROMPT {{!VAR1}}
I've logged this issue for the development team, and yes, the same bug exists in iMacros for Firefox 10. I can't say for sure, but there is a good chance that a fix for this could be included with the release for the fix of the URL GOTO=javascript issue, as chivracq mentioned in this thread.
Regards,

Tom, iMacros Support
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Converting a piece of Code from iMacros Firefox to Chrome

Post by Tom, Tech Support » Mon Sep 07, 2020 1:37 pm

Quick update: this issue is fixed now with the release of iMacros for Chrome 10.1.
Regards,

Tom, iMacros Support
Post Reply