Jump to content
Sign in to follow this  
Zud120

Translation Python code in Autoit

Recommended Posts

Zud120

I need  help translation Python code in Autoit use imagesearch.au3
 

Settings.MoveMouseDelay =0.01

while True:
    try:
        click(Pattern("refresh.png").targetOffset(-1,0))
    except:
        pass
    try:
        wait(Pattern("loadingOK.png").targetOffset(-2,-1),(6))
    except:
        continue
    try:
        click(Pattern("mobila.png").targetOffset(-2,-4))
        click(Pattern("bosslist.png").targetOffset(-23,0))
        click(Pattern("mobila_exit.png").targetOffset(50,0))
    except:
        pass
    for b in range(12):
        try:
            click(Pattern("dead.png").targetOffset(61,0))
        except:
            pass
        for c in range(5):
            try:
                click(Pattern("mobila.png").targetOffset(-2,-5))
                click(Pattern("bosslist.png").targetOffset(-23,0))
                if exists(Pattern("all_boss.png").similar(0.92).targetOffset(-26,-2)):
                    click(Pattern("all_boss.png").similar(0.92).targetOffset(-93,20))
                    if exists(Pattern("boss_timeout.png").targetOffset(-4,0)):
                        click(Pattern("boss_timeout.png").targetOffset(-2,0))
                        try:
                            click(Pattern("mobila_exit.png").targetOffset(49,0))
                        except:
                            pass
                        continue
                    else:
                        pass
                    wait(Pattern("bossOK.png").similar(0.92),(90))
                    if exists(Pattern("bita1.png").exact().targetOffset(0,22)):
                        click(Pattern("bita.png").targetOffset(-1,0))
                        doubleClick(Pattern("bitaX5.png").similar(0.82).targetOffset(0,37))
                    else:
                        pass
                    click(Pattern("bita.png").targetOffset(-1,0))
                    wait(2,5)
                    break
                    try:
                        click(Pattern("mobila_exit.png").targetOffset(49,0))
                    except:
                        pass
                    continue
                else:
                    pass
                click(Pattern("mobila_exit.png").targetOffset(51,0))
            except:
                break
        while True:
            try:
                wait(0,1)
                click(Pattern("boss_exit.png").targetOffset(54,-1))
                click(Pattern("boss.png").targetOffset(0,-1))
                wait(0,1)
                if exists(Pattern("dead.png").targetOffset(4,-1)):
                    click(Pattern("dead.png").targetOffset(61,-1))
                    wait(0.1)
                    break
                else:
                    pass
            except:
                break
Edited by Zud120

Share this post


Link to post
Share on other sites
JLogan3o13

Welcome to the forum. What have you tried on your own? If you look through the help file, you will see that a lot of what you have in your code translates nicely to AutoIt. Give it a shot on your own, and let us know if you get stuck.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Melba23

Zud120,

And given the names of the images for which you wish to search, reading the Forum rules (there is also a link at bottom right of each page) would be a good idea as well. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
JLogan3o13

It's so obviously a game it's silly.

 

bosslist.png could be a hit list for all of my former employers :)

mea culpa, I missed the game references.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Mobius

Curious it was not locked considering it's obviousness. *shrug*

Edited by Mobius

Share this post


Link to post
Share on other sites
Zud120

I have no idea how to make operational the code below to AuroIt, if I had an idea how to write one, im would not ask this question on the forum, names of pictures do not matter, it is important that performs the same function, so I ask for help you as for me it's hard, yes it is a bot for the game, but it does not matter, tell me how to compile code for Autoit :)

Share this post


Link to post
Share on other sites
jchd

Contrary to what you believe it does matter.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
Zud120

I do not understand what you write to me because I do not speak English, I understand kogotovy code here no one will give me, if such a question to ask for ready code rewriting? I apologize for creating this topic, I was hoping for your help in this matter, because I know nothing about this program, in Russian forum I did not answer so I created this topic in this forum.if someone can help me on this issue please write to this address vitalik.demidenko.80@mail.ru:)

Edited by Zud120

Share this post


Link to post
Share on other sites
Zud120

Well maybe not the forum, but the mail is also possible to help, is not it?

Share this post


Link to post
Share on other sites
Melba23

Zud120,

Even if you do not speak English, you cannot post about game-bots here. Thread closed. :naughty:

Those who queried not locking this thread earlier,

I do not lock on suspicion, only on proof - and that was not provided until post #8. Now it is clear, I am locking. Any further questions, PM me. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×