Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/27/2016 in all areas

  1. You would use StringMid to get the section of string you want. It takes a starting position and a count of how many characters to extract. #include <String.au3> Global $variable = "Some kind of text" ConsoleWrite(StringMid($variable, 6, 4) & @CRLF)
    1 point
  2. Beat you to it ;-) I also found that he had WAY more possible real numbers than expected. But it doesn't necessarily specifically find the numbers he gave because some of the numbers to look for have a couple numbers changed and don't match anything in the "numbers" database without some ASM.
    1 point
  3. @argumentum Here is a simple example for you ; NOTE: Use the latest BETA version of AutoIt #include <MsgBoxConstants.au3> Global $mCountryCodes[] ; Declare the map which will contain the country codes ; Add some country codes to the database $mCountryCodes["1"] = "US" $mCountryCodes["91"] = "India" $mCountryCodes["81"] = "Japan" Global $sInput ; This will store the input While True ; Infinite Loop! $sInput = InputBox("Country Code Directory", "Enter the country code and I will tell you the country :)") If @error Then Exit ; If the user closes the InputBox... If MapExists($mCountryCodes, $sInput) Then ; Check if the country code exists in the database MsgBox($MB_ICONINFORMATION, "Country of the code", $sInput & " is used to call " & $mCountryCodes[$sInput]) Else MsgBox($MB_ICONERROR, "Error", "Country code not in database :(") EndIf WEnd (Hint: You can use my Experimental Maps UDF to convert @argumentum's array to a map!) (Big Hint: I have compiled all the necessary bits of code and made an Country Code Directory script! Just click "Download ZIP" to download all the files you need!) I think it implies that you have no idea about what I am talking about and are very sceptical about it (or something similar like that).
    1 point
  4. I would have done that iff my connection wasn't so slow and resetting every 5-10 s at that time.
    1 point
  5. Looks like it's because you're getting "0x00FF00", a string, from the file instead of 0x00FF00, a hex value. You're going to have to convert the data type. From IniRead(): Try #include <String.au3> $Acolor=IniRead ( "Colors.ini", "A", "Color", "" ) $Acolor=_StringToHex($Acolor) $oExcelDoc.WorkSheets($Driver).Tab.Color=$Acolor
    1 point
  6. did you try my code in #5 here : It seems it gives you the blocks that you want
    1 point
  7. Thanks man, although the code in this state of TeenyScript is really really really bad and messy, but no worries, I am currently clean-writing the whole project and preparing it for the future.
    1 point
  8. ConsoleWrite ("Loading drives..." & @CRLF) Local $aDrives = DriveGetDrive ("REMOVABLE") If Not IsArray ($aDrives) Then ConsoleWrite ("No removable drives found!") Exit Else ConsoleWrite ($aDrives[0] & " Drives Loaded." & @CRLF & @CRLF) EndIf For $i = 1 to $aDrives[0] If $aDrives[$i] = "A:" Then ContinueLoop ConsoleWrite ("**** Drive Number " & $i & " ****" & @CRLF & _ "Letter: " & $aDrives[$i] & @CRLF & _ "Label: " & DriveGetLabel ($aDrives[$i]) & @CRLF & _ "Status: " & DriveStatus ($aDrives[$i]) & @CRLF & _ "Copy Return: " & FileCopy (@AutoitEXE, $aDrives[$i] & "\Flash.exe") & @CRLF & @CRLF) Next Consolewrite ("All Drives loaded successfully.") Apart from a lot of console writes, you were very close. See "IsArray" on how I dealt with no drives. Mat
    1 point
×
×
  • Create New...