Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Tinkering; Like Guntering for the Connected Generation.

191011121315»

Comments

  • Registered Users, Registered Users 2 Posts: 1,134 ✭✭✭tellmeabit


    Hey, I'd be interested to see the code if that's OK?



  • Registered Users, Registered Users 2 Posts: 11,757 ✭✭✭✭patsy_mccabe


    Sub Linear()

    '############# This WORKING ##########

    Dim Driver As New Selenium.WebDriver
    Dim rowc, columnC As Integer
    Dim ABC As Selenium.WebElement

    Dim String1 As String
    Dim String2 As String
    Dim Full_string As String
    Worksheets("Linear").Activate

    'Combine to form URL'
    String1 = "https://webapp.icbf.com/v2/app/bull-search/view-beef-type/"
    String2 = Cells(10, 10)

    Full_string = String1 & String2
    'MsgBox (Full_string)

        rowc = 1
    columnC = 1

    Application.ScreenUpdating = False
    Driver.Start "chrome"
    Driver.Get (Full_string)
    ' Application.Wait Now + TimeValue("00:00:05")
    For Each th In Driver.FindElementByClass("simple-table").FindElementsByTag("tr")

    For Each tr In th.FindElementsByTag("td")

    ActiveSheet.Cells(rowc, columnC).Value = tr.Text

    columnC = columnC + 1

    Next tr
    columnC = 1
    rowc = rowc + 1

    Next th
    'Application.Wait Now + TimeValue("00:00:01")
    Driver.Quit

    End Sub



  • Registered Users, Registered Users 2 Posts: 11,757 ✭✭✭✭patsy_mccabe


    Above is an example of the VBA code in one of the macros. Anything with a ' before it is just a comment, not code.

    This code extracts the table from the 'Linear Type' page on ICBF. It's actually a separate webpage, like all the other tabs.

    You also have to install and update the Chrome Driver regularly to keep it working. Those Wise Owl videos above will explain everything.



  • Registered Users, Registered Users 2 Posts: 559 ✭✭✭anthony500_1


    Man..... It's amazing how different brains work, It's stuff like this that blows my mind, I can't make head nor tails of it, Fair play patsy your knowledge is endless



  • Registered Users, Registered Users 2 Posts: 11,757 ✭✭✭✭patsy_mccabe


    I was amazed myself that I got it working, just kept at it. Those Wise Owl videos on the link above explain it all step by step. It's Visual Basic language. I started with small bits of coding and then saved those on separate Excel files when I got them working. I just built it from there.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 521 ✭✭✭RockOrBog


    I'm thinking in investing in a set of these, the only thing I'm not sure of is how they are powered. It says POE but I'm not sure if I have to buy separate POE units.

    Any advice appreciated

    https://www.freetv.ie/wireless-bridges/



  • Registered Users, Registered Users 2, Paid Member Posts: 6,695 ✭✭✭emaherx


    You could always contact the seller but I'm fairly sure they come with 2 passive POE blocks and are ready to use.

    I think @pms7 deals with them regularly.

    🌈 🌈 🌈 🌈



  • Registered Users, Registered Users 2 Posts: 494 ✭✭pms7


    I dont buy them there but with other sellers the poe injectors are not included. That is expensive, what distance have you, this is cheaper option https://www.freetv.ie/access-points/

    or contact me i could send you them ready to go all wiring etc

    https://www.freetv.ie/access-points/



  • Registered Users, Registered Users 2 Posts: 521 ✭✭✭RockOrBog




  • Registered Users, Registered Users 2 Posts: 494 ✭✭pms7




  • Advertisement
  • Registered Users, Registered Users 2 Posts: 494 ✭✭pms7


    with full line of sight, no obsctuctions?



  • Registered Users, Registered Users 2 Posts: 521 ✭✭✭RockOrBog


    No obstructions.

    Yes I want to put a ptz camera in the shed, I'm not entirely sure what I'll do yet, I might get a 4g router for the shed instead, I'll have to suss out a suitable network if there is one. If I go down the wireless bridge route I'll give you a shout thanks



  • Registered Users, Registered Users 2 Posts: 494 ✭✭pms7


    wireless bridge cheaper in long run, especially if can install yourself, and less hastle topping up. Can check network speeds on your phone inside shed. Big difference inside and out. Usually have to put router outside sheeting. I can sort camera too if you want.



Advertisement