Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/31/2017 in all areas

  1. I built my own libcurl for AutoIt based on BinaryCall UDF. libcurl - the multiprotocol file transfer library The Features: Pure AutoIt script, no DLLs needed.Build with SSL/TLS and zlib support (without libidn, libiconv, libssh2).Full easy-interface and partial multi-interface support.Data can read from or write to autoit variables or files.Smaller code size (compare to most libcurl DLL).The version information of this build: Curl Version: libcurl/7.42.1SSL Version: mbedTLS/1.3.10Libz Version: 1.2.8Protocols: ftp,ftps,http,httpsHere are the helper functions (not include in libcurl library). Curl_DataWriteCallback()Curl_DataReadCallback()Curl_FileWriteCallback()Curl_FileReadCallback()Curl_Data_Put()Curl_Data_Get()Curl_Data_Cleanup()See the example script for detail usage. Curl.zip
    1 point
  2. There are a couple of ways to do it. You could do it like this: #include <File.au3> Local $aArray = FileReadToArray(@DesktopDir & "\Testing.txt") For $a = 1 To UBound($aArray) - 1 ConsoleWrite($aArray[$a] & @CRLF) Next Or use _FileReadToArray, which gives you the number of array elements in the [0] index: #include <File.au3> Local $aArray _FileReadToArray(@DesktopDir & "\Testing.txt", $aArray) For $a = 2 To $aArray[0] ConsoleWrite($aArray[$a] & @CRLF) Next
    1 point
  3. iamtheky

    Data converted to 2DArray

    that's close enough: fysa: when redimming, if you change the dimensions the original array is discarded #include <Array.au3> $sData ="type= Button " & @CRLF & _ " name =Button1 " & @CRLF & _ " value=Convert " & @CRLF & _ " start_X=23 " & @CRLF & _ " start_Y = 31 " & @CRLF & _ "Width = 63 " & @CRLF & _ " Height = 45" & @CRLF $a1 = StringRegExp($sData , "(.*)=" , 3) $a2 = StringRegExp($sData , "=(.*)" , 3) local $a3[ubound($a1)][2] for $i = 0 to ubound($a1) - 1 $a3[$i][0] = stringstripws($a1[$i] , 3) $a3[$i][1] = stringstripws($a2[$i] , 3) next _ArrayDisplay($a3)
    1 point
  4. Are you sure that you have MozRepl installed and running? Your output should look like this -- _FFConnect: OS: WIN_10 WIN32_NT 15063 _FFConnect: AutoIt: 3.3.14.2 _FFConnect: FF.au3: 0.6.0.2b-1 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 872 _FFConnect: Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 __FFSendJavaScripts: Sending functions to FireFox .......... done __FFSend: try{FFau3 != null?1:0}catch(e){'_FFCmd_Err';}; __FFRecv: 1 __FFSend: try{gBrowser.tabContainer.childNodes.length}catch(e){'_FFCmd_Err';}; __FFRecv: 16 $tabs=16 __FFSend: try{gBrowser.tabContainer.childNodes.length}catch(e){'_FFCmd_Err';}; __FFRecv: 16 __FFSend: try{gBrowser.removeTab(gBrowser.mTabs[gBrowser.tabContainer.childNodes.length-1]);gBrowser.tabContainer.childNodes.length}catch(e){'_FFCmd_Err';}; __FFRecv: 15 +>10:50:44 AutoIt3.exe ended.rc:0 +>10:50:44 AutoIt3Wrapper Finished. Also, what version of Firefox are you using? If you are using FF 55 or greater, then MozRepl is no longer working and that would explain your issues.
    1 point
  5. I guess I am a bit confused. Are you saying, once the window appears, sometimes it is active and sometimes it is not? Personally, I would just do it like this: WinWait("My Program Window", 60) ;Wait for 60 seconds for the window to appear WinActivate("My Program Window", "") ;Bring the window into focus once it exists You could even put in an If statement after the WinWait, to handle the exception of the window not existing (look at WinExist) after the 60 seconds, or whatever timeout you choose).
    1 point
  6. The SerialNumber propertie does not exists in Win32_DiskDrive on Windows XP. Try this one (thrid example in #8). @KaFu made a good job with WMISerialNumberConversion
    1 point
  7. Gianni

    (Solved) Number Format

    Local $sVar = '1234' MsgBox(0, "", MyFormat($sVar)) Func MyFormat($sVar) $sVar = StringLeft(StringFormat('%09s', $sVar), 9) Return StringLeft($sVar, 2) & ":" & StringMid($sVar, 3, 2) & ":" & StringMid($sVar, 5, 2) & "," & StringRight($sVar, 3) EndFunc ;==>MyFormat
    1 point
  8. BrewManNH

    (Solved) Number Format

    Look up StringFormat in the help file.
    1 point
  9. .... try the same workaround as in this link: https://www.autoitscript.com/forum/topic/189684-_iecreateembedded-help/?do=findComment&comment=1364624
    1 point
  10. Take a look at this link : https://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version And read this step: "Browser Version Reporting is incorrect" in short, when a web server check the version of the browser that is running on the client, the browsercontrol report himself as IE7 even if is emulating a newer version. (search for "UserAgent') This can generate problems if the server web refuse to work on older browsers. A possible workaround is to set a registry key as explained always in the above link. Setting the registry should report the version specified in the key instead of IE7, fooling the web server and making your app working. try to set this key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION and set the keyname autoit3.exe to a value of 11000 and your script should work. .... Let us know the results ....
    1 point
  11. No. AFAIK every function call starts by resetting @error to zero, then possibly fills it with a non-zero value later.
    1 point
  12. AU3Record The AU3Record is part of the SciTE4AutoIt3, this is an add-on to the AutoIt3. Was is my story: I downloaded the AutoIT3 from the website and found that the recording part was missing. I then found the AU3Record section in the help and via the Forum found out that the program was part og a ZIP. This was really weird for me and later during the day I looked even closer at the problem that might confuse people. I found that there was a side of the story no one tool us. AU3Record is a utility programs given via SciTE addon. Addon? Give me the links: The link today is AutoIt3 (Real program): http://www.autoitscript.com/autoit3/ SciTE4AutoIt3 (Addon): http://www.autoitscript.com/autoit3/scite/ Features: The addon has alot of cool feaures such as: - Intellisense - Autocomplete - CodeFolding - lots of utility programs (like Tidy, Obfuscator, AU3Check, ScriptWriter, AutoIt3Wrapper etc) SciTE what is that? Quote Neil Hodgson:"SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs." So what do I think AutoIT by it self is very powerful but with the add-on from SciTE. The Program get a totally new kick and becomes for me, the ultimate Macro program. The fact that the SciTE4AutoIt3 is an addon MUST be more clear to the end user.
    1 point
×
×
  • Create New...