1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Noob friendly coding language that works with flash?

Discussion in 'General Programming Chat' started by Frankie4Fingers, Dec 10, 2011.

  1. Frankie4Fingers

    Frankie4Fingers Power Member

    Joined:
    Jan 8, 2009
    Messages:
    676
    Likes Received:
    214
    Hello,

    I have to create a bot that click on links inside Youtube videos. I thought I could easily do this using Zennoposter, unfortunately at the moment ZP doesn't support flash.

    Any suggestions?

    Thanks in advance.
     
  2. thedelimiter

    thedelimiter Newbie

    Joined:
    Nov 11, 2011
    Messages:
    16
    Likes Received:
    8
    Location:
    Chicago
    Home Page:
    AutoIt with IE.au3 library

    You can actually take over the mouse, and move the mouse to a certain IE HTML element. If it's inside a flash window, you'll have to move the mouse to the top-left of the video then move extra to wherever the link is at. Then send a Click.

    If you do use AutoIt3, these functions might help...

    Code:
    ;Takes in an IE browser obj, the element object to mouse to, 
    ;an extra x pixels to move over, and an extra y pixels to move over
    Func MouseToElement($oIE, $oElem, $extraX, $extraY)
        local $x = _IEfindPosX($oElem)
        local $y = _IEfindPosY($oElem)
        $oElem.focus()
        
        $windowleft = $oIE.document.parentwindow.screenLeft
        $windowtop = $oIE.document.parentwindow.screenTop
    
        mousemove($windowleft + $x + $extraX, $windowtop + $y + $extraY, 50)
    	sleep(1000)
    EndFunc
    
    
    func _IEfindPosX($o_object)
        local $curleft = 0
        local $parent = $o_object
        if IsObj($parent) then
            while IsObj($parent)
                $curleft += $Parent.offsetLeft
                $parent = $Parent.offsetParent
            wend
        else
            local $objx = $o_object.x
            if IsObj($objx) then $curleft += $objx
        EndIf
        return $curleft
    EndFunc
    
    func _IEfindPosY($o_object)
        local $curtop = 0
        local $parent = $o_object
        if IsObj($parent) then
            while IsObj($parent)
                $curtop += $Parent.offsetTop
                $parent = $Parent.offsetParent
            wend
        else
            local $objy = $o_object.y
            if IsObj($objy) then $curtop += $objy
        EndIf
        return $curtop
    EndFunc
    
    
     
    • Thanks Thanks x 1
    Last edited: Dec 10, 2011
  3. sirgold

    sirgold Supreme Member

    Joined:
    Jun 25, 2010
    Messages:
    1,260
    Likes Received:
    645
    Occupation:
    Busy proving the Pareto principle right
    Location:
    A hot one
    iMacros scripting edition (the paid one) with its DS technology. You'll find it in the DL section. The AutoIt suggested is pretty good too.
     
    • Thanks Thanks x 1
  4. mark0v

    mark0v Junior Member

    Joined:
    May 6, 2010
    Messages:
    114
    Likes Received:
    20
    I'm pretty sure ubot can handle flash.
     
    • Thanks Thanks x 1
  5. Frankie4Fingers

    Frankie4Fingers Power Member

    Joined:
    Jan 8, 2009
    Messages:
    676
    Likes Received:
    214
    Hey guys, thanks a lot for the inputs. While I was waiting for replies I stuck into iMacros and it seems perfects for my needs.

    Do you know if it supports multithreading?

    Thanks!
     
  6. sirgold

    sirgold Supreme Member

    Joined:
    Jun 25, 2010
    Messages:
    1,260
    Likes Received:
    645
    Occupation:
    Busy proving the Pareto principle right
    Location:
    A hot one
    http://www.iopus.com/imacros/web-scripting.htm ;)

     
    • Thanks Thanks x 1