Jump to content

Search the Community

Showing results for tags 'getFileDialog'.

  • 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 1 result

  1. Hi to all, I am writing a feature to an existing internal AutoIt program, based on a client's request. The requested feature would be to grab the file via a button, which reads the file's path. Below the file browsing button would be a button to upload the file into a MySQL server. Initially, my method would be to read the contents of the file provided in the filepath, then convert the contents of the file into binary data, and then store it into a column of a table as a BLOB. I am not sure whether if this is the best approach to storing text/Word/PDF files into the MySQL Server in this way, if the program used is an AutoIt program. So far, I am only able to generate Excel files, but only because there was already an existing BLOB column in an existing table. Sample code: $sTemplateName = "SearchTemplate" $sFilePath = @ScriptDir & "\temp\" & $sTemplateName & ".xls" $iFileExists = FileExists($sFilePath) ; If template file not found, create it. If (Not $iFileExists) Then generateExcelFile($sTemplateName, $sFilePath) EndIf $iFileExists = FileExists($sFilePath) If $iFileExists = 1 Then $oExcel = _ExcelBookOpen($sFilePath, 0) _ExcelWriteCell($oExcel, "Search conducted on " & _NowCalc() & " by " & $username & "", 2, 1) $counter = 0 While Not $recordSet.EOF _ExcelWriteCell($oExcel, 1 + $counter, 6 + $counter, 1) _ExcelWriteCell($oExcel, getName("User", $recordSet.Fields("UserID").value), 6 + $counter, 2) _ExcelWriteCell($oExcel, $recordSet.Fields("InternalName").value, 6 + $counter, 3) _ExcelWriteCell($oExcel, getName("Product", $recordSet.Fields("ProductID").value), 6 + $counter, 4) _ExcelWriteCell($oExcel, $recordSet.Fields("Serial").value, 6 + $counter, 5) _ExcelWriteCell($oExcel, getName("Location", $recordSet.Fields("LocationID").value), 6 + $counter, 6) _ExcelWriteCell($oExcel, $recordSet.Fields("Remarks").value, 6 + $counter, 7) _ExcelWriteCell($oExcel, getFriendlyDate($recordSet.Fields("LastModified").value, 1), 6 + $counter, 8) _ExcelWriteCell($oExcel, getFriendlyDate($recordSet.Fields("CreationDate").value, 1), 6 + $counter, 9) $recordSet.MoveNext $counter = $counter + 1 WEnd _ExcelBookSaveAs($oExcel, $exportDir & "\" & $username & "_Search_Results_" & @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC, "xls") _ExcelBookClose($oExcel, 1, 0) EndIf
×
×
  • Create New...