Forum rulesBefore asking a question or reporting an issue:1. Please review the list of FAQ's.2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.3. We can respond much faster to your posts if you include the following information:

Beh..., yep, using '!ERRORIGNORE' and a shortened '!TIMEOUT_STEP' like you already do is the way to go, I would think...Hum..., Flash Game I see, which explains your Use of the 'DS' Mode, OK...

But yep, if an Error occurs, '!ERRORIGNORE' should indeed keep your Script running and finish that Run, and then it should start the next Run with '!LOOP' +1...The only Explanation I can think of if your Script then stops completely is if '!LOOP' has reached the End of your DataSource or if you have 2 consecutive empty Rows in your '.CSV'...

Some "strange" Behaviour I've noticed sometimes, is on "heavy" Pages with "a lot of" JavaScript Buttons (or Links) forcing an Update or a Refresh of the Page, sometimes if such a Refresh didn't completely refresh and fully re-load the Page, the Script then seems to "slide" on the Page and won't be able to click on any Button anymore as the JavaScript behind the Buttons probably didn't load correctly... The Buttons are there on the Page and iMacros finds them, but a Click on them, from a 'TAG' Statement or even a manual Click won't do anything anymore... A manual Refresh of the Page is then the only way to get the Script working again... Maybe the same thing happens with your Flash Object and the Code behind it...?

- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...- I usually don't even read the Question if that (required) Info is not mentioned...- Script & URL usually help a lot for a more "educated" Help...

has been clicked and then only the below commands are run otherwise they wont and move on with the loop.

As this is in flash i dont have the TAG and other things to check upon

I've never used iMB (I only use the Free iMacros for FF Add-on myself) and therefore the 'DS' Mode, but yep, I would think, simply run a Check on '!IMAGEX' and/or '!IMAGEY' that hold(s) the Coordinate(s) of your 'attack_button.png', like this later Statement of yours is already Conditional:

I guess if the Button was not found with the 'IMAGECLICK' Statement, then the later 'CLICK' Statement does nothing if the 2 Coordinates are "=0" or 'NULL' (I don't know what the Original/Default Value is if the Image is not found...).

If you don't want the 'MOVETO' and all 'CLICK' Statements with hard-coded X/Y Coordinates after the 'IMAGECLICK' to be "fired", you can for each Statement compute those Coordinates one by one using 'EVAL()'.

Or if when your 'attack_button' is found, if it is always located at the same Place on the Page, and therefore its '!IMAGEX/Y' Coordinates are always the same, you could even more simply use 'ADD' (for a Subtraction) to compute the exact X/Y Values you need for each 'CLICK' Statement or that you get some Negative Value if the Button was not found if the Default Value is "=0" or you will get some "weird" String in the form "_undefined_-218" or "NULL-218" (hum, if those "weird" Strings do not trigger some Compile Error, but I don't think so as they will be computed Vars) with which the 'CLICK' Statements won't do anything...

- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...- I usually don't even read the Question if that (required) Info is not mentioned...- Script & URL usually help a lot for a more "educated" Help...

could you tell me how to place the condition in EVAL() and how to add the state which is to be executed if the condition is true or when its false

Yeah, but check a bit the Wiki for the Syntax to use for the iMacros 'EVAL()' Command... Or search the Forum which contains Hundreds of Examples... You cannot "create" your own Syntax and hope that it will work, ah-ah...!, nice Try...! 'EVAL()' allows you to compute a Value for a Var and you will reuse that Var in some 'TAG' or 'CLICK' Statement for the Coordinates for example in your Case...

- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...- I usually don't even read the Question if that (required) Info is not mentioned...- Script & URL usually help a lot for a more "educated" Help...

And you do the same for all 'CLICK' Statements that you want to make Conditional...The Single Quotes around the "421" are probably not needed..., but you can use 'PROMPT' to debug your Script and follow your Vars...And you might need to use '!ERRORIGNORE', if you were not using it already, for the "CLICK X=0 Y=0" Cases...

- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...- I usually don't even read the Question if that (required) Info is not mentioned...- Script & URL usually help a lot for a more "educated" Help...

Yep, you're welcome... (And you got a bit "lucky" btw..., I usually don't help for Games normally..., so..., enjoy...! )

- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...- I usually don't even read the Question if that (required) Info is not mentioned...- Script & URL usually help a lot for a more "educated" Help...

Aditya93 wrote:Wanted to know one more thing, can nested "if" be used in a similar manner in this?and one more thing can text be extracted from flash, as it doesn't get recognized in the extract text option.

1- Nested "if":Not sure what you mean exactly by "Nested if" as your Qt is a bit vague..., but yep, you can use it for "Nested Loops" for example, and you can find several Threads on the Forum about "Nested Loop(s)" in pure '.iim' using 'EVAL()'.But you could mean an "if" within an "if", then yep, simply use the '&' Operator to combine 2 "if"'s in a same 'EVAL()' Statement..., and you can have as many 'if/else' Conditions as you want in one same 'EVAL()' Statement...(I've got one with 144 'if/else' Conditions in one of my own Scripts, ah-ah...!, even if I now would know how to shorten if drastically using a Combination of other JS Functions, but I had made it about 5 years ago when I had started using "my" 'EVAL()' Method, so I hardly knew anything about JavaScript at that time, and it still works perfectly, so I never bothered (and never needed...!) to re-implement it differently/more efficiently...)

2- Extract Text from Flash:Well, yes and no, or rather NO but maybe yes, but it can be tricky...- There is indeed no 'TAG' Mode on Flash Objects, then you can't use the 'EXTRACT' Command...

- I have a Workaround or rather an "Alternative" for the 'EXTRACT' Mechanism using the 'EVENT' Mode in some tricky Situations that might work on Flash Objects but I have never really posted it yet on the Forum, only mentioned more or less precisely in a few Threads as one of the several Options, and I have never tested it on Flash Objects but I guess it would work even if I think it might be a bit tricky...But you are on iMB v10.x and the 'EVENT' Mode only got implemented in iMB from iMB v11.0.

- I have another Method that I use myself using the 'TAG' Mode, never posted either, and I don't think I will post it either as I use it for a Game as well, oops...! But in my "Case", the Site I use that Method on has relatively "small" Flash Objects embedded on the Page with Properties/Vars passed from the HTML/PHP Page to the Flash Object, and that are accessible from the HTML Page (using 'EXTRACT=HTM' on the Flash Container), but I'm not sure that would work for your Game which looks completely in Flash to me, so I guess once you've loaded your Game, you are completely in a Flash Environment and I would think that Method won't be able to access anything that is purely "inside" the Flash Object.

But those 2 Methods are a bit tricky and a bit "Advanced" Level, and you had to struggle a bit too long already I would think for some fairly simple 'EVAL()' Statement with a very simple 'if/else' Condition, so I'm afraid that will be a bit too "High Level" for you, and as I mentioned in my last Post, I normally don't (really) want to help (too precisely) for Games..., even if I gained myself absolutely all my Knowledge about iMacros from playing Games as well, re-oops...! But OK, we'll see about that, if you understand a bit what I meant with "the 2 Methods" and understand how to (start to) implement them or one of them, then maybe I'll help you a bit further, ah-ah...!

- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...- I usually don't even read the Question if that (required) Info is not mentioned...- Script & URL usually help a lot for a more "educated" Help...

1- Nested "if":Not sure what you mean exactly by "Nested if" as your Qt is a bit vague..., but yep, you can use it for "Nested Loops" for example, and you can find several Threads on the Forum about "Nested Loop(s)" in pure '.iim' using 'EVAL()'.But you could mean an "if" within an "if", then yep, simply use the '&' Operator to combine 2 "if"'s in a same 'EVAL()' Statement..., and you can have as many 'if/else' Conditions as you want in one same 'EVAL()' Statement...(I've got one with 144 'if/else' Conditions in one of my own Scripts, ah-ah...!, even if I now would know how to shorten if drastically using a Combination of other JS Functions, but I had made it about 5 years ago when I had started using "my" 'EVAL()' Method, so I hardly knew anything about JavaScript at that time, and it still works perfectly, so I never bothered (and never needed...!) to re-implement it differently/more efficiently...)

2- Extract Text from Flash:Well, yes and no, or rather NO but maybe yes, but it can be tricky...- There is indeed no 'TAG' Mode on Flash Objects, then you can't use the 'EXTRACT' Command...

- I have a Workaround or rather an "Alternative" for the 'EXTRACT' Mechanism using the 'EVENT' Mode in some tricky Situations that might work on Flash Objects but I have never really posted it yet on the Forum, only mentioned more or less precisely in a few Threads as one of the several Options, and I have never tested it on Flash Objects but I guess it would work even if I think it might be a bit tricky...But you are on iMB v10.x and the 'EVENT' Mode only got implemented in iMB from iMB v11.0.

- I have another Method that I use myself using the 'TAG' Mode, never posted either, and I don't think I will post it either as I use it for a Game as well, oops...! But in my "Case", the Site I use that Method on has relatively "small" Flash Objects embedded on the Page with Properties/Vars passed from the HTML/PHP Page to the Flash Object, and that are accessible from the HTML Page (using 'EXTRACT=HTM' on the Flash Container), but I'm not sure that would work for your Game which looks completely in Flash to me, so I guess once you've loaded your Game, you are completely in a Flash Environment and I would think that Method won't be able to access anything that is purely "inside" the Flash Object.

But those 2 Methods are a bit tricky and a bit "Advanced" Level, and you had to struggle a bit too long already I would think for some fairly simple 'EVAL()' Statement with a very simple 'if/else' Condition, so I'm afraid that will be a bit too "High Level" for you, and as I mentioned in my last Post, I normally don't (really) want to help (too precisely) for Games..., even if I gained myself absolutely all my Knowledge about iMacros from playing Games as well, re-oops...! But OK, we'll see about that, if you understand a bit what I meant with "the 2 Methods" and understand how to (start to) implement them or one of them, then maybe I'll help you a bit further, ah-ah...!

I tried and searched a lot also about this, but for the 1st method, i couldn't get imacro vr 11+, so unable to test it outfor the 2nd method, i wast able to find any 'TAG' in flash, even normal other websites the extracting was working correctly.but in flash couldn't find any object