Sign in to follow this  
Followers 0
ruslanas402

Stucks after "File to upload" window

2 posts in this topic

Greeting, so I've been trying to come up with solution, but no luck. Despite I tried to automate upload function, I released that it freezes after "Choose File to Upload" window appears..

 

#include <IE.au3>
;#include  <_Dbug.au3>
Global $oIE = _IECreate("http://tinypic.com/", 1)
Global $upload2 = _IEGetObjById($oIE, "the_file")
_IEAction($upload2, "click")
;Sleep(1000)
$hWnd = WinGetHandle("Choose File to Upload")
MsgBox(0, "", $hWnd)

Have anybody faced this situation?

btw: srry for the advertise:) Besides it's no matter which site I'm trying to do this it's all the same.

Share this post


Link to post
Share on other sites



Your script is waiting for the input in the modal JS-window. Read

and all following from mLipok. With this knowledge you are ready to solve the problem.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0

  • Similar Content

    • ruslanas402
      Open webpages by checking boxes
      By ruslanas402
      Hello everyone, don't even know how to ask.  My code is:
      #include <String.au3> #include <IE.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 700, 500, 192, 124) $Button1 = GUICtrlCreateButton("View", 576, 24, 89, 41) Global $oIE = _IECreate("https://www.youtube.com/playlist?list=PL4Jcq5zn02jKpjX0nqI1_fS7mEEb5tw6z", 1, 1, 0) Sleep(1000) Global $sHTML = _IEDocReadHTML($oIE) $FirstChunks = _StringBetween($sHTML, 'pl-video-title-link yt-uix-tile-link yt-uix-sessionlink', '<div class="pl-video-owner') $x = 16 For $a In $FirstChunks $actualdata = _StringBetween($a, '">', '</a>') ;$actualdata2 = _StringBetween($a, 'href="', '&amp;') $Checkbox1 = GUICtrlCreateCheckbox($actualdata[0], 24, $x, 500, 17) $x = $x + 20 Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Somehow I need to open webpages where checkbox is checked by presing button view, I think I need somehow asign $actualdata with $actualdata2. Any ideas would be very appreciated
    • killertone
      ControlSend Messing up the string
      By killertone
      Greetings!
      I have been trying to get send to this textarea on a website a message through ControlSend because _IEFormElementSetValue doesnt work on it, so i get the hwnd of the IE window then do the ControlSend to the window, and the message it sends doesnt type some of the letters.
      The textarea
      <textarea style="overflow:hidden;height:undefinedpx;" class="form-control input-sm" placeholder="Add a comment" rows="1" data-reactid=".0.3.2.1.2.0.$view.8.1.0.0.1"></textarea> How im getting the textarea:
      $comment_area = _IETagNameGetCollection($oIE,"textarea") for $element in $comment_area if $element.placeholder = "Add a comment" Then _IEAction($element,"focus") Sleep(1500) ;_IEFormElementSetValue($element,$comment_list[$random_index]) ;_IEFormSubmit($element) ControlSend($hIE,"","[CLASS:Internet Explorer_Server; INSTANCE:1]",$comment_list[$random_index],1) ;Send("{ENTER}") Sleep(3000) ;Hacer que sea random EndIf Next When i use _IEFormElementSetValue  it changes the text on the box, but it doesn't change the value or something because when i send an Enter key it doesn't submit the message (I Also tried _IEFormSubmit)
      With ControlSend it does send it but corrupted, for example: Message: Pretty nice Result: ety nice
      Also i know the element is the actual one im referring because if i use _IEAction($element,"focus") it focuses the one i want.
      Any help appreciated!
    • emrecnl
      Is it possible to use Firefox instead of IE if script is written for IE?
      By emrecnl
      Well I guess my title summarizes the question.
      What do I need to change in script? Should I only edit IE paths to Firefox?
    • Robdog1955
      Enter data into IE form that has a javascript editbox
      By Robdog1955
      I am trying to use IE.au3 UDF to auto fill a webpage. All goes well until I get to an editbox that appears to be a javascript. I am attaching a pic of the editbox. (I would be glad to add any other information needed to help me past this last hurdle in my script. I'm just not sure what questions you have to help me with this.)

    • Dent
      [SOLVED] How do I read this result?
      By Dent
      Hi,
      I've written a script to automate the logging in to a website and the generation of results as shown in Capture1.JPG
      You'll see the number of results is displayed at the top, 12 in this case. What I can't work out is how to read that number into a variable.
      The section of code from the site is displayed in Capture2.JPG
      The only way I can think is to read the whole page with _IEBodyReadText($oIE) then use StringInStr to find it, however the result may be 1, 2 or 3 digits depending on the number of results so I'm not sure how that would be coded.
      Any help greatly appreciated.