!TIMEOUT or if and else statements guidance needed.

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
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
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

!TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 4:34 am

so heres the code:

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://www.tppcrpg.net/map.php?Map=8
TAG POS=1 TYPE=INPUT:IMAGE FORM=ACTION:/map.php?Map=8 ATTR=NAME:Find&&SRC:https://graphics.tppcrpg.net/maps/8.png
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/map.php?Map=8 ATTR=NAME:Catch
TAG POS=1 TYPE=A ATTR=TXT:Return<SP>To<SP>Dark<SP>Cave!

so basically im playing a pokemon game in which i can catch pokemons from a map.. i want to automate this process. But the problem is that not every time it finds a pokemon, sometime it says: Sorry, you didn't find any Pokémon! Try again!

So i was wondering maybe if someone could edit my code like this that if that box appears saying 'Sorry, you didn't find any Pokémon! Try again!' or if it doesnt find any pokemon under 2-3 seconds, the whole code should restart automatically.. also note the last code line which is return to Dark Cave. So the map name is Dark Cave and there's a link you can click to directly return to the map once you've caught the pokemon. Please take that in the code too..

Im using iMacros on Chrome on MacBook Pro.

Yours sincerely,
Darkness
Last edited by Darkness on Sun Jul 21, 2019 5:31 am, edited 1 time in total.
chivracq
Posts: 8432
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !TIMEOUT or if and else statements guidance needed.

Post by chivracq » Sun Jul 21, 2019 4:57 am

Darkness wrote:
Sun Jul 21, 2019 4:34 am
so heres the code:

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://www.tppcrpg.net/map.php?Map=8
TAG POS=1 TYPE=INPUT:IMAGE FORM=ACTION:/map.php?Map=8 ATTR=NAME:Find&&SRC:https://graphics.tppcrpg.net/maps/8.png
TAG POS=1 TYPE=DIV ATTR=ID:imacros-highlight-div
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/map.php?Map=8 ATTR=NAME:Catch
TAG POS=1 TYPE=DIV ATTR=ID:imacros-highlight-div
TAG POS=1 TYPE=A ATTR=TXT:Return<SP>To<SP>Dark<SP>Cave!
TAG POS=1 TYPE=DIV ATTR=ID:imacros-highlight-div
so basically im playing a pokemon game in which i can catch pokemons from a map.. i want to automate this process. But the problem is that not every time it finds a pokemon, sometime it says: Sorry, you didn't find any Pokémon! Try again!

So i was wondering maybe if someone could edit my code like this that if that box appears saying 'Sorry, you didn't find any Pokémon! Try again!' or if it doesnt find any pokemon under 2-3 seconds, the whole code should restart automatically.. also note the last code line which is return to Dark Cave. So the map name is Dark Cave and there's a link you can click to directly return to the map once you've caught the pokemon. Please take that in the code too..

Yours sincerely,
Darkness

OK, this one is correctly opened in the 'General' Sub-Forum (after I disapproved your previous Thread opened in the 'iMacros Consultants' Sub-Forum).
Thread Title is also correct, even if "guidance needed" has no use, but it's good enough...
FCI still missing, read my Sig...
=> iMacros for CR v10.0.5, 'Free'/'PE'...?, CR75...?, OS...?

But OK, good luck... (I don't help for Games, myself...) :wink:
- (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...
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 5:25 am

Lol thank you :)
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 2:01 pm

Bump
User avatar
thecoder2012
Posts: 313
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: !TIMEOUT or if and else statements guidance needed.

Post by thecoder2012 » Sun Jul 21, 2019 2:46 pm

chivracq wrote:
Sun Jul 21, 2019 4:57 am
FCI still missing, read my Sig...
=> iMacros for CR v10.0.5, 'Free'/'PE'...?, CR75...?, OS...?
Your list is not long enough but a little funny. :lol:
chivracq wrote:
Sun Jul 21, 2019 4:57 am
But OK, good luck... (I don't help for Games, myself...) :wink:
I help for Games (and iMacros) but not for free. :wink:
Darkness wrote:
Sun Jul 21, 2019 2:01 pm
Bump
Good luck! :wink:
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
chivracq
Posts: 8432
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !TIMEOUT or if and else statements guidance needed.

Post by chivracq » Sun Jul 21, 2019 3:19 pm

thecoder2012 wrote:
Sun Jul 21, 2019 2:46 pm
chivracq wrote:
Sun Jul 21, 2019 4:57 am
FCI still missing, read my Sig...
=> iMacros for CR v10.0.5, 'Free'/'PE'...?, CR75...?, OS...?
Your list is not long enough but a little funny. :lol:
Yeah well, I never understand why it is apparently so "complicated" for so many Users to mention 3 Versions about their Environment, and/or have to play "Little Detective" to deduct their FCI... :shock:
Darkness wrote:
Sun Jul 21, 2019 4:34 am
Im using

Code: Select all

iMacros on Chrome on MacBook Pro.
=> FCI:

Code: Select all

iMacros for CR v10.0.5, 'Free', CR75...(?), MacOS.
(There is no 'PE' Version for Linux & MacOS...)

>>>
thecoder2012 wrote:
Sun Jul 21, 2019 2:46 pm
chivracq wrote:
Sun Jul 21, 2019 4:57 am
But OK, good luck... (I don't help for Games, myself...) :wink:
I help for Games (and iMacros) but not for free. :wink:
I hope you accept (Rare) Pokemons as a Payment, ah-ah...!? 8)
- (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...
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 5:09 pm

thecoder2012 wrote:
Sun Jul 21, 2019 2:46 pm
chivracq wrote:
Sun Jul 21, 2019 4:57 am
FCI still missing, read my Sig...
=> iMacros for CR v10.0.5, 'Free'/'PE'...?, CR75...?, OS...?
Your list is not long enough but a little funny. :lol:
chivracq wrote:
Sun Jul 21, 2019 4:57 am
But OK, good luck... (I don't help for Games, myself...) :wink:
I help for Games (and iMacros) but not for free. :wink:
Darkness wrote:
Sun Jul 21, 2019 2:01 pm
Bump
Good luck! :wink:
Dude it should be very simple for a programmer.. i got nothing to pay, i can only request..
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 5:38 pm

If anyone could help please with the !TIMEOUT perhaps.. if the element is not found within 2 or 3 seconds then it shall only restart the whole script from beginning and not exit with an error
chivracq
Posts: 8432
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !TIMEOUT or if and else statements guidance needed.

Post by chivracq » Sun Jul 21, 2019 6:07 pm

Darkness wrote:
Sun Jul 21, 2019 5:38 pm
If anyone could help please with the !TIMEOUT perhaps.. if the element is not found within 2 or 3 seconds then it shall only restart the whole script from beginning and not exit with an error

Yeah well, I don't know where you "found" that '!TIMEOUT' Command, it's been deprecated for about 8 years now...! :shock:
And I don't think it still even works in your 'v10.0.5 for CR' Version anymore... :P

Have a look at the 'Command Reference' in the Wiki, this should be your only "Source" for checking valid/supported Commands (per Version/Browser), all Commands have very self-explanatory Names and the whole Wiki/Documentation is very well written, with Use + Syntax + Examples... :idea:
And then, yep..., once you've found an "interesting" Command in the 'Command Reference', you can always search the Forum on that Command as a Search Keyword if you want to find more ("real") Code Examples from Scripts from Forum Users... :idea:

("Scripts from Forum Users" is not always a "Guarantee" that those Scripts and Users will be using all Commands "correctly", but if I reacted in that Thread and helped that User, I usually mention it when I notice they (try to) use some Command(s) "not completely correctly", even if the main Purpose of that Thread is not about that specific Command...)
- (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...
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 6:24 pm

I did look up this command on the wiki and according to my knowledge, there's now way to execute a !TIMEOUT command without exiting with an error.. I just want to know how can I just restart the whole code automatically once the timeout is there.. don't wanna exit with the error :D

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

Re: !TIMEOUT or if and else statements guidance needed.

Post by chivracq » Sun Jul 21, 2019 6:27 pm

Darkness wrote:
Sun Jul 21, 2019 6:24 pm
I did look up this command on the wiki and according to my knowledge, there's no[w] way to execute a !TIMEOUT command without exiting with an error.. I just want to know how can I just restart the whole code automatically once the timeout is there.. don't wanna exit with the error :D

Thanks

Hum..., then check the 'Command Reference' again... :wink:
- (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...
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Sun Jul 21, 2019 7:27 pm

I can't please help
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Mon Jul 22, 2019 1:34 am

anyone???
Darkness
Posts: 13
Joined: Sun Jul 21, 2019 3:10 am

Re: !TIMEOUT or if and else statements guidance needed.

Post by Darkness » Mon Jul 22, 2019 9:26 am

Please help somebody, show some humanity :D
chivracq
Posts: 8432
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !TIMEOUT or if and else statements guidance needed.

Post by chivracq » Mon Jul 22, 2019 1:14 pm

Darkness wrote:
Mon Jul 22, 2019 9:26 am
Please help somebody, show some humanity :D
Hum, excellent Word Choice, and I hope the Pun was intended, ah-ah...! 8)
... But "showing some humanity" is exactly the Reason why I don't help for Scripts for playing/cheating on Games, or you'll soon have only Bots playing your Game against other Bots...! :shock:
(I also don't help for Social Media or Forums with "fake" Like/Follow/Retweet/Comment/etc..., and for Spam, and also for cheating on Games/Votes thus..., and Captcha also... :roll: )

It's "nice" to think you are more "clever" than the other Players and want to automate playing on that Game but you need to do it on your own... If you ask on a Tech Forum for sbd to write your Script, soon all other Players will also be using the same Script and you won't gain any Advantage at all... And some other Players will start complaining, the Site Owner will have to take Measures to prevent Bots, by implementing some Captcha for example, and you will have "screwed" it for everybody playing that Game...! :idea:

Some "Word of Hope", I also gained absolutely all my Knowledge about iMacros from (still) playing some "stupid" Games :oops: , but tja...!, I never asked for any Help... And as you can see, a few years later, I've become apparently Advanced enough that I can now answer and find a Solution for 90% of the Threads on this Forum... :o
So..., if I could do it, you can do it also...! :wink:
Last edited by chivracq on Mon Jul 22, 2019 5:13 pm, edited 1 time in total.
- (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...
Post Reply