Jump to content

Recommended Posts

Posted

Hello!

I am trying to code a little script that checks e.g. item 1 on a marketplace, clicks on it, copies the price & makes the owner a buyoffer; then checks item 2, clicks.... etc.
The Buttons and Links don't have an ID, they are named the same and stored in "div".

Few years ago I could do everything with Pixelsearch, but this doesn't work anymore with the site. Sometimes buttons move, sometimes color changes etc.

So I've read different posts and I see that FAQ 31 is very important.

 

Im no genius and not that much into coding either. Can you please hint me in the right direction what I should go for?
Atm I was thinking about webdriver, but is my goal achievable with it? Or maybe iuiautomation is better?

 

Thank you

Posted

Hey! A quick note: It is not a "gaming bot"!

It is for a marketplace and I want to try partly automating my trading efforts with it

Posted

little script like this:

#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
#include <MsgBoxConstants.au3>
#include <Misc.au3>
Example()

Func Example()
    Local $idListBox,$Form1

    ; Create GUI
   $Form1 =  GUICreate("List Box Set Cur Sel", 400, 296)
    $idListBox = GUICtrlCreateList("", 2, 2, 396, 296)
    GUISetState(@SW_SHOW)
        _GUICtrlListBox_AddString($idListBox,"Item | Price")
        _GUICtrlListBox_AddString($idListBox,"Tea | 20$")
        _GUICtrlListBox_AddString($idListBox,"Water| 5$")
        While 1
    if WinActive($Form1) Then
       if _GUICtrlListBox_GetSel($idListBox,0) = True Then
       _GUICtrlListBox_SetCurSel($idListBox, 1)
    EndIf
For $i = 1 To 2
    if _GUICtrlListBox_GetSel($idListBox,$i) = True Then
$Text = ControlCommand("[CLASS:AutoIt v3 GUI]","","[CLASS:ListBox;INSTANCE:1]","GetCurrentSelection", "")
if $Text <> "" or $Text <> 0 Then
   if _IsPressed("01") Then ;;mouse left click
   MsgBox(64,"",$Text)
EndIf
EndIf
EndIf
Next
EndIf
       ;ToolTip(_GUICtrlListBox_GetText($idListBox,$i))

if GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
WEnd

EndFunc   ;==>Example

 

none

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...