Jump to content

Help getting data from HTML page - (Moved)


draven76
 Share

Recommended Posts

Hi guys, I'm new to AutoIt and not even a programmer so I need advice to get something done correctly...

I'm loading a webpage in Chrome (with AutoIt of course):

 

$urlString ="https://XXXXXXXXXXX/main/lp-video_student_view/lesson_student_view.php?lp_id=1&id_lesson=2"

send("{F6}")
Send($urlString, 1)
Send("{ENTER}")

(not the best way to do it, suggestions are welcome)

and in that webpage I've got this block:

 

<div style="height:50px;">
                    <div id="row_control_player" class="row" style="">
                        <div class="col-xs-4 text-center">
                            <div class="text-center timebox" style="">
                                <span id="currenttime_box">00:00</span>/<span id="duration_box">07:07</span>
                            </div>
                        </div>
                        <div class="col-xs-8 text-center buttonsbox">
                            <div class="row text-center">
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default" id="control-play" data-toggle="tooltip" data-original-title="" title=""><i class="fa fa-play-circle" aria-hidden="true"></i></button>
                                    <button type="button" class="btn btn-default" id="control-pause" style="display: none;" data-toggle="tooltip" data-original-title="" title=""><i class="fa fa-pause-circle" aria-hidden="true"></i></button>
                                    <button type="button" class="btn btn-default" id="control-rewind" data-toggle="tooltip" data-original-title="" title=""><i class="fa fa-repeat" aria-hidden="true"></i><spam style="margin-left:-2px; font-size: 10px;">10"</spam></button>
                                    <button type="button" class="btn btn-default" id="control-restart" data-toggle="tooltip" data-original-title="" title=""><i class="fa fa-fast-backward" aria-hidden="true"></i></button>
                                    <button type="button" class="btn btn-default" id="control-fullscreen" data-toggle="tooltip" data-original-title="" title=""><i class="fa fa-arrows-alt" aria-hidden="true"></i></button>
                                    <button type="button" class="btn btn-default" id="control-cc" data-toggle="tooltip" title="" data-original-title="sottotitoli"><i class="fa fa-cc" aria-hidden="true"></i></button>
                                    <button type="button" class="btn btn-default" id="control-annotations" data-toggle="tooltip" title="" style="display:none;" data-original-title="annotazioni"><i class="fa fa-list" aria-hidden="true"></i></button>
                                    
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

 

I need to:

1) take the 07:07 value and convert to milliseconds (it could also be over 1 hour)

2) click the button "control-play"

3) sleep for the value obtained from step 1

 

Can anyone help me with this part?

 

Thanks.

 

Bye, Dario

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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