Jump to content

Search the Community

Showing results for tags 'tables'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 9 results

  1. I'm trying to get the number of columns in a specific row in a Word table and am stuck. I need a push. Program below and Word file attached. Thanks. #AutoIt3Wrapper_run_debug_mode=Y ;use this to debug in console window #include <Word.au3> $oWord = _Word_Create(True, True) ;Create Word application object, make it visible, and force a new instance of Word $oDoc = _Word_DocOpen($oWord, @ScriptDir&"\ColumnTest.docx", Default, Default, True) ;Open the Word document $iTablesCount = $oDoc.Tables.Count ;get Tables count in $oDoc Pause("$iTablesCount = '" & $iTablesCount & "'") $iRowCount = $oDoc.Tables.Item(1).Rows.Count ;Table hard coded $iColCount = $oDoc.Tables.Item(1).Columns.Count Pause("Table#1 $iRowCount = '" & $iRowCount & " $iColCount = '" & $iColCount & "'") ;trying to get the number of columns in each row ;$ColCountInRow = $oDoc.Tables.Item(1).Rows(1).Columns.Count ;this fails and read somewhere to use Cells.Count $ColCountInRow = $oDoc.Tables.Item(1).Rows(1).Cells.Count ;hard code Row 1 <<<<< ERROR here ;this is the error I get ;: ==> The requested action with this object has failed.: ;$ColCountInRow = $oDoc.Tables.Item(1).Rows(1).Cells.Count ;$ColCountInRow = $oDoc.Tables.Item(1)^ ERROR Pause("Row 1 has " & $ColCountInRow & " Columns") Exit Func Pause($text="") MsgBox(262144, "DEBUG", "Paused: " & $text) EndFunc ColumnTest.docx
  2. Hi, first of all thanks to all the guys who always help people in the forums, I wouldn't be able to do anything if wasn't for your help, even if I don't ask it myself. I've created this code to get some info on a monitoring network on my work. It relays on _IETableGetCollection and _IETableWriteToArray. It works well, but take around 3:25 minutes to get the info from 28 pages (some of them are large and take longer to load, but most of them are small and fast). My question is if you see a way to get the program to go faster... I've tried to make it easy for you to understand and edited somethings with sensitive info. (Some of the pages doesn't have the black divider with MIRA in the end, so I need to search if it is there or not.) #include <IE.au3> #include <array.au3> Local $oIE = _IECreate("about:blank", 0, 0) Local $paginas[28] = [89, 90, 91, 92, 93, 96, 105, 113, 119, 125, 126, 129, 131, 133, 135, 137, 139, 140, 141, 144, 145, 146, 148, 149, 150, 151, 158, 159] Local $Datos_array[0][2] Local $oTable Local $tabla Local $aux_x = 1 Local $ar = 1 Local $Numtables_datos = 0 MsgBox(0, "asd", "asd") For $pag = 0 To UBound($paginas) - 1 Step 1 _IENavigate($oIE, "<WEBSITE URL>" & $paginas[$pag]) ; <<< the pages to load are always the same except for the last digits. _ArrayAdd($Datos_array, $paginas[$pag] & "|" & "Entrante", 0, "|") ; <<<<<<<<<<<<<<<< adds the page number toarray [0, 0] ;############################################ START counts amount of tables with traffic $oTable = _IETableGetCollection($oIE) Local $iNumTables = @extended For $i = 3 To $iNumTables - 2 Step 1 $oTable = _IETableGetCollection($oIE, $i) $nomb_tabla2 = _IETableWriteToArray($oTable) ; <<<<<<<< TABLE TO ARRAY. $string2 = StringStripWS($nomb_tabla2[1][0], 8) If $string2 <> "MIRA" Then $Numtables_datos = $Numtables_datos + 1 Next $tabla_End = $iNumTables - $Numtables_datos ;############################################ FIN $tabla_Start = 4 $tabla_trafico = 2 For $for = 1 To $Numtables_datos Step 1 $oTable = _IETableGetCollection($oIE, $tabla_Start - 1) ; <<<<<<<<<<< NAME OF THE TABLE; row2 = mira $nomb_tabla = _IETableWriteToArray($oTable) ; <<<<<<<< TABLE TO ARRAY ;########################################### ADDS the traffic number into the row $string = StringStripWS($nomb_tabla[1][0], 8) If $string == "MIRA" Then ;si o si pasa por aca 1 vez _ArrayAdd($Datos_array, $nomb_tabla[0][0]) $nomb_aux = $nomb_tabla[0][0] $aux_x = 1 $tabla_trafico = $tabla_trafico + 2 Else ;esto deberia ser por row _ArrayAdd($Datos_array, $nomb_aux & " " & $aux_x) $aux_x = $aux_x + 1 $tabla_trafico = $tabla_trafico + 1 EndIf $oTable = _IETableGetCollection($oIE, $tabla_trafico) Local $aTableData = _IETableWriteToArray($oTable) $bps = _ArrayToString($aTableData, "|", 0, 0, @CRLF, 0, 0) $bps = StringRight($bps, 5) $bps = StringLeft($bps, 4) $trafico_actual = _ArrayToString($aTableData, "|", 0, 0, @CRLF, 2, 2) If $bps == "Gbps" Then $trafico_actual = $trafico_actual * 1000 If $bps == "Kbps" Then $trafico_actual = $trafico_actual / 1000 $Datos_array[$ar][1] = $trafico_actual $ar = $ar + 1 If $string == "MIRA" Then $tabla_Start = $tabla_Start + 2 Else $tabla_Start = $tabla_Start + 1 EndIf Next $ar = $ar + 1 ;~ ############# CAÍDA ############ ;~ If $actual_entrante = 0 Then ;~ $xxx = 0 ;~ Do ;~ MsgBox(0, "Tráfico Caído", $paginas[$i], 5) ;~ $xxx = $xxx + 1 ;~ Until $xxx = 10 ;~ EndIf ;~ ############# CAÍDA ############. Local $Numtables_datos = 0 Next _ArrayDisplay($Datos_array, "Array display") _IEQuit($oIE) Thanks!! monitoria.html
  3. Hi All, Here's a really simple question. I ran the code from the helpfile under: _SQLite_Open Issue is I end up with an error message: SQLite3.dll Can't be Loaded! I placed the *.dll in the include folder, but still nothing. Where must this file be placed.
  4. @water Wondering if you know if the OutlookEx.udf will allow someone to "paste'/"create" a table in an appointment? I can add text to the body, but I'd like to all be formatted to look nice for the user.
  5. Hi, what else can we add in <table> besides <tr> & <td> to make it more interative to the users?
  6. In GuiRichEdit you can copy and paste from the buffer table. How can you create from the code? I do not find any such function in Help. Tell me, please, who knows how to do it?
  7. Well if you think in terms of a flat file e.g. INI file then perhaps it becomes a little easier to understand [Library] 1=Meshuggah,Bleed,C:\%USERPROFILE%\Music\Meshuggah\Bleed.mp3 #Artist,Song,Location 2=Enter Shikari,The One True Colour,C:\%USERPROFILE%\Music\ES\TOTC.mp3 3=Kid Cudi,Day 'N' Night,C:\%USERPROFILE%\Music\KCudi\Blah.mp3 [Playlist] Playlist1=1,2,3 # Songs 1, 2 and 3 from the library section Playlist2=2The above example is a simple flat file structure in which if I were to add a new song e.g. Artist, Song, Location, I would simply increment the key up by 1, therefore the next value would be 4, 5 etc... Then I have a playlist section in which I use the key as the name of the playlist and then the value as a list of songs which correspond to the key in the library section. Make sense? So in a relational database this could be mapped by having two tables for both sections that denote the information about a particular song (artist, song, location( and playlist (name), then we have a third table in which we bind which playlist a particular song belongs to. Library - id (primary key or INI key in our case - this is a surrogate key, as it's auto-generated by the DBMS) - artist - song - location Playlist - id (primary key - this is a surrogate key, as it's auto-generated by the DBMS) - name (the INI key in our case) Then we have a third table to bind the playlist and song together Playlist_Library - playlist_id (foreign key to the primary key in the playlist table i.e. a link to get the name of the playlist) - library_id (foreign key to the primary key in the library table i.e. a link to get information about a song by using a single value) Note: There is no primary key here, as playlist_id & library_id are a composite key, which make up a primary key*. But don't worry about that for now. * A set of attributes which guarantee they will be unique throughout the entire table e.g. a social security id would be one, as it's pretty much guaranteed no two rows will have the same id and thus it's easy to distinguish between the two rows. The data would then look like this: (The pipe character is just to denote each column in the table) Library id | artist | song | location 1 | Meshuggah | Bleed | C:\%USERPROFILE%\Music\Meshuggah\Bleed.mp3 2 | Enter Shikari | The One True Colour | C:\%USERPROFILE%\Music\ES\TOTC.mp3 3 | Kid Cudi | Day 'N' Night | C:\%USERPROFILE%\Music\KCudi\Blah.mp3 Playlist id | name 1 | Playlist 1 2 | Playlist 2 3 | Awesome songs Playlist_Library playlist_id | library_id 1 | 1 1 | 2 1 | 3 2 | 2 Phew, glad we got here. So does it make a little more sense now? Note: I have added a couple of keywords which I suggest you go and search, such as primary key, surrogate key and foreign key to name a few.
  8. I saw in the Help File, the UDF for managing Excel 2013 and on Windows 7, but I can't manage how can I add silently a specific value in a specific cell in a specific Excel file Pls help me And yes I updated to the last version of Autoit...
  9. I'm trying to pull the class from a table. I have no problem pulling the href but the class is giving me errors. Here is what i'm trying to do. $oForm = _IETableGetCollection ($oIE, 3) $oLinks = _IETagnameGetCollection($oForm, "TR") For $oLink in $oLinks ConsoleWrite($oLink.class & @CRLF) NextSo it appears i can't call for .class like i am. Does anyone have any suggestions? This seems to work just fine though $oForm = _IETableGetCollection ($oIE, 3) $oLinks = _IETagnameGetCollection($oForm, "a") For $oLink in $oLinks ConsoleWrite($oLink.href & @CRLF) Next An example of one of the cells in the table-- <tr align="left" class="color"><td><a href="http://autoitscript.com">Good friendly People</a></td> So what i'm looking for is how to pull out the "color" and add it to the table i'm creating in the next step. I'd really like to just look within the table and not the entire sheet. Thanks!
×
×
  • Create New...