Jump to content

Search the Community

Showing results for tags 'var'.

  • 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 4 results

  1. Hello, I'm making program(using AutoIt) that would connect to server. I need help converting numbers to VarInt. About VarInt: About VarInt: https://developers.google.com/protocol-buffers/docs/encoding#varints I can't understand how VarInt works, maybe somebody could help me? Thanks
  2. Hi ^^, Just a little list of question: 1. How to make an Var which defines everything like ' * ' Var of Windows 2. How to add The Var(1.) within the a ComboBox or In the Menu 3. How to load simply an *.au3 File wich adding a GUI and to the Main GUI a Button 4. Using XML Files instead of 3. (I know the XMLDom or how it was named but Include file isn't anymore on my side avaible) 5. Progressbar which is attached to Loading the File of 3./4. Thanks to everyone who helps :3
  3. I have a question About the Output from a Var which looks like : 34.32132312321 How to make it work that it looks like : 34.321 I already searched through some AutoIt Includes >.< I hope somebody can help by this $Byte = InetGetSize(http://download853.mediafire.com/albf2b2g21bg/6tkd4gb68qdb7hd/Anime+Pics.rar,0);Download Size in Byte(Just an old Pic File) If $Byte > 1024 Then $Kilobyte = $Byte / 1024;Converting Byte to Kilobytes If $Kilobyte > 1024 Then $Megabyte = $Kilobyte / 1024;Converting Kilobyte to Megabyte If $Megabyte > 1024 Then $Gigabyte = $Megabyte / 1024;Converting Megabyte to Gigabyte If $Gigabyte > 1024 Then $Terabyte = $Gigabyte / 1024;Converting Gigabyte to Terabyte If $Terabyte > 1024 Then $Petabyte = $Terabyte / 1024;Converting Terabyte to Petabyte If $Petabyte > 1024 Then $Exabyte = $Petabyte / 1024;Converting Petabyte to Exabyte $_SIZE1 = $Exabyte & " EB" ElseIf $Petabyte < 1024 Then $Petabyte = $Terabyte / 1024 $_SIZE1 = $Petabyte & " PB" EndIf ElseIf $Terabyte < 1024 Then $Terabyte = $Gigabyte / 1024 $_SIZE1 = $Terabyte & " TB" EndIf ElseIf $Gigabyte < 1024 Then $Gigabyte = $Megabyte / 1024 $_SIZE1 = $Gigabyte & " GB" EndIf ElseIf $Megabyte < 1024 Then $Megabyte = $Kilobyte / 1024 $_SIZE1 = $Megabyte & " MB" EndIf ElseIf $Kilobyte < 1024 Then $Kilobyte = $Byte / 1024 $_SIZE1 = $Kilobyte & " KB" EndIf ElseIf $Byte < 1024 Then $_SIZE1 = $Byte & " Bytes" EndIf MsgBox(52,"Title","Size is: " & $_SIZE1)
  4. So I have been in and out of AutoIt for a few years now and I've never come across a situration where I'd need to verify if an a variable is an array or not. So here's the deal - I have a database that contains 1 table with a few different columns. When a user initially opens the script, it will see if their "username" pulled from @UserName is stored in the database (which is always unique). If their username is not in the database, it inserts a record (using EzMySql) including their username, full name (pulled from -> _AD_Open() Global $adFullName = _AD_GetObjectAttribute(@UserName, "DisplayName") Global $uSName = @UserName _AD_Close() <-), Time Stamp, Accept Flag (0/1) and Deny Flag (0/1). This is all irrelevant at this point but I just wanted you to understand what I am doing here. Anyways, I am getting to the point to where I am storing specific values from the table into variables. EzMySql will store the data in an array (IF the query finds results) however if it does not, then the variable will not be an array. The problem is, when I run my "If statements" - if I check the variable, there is no way for me to know if the results are stored in array format or not. Here's an example, read the comment above $LookupUser. Func _CheckDatabase() ; Obtain user's Full Name and store as variable. If Not _EzMySql_Startup() Then MsgBox(0, "Error Starting MySql", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg()) Exit EndIf $Pass = "D@#!$dD(#d0939kd(#Dk3093d)(#D039039ddk39dkd" If Not _EzMySql_Open("10.3.3.11", "rug_user", $Pass, "rug", "3306") Then MsgBox(0, "Error opening Database", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg()) Exit EndIf If Not _EzMYSql_Query("SELECT * FROM accept_list WHERE Username = '" & @UserName & "';") Then MsgBox(0, "Query Error", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg()) Exit EndIf If Not _EzMySql_SelectDB("rug") Then MsgBox(0, "Error setting Database to use", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg()) Exit EndIf $LookupUser = _EzMySql_FetchData() ;This is the problem - if there is no data found, $LookupUser[1] for example will not work returning an error. This function currently works but I need more functionality. If $LookupUser == 0 Then $sMySqlStatement = "INSERT INTO accept_list (Username,FullName) VALUES (" & "'" & $uSName & "'," & "'" & $adFullName & "');" If Not _EzMySql_Exec($sMySqlStatement) Then MsgBox(0, "Error inserting data to Table", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg()) Exit EndIf ElseIf $LookupUser <> 0 Then _CheckFlags() ;Call function to verify if user has accepted or not. EndIf _EzMySql_Close() _EzMySql_ShutDown() Return EndFunc
×
×
  • Create New...