Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/2017 in all areas

  1. Thanks. I'm just waiting for that.
    1 point
  2. Yeah, this is the point. And its an issue in the FormStudio. I fix it in the next update! For now you can made a simple workaround: Just insert "GUICtrlSetBkColor($control_handle,0xFFFFFF)" as extracode in the control. This will work as it should. Tip: You can insert the code as it is with the variable $control_handle. The Formstudio replaces it automatically!
    1 point
  3. Hi All, I am back. Thanks for posting the documentation ... Many things are possible indeed with .NET CLR I would recommend before further going into anymore depth. To just provide some simple examples and use cases that everyone can understand...? Like this : _Example1() Func _Example1() Local $oAssembly = _CLR_LoadLibrary("mscorlib") ConsoleWrite("$oAssembly: " & IsObj($oAssembly) & @CRLF) local $objFileInfoClass =_CLR_CreateObject($oAssembly,"System.IO.FileInfo", @ScriptFullPath ) ConsoleWrite("!$oRnd " & IsObj($objFileInfoClass) & @CRLF) MsgBox(0,".Net CLR System.IO.File #", "FileAttributes # : " & @ScriptFullPath & @CRLF) $Attributes = $objFileInfoClass.Attributes ; Gets or sets the attributes for the current file or directory. (Inherited from FileSystemInfo.) ConsoleWrite("$Attributes: " & $Attributes & @CRLF) $CreationTime = $objFileInfoClass.CreationTime ; Gets or sets the creation time of the current file or directory. (Inherited from FileSystemInfo.) ConsoleWrite("$CreationTime: " & DateStringToDateTime_EU($CreationTime) & @CRLF) $objDirectory = $objFileInfoClass.Directory ; Gets an instance of the parent directory. ConsoleWrite("$objDirectory: " & $objDirectory & @CRLF) $DirectoryName = $objFileInfoClass.DirectoryName ; Gets a string representing the directory's full path. ConsoleWrite("$DirectoryName: " & $DirectoryName & @CRLF) $Exists = $objFileInfoClass.Exists ; Gets a value indicating whether a file exists. (Overrides FileSystemInfo.Exists.) ConsoleWrite("$Exists: " & $Exists & @CRLF) $Extension = $objFileInfoClass.Extension ; Gets the string representing the extension part of the file. (Inherited from FileSystemInfo.) ConsoleWrite("$Extension: " & $Extension & @CRLF) $FullName = $objFileInfoClass.FullName ; Gets the full path of the directory or file. (Inherited from FileSystemInfo.) ConsoleWrite("$FullName: " & $FullName & @CRLF) $IsReadOnly = $objFileInfoClass.IsReadOnly ; Gets or sets a value that determines if the current file is read only. ConsoleWrite("$IsReadOnly: " & $IsReadOnly& @CRLF) $LastAccessTime = $objFileInfoClass.LastAccessTime ; Gets or sets the time the current file or directory was last accessed. (Inherited from FileSystemInfo.) ConsoleWrite("$LastAccessTime: " & DateStringToDateTime_EU($LastAccessTime) & @CRLF) $LastWriteTime = $objFileInfoClass.LastWriteTime ; Gets or sets the time when the current file or directory was last written to. (Inherited from FileSystemInfo.) ConsoleWrite("$LastWriteTime: " & DateStringToDateTime_EU($LastWriteTime) & @CRLF) $Length = $objFileInfoClass.Length ; Gets the size, in bytes, of the current file ConsoleWrite("$Length: " & $Length & @CRLF) $Name = $objFileInfoClass.Name ; Gets the name of the file. (Overrides FileSystemInfo.Name.) ConsoleWrite("$Name: " & $Name & @CRLF) EndFunc ;==>_Example1 Func DateStringToDateTime_EU($dtmDate) Return(StringRegExpReplace($dtmDate, "\A(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(?:.*)","$1/$2/$3 $4:$5:$6")) EndFunc Func DateStringToDateTime_US($dtmDate) Return(StringRegExpReplace($dtmDate, "\A(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(?:.*)","$2/$3/$1 $4:$5:$6")) EndFunc This way anyone can understand what the .NET CLR has to offer... and start building up experience. It would be nice to start building an example library with all this kind of use cases examples over the different mscorlib Classes Once we have more users on board we can start taking it one step further... ?
    1 point
  4. See, no need for one more service no one wants to use
    1 point
  5. Melba23

    Associative Array

    Mau, Looks like you missed this one: And you might want to search the forum for discussion of the Beta Map datatype. M23
    1 point
  6. ProgAndy

    winhttp POST method

    You are reading the response in the wrong way. Here is an example, the helpfile contains some others. #include<WinHttp.au3> $hInternet = _WinHttpOpen() $hConnect = _WinHttpConnect($hInternet, 'snee.com') $sFirstName = "Jack" $sLastName = "Berk" $sSomeOtherURLEncodedVariables = "&a=123&test=void&foo=bar" $sPost = "fname=" & $sFirstName & "&lname=" & $sLastName & $sSomeOtherURLEncodedVariables $sResult = _WinHttpSimpleRequest($hConnect, "POST", '/xml/crud/posttest.cgi', '', $sPost) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hInternet) MsgBox(0, '', $sResult)
    1 point
  7. ProgAndy

    URL Encoding

    I wrote some functions including UTF-8 conversion Func _URIEncode($sData) ; Prog@ndy Local $aData = StringSplit(BinaryToString(StringToBinary($sData,4),1),"") Local $nChar $sData="" For $i = 1 To $aData[0] ; ConsoleWrite($aData[$i] & @CRLF) $nChar = Asc($aData[$i]) Switch $nChar Case 45, 46, 48 To 57, 65 To 90, 95, 97 To 122, 126 $sData &= $aData[$i] Case 32 $sData &= "+" Case Else $sData &= "%" & Hex($nChar,2) EndSwitch Next Return $sData EndFunc Func _URIDecode($sData) ; Prog@ndy Local $aData = StringSplit(StringReplace($sData,"+"," ",0,1),"%") $sData = "" For $i = 2 To $aData[0] $aData[1] &= Chr(Dec(StringLeft($aData[$i],2))) & StringTrimLeft($aData[$i],2) Next Return BinaryToString(StringToBinary($aData[1],1),4) EndFunc MsgBox(0, '', _URIDecode(_URIEncode("testäöü fv"))) Edit 2012: Fixed bug in _URIEncode, removed debug output
    1 point
×
×
  • Create New...