Need help for a script

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
SevenOFF
Newbie
Posts: 5
Joined: Tue May 07, 2019 10:07 am

Need help for a script

Post by SevenOFF » Tue May 07, 2019 10:24 am

So i made a Script (for forza horizon 4), if someone have discord it would be much more easier for me

so i created the base of the script that is searching the car etc ...

but when he's done with the research, i wanted him, that if he find this texte on the screen, then he make the script for buying it, but if not he make escape and redo the base of the script again and again

but it's impossible for me to say to the script that if he found he do the next of the script, but if not he press esc and repeat !

I tried Repeat> and Until>

but still not working

My discord Seven#2762

Thanks for the help ! :D

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Need help for a script

Post by Dorian (MJT support) » Tue May 07, 2019 10:52 am

Being familiar with Horizon 4, I'd say this is going to be quite a challenge. I think it's highly unlikely that the text will be accessible and you'd have to rely entirely on Image Recognition and maybe looking out for pixel colours.

And the trouble with Image Recognition I foresee is that whatever you're looking for is often going to be on a dynamic or changing background.
Yes, we have a Custom Scripting Service. Message me or go here

SevenOFF
Newbie
Posts: 5
Joined: Tue May 07, 2019 10:07 am

Re: Need help for a script

Post by SevenOFF » Tue May 07, 2019 4:35 pm

the thing that i want him to find i a button (https://prnt.sc/nlmpbf) so that's not the real problems the real problems is that he doesn't want to repeat it, and he ignore the Until> so thats my real problems

Ps : my script https://pastebin.com/CXGzwn1H

SevenOFF
Newbie
Posts: 5
Joined: Tue May 07, 2019 10:07 am

Re: Need help for a script

Post by SevenOFF » Tue May 07, 2019 4:55 pm

The real problems is that the script ignore Repeat> and Until> that's the problems, and what i wan to do to the script is only detecting buttons, so the background is not very moving, and that's working because one of his first step is to put the cursor on the auction buttons so ...

Here is the "Button" https://prnt.sc/nlmpbf

and that's my script https://pastebin.com/CXGzwn1H

if you could help me about that

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Need help for a script

Post by Dorian (MJT support) » Wed May 08, 2019 12:28 pm

You have the incorrect usage of Repeat/Until

You have this :

Code: Select all

Repeat>
//snipped
Until>FindImagePos>C:\Users\Seven\Desktop\bots\test 
The best place to find out about the correct usage and see a sample is here : Repeat
Yes, we have a Custom Scripting Service. Message me or go here

SevenOFF
Newbie
Posts: 5
Joined: Tue May 07, 2019 10:07 am

Re: Need help for a script

Post by SevenOFF » Fri May 10, 2019 2:55 pm

So if I say to the script that if he found the button for the car, he change the variable "car" To 1 and If i write "repeat>" "Until>car=1" It will be good no??!

SevenOFF
Newbie
Posts: 5
Joined: Tue May 07, 2019 10:07 am

Re: Need help for a script

Post by SevenOFF » Fri May 10, 2019 2:56 pm

And I didn't really understand for the variable ( how to create and modify) if you could help me about that

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts