Jump to content

Leaderboard

Popular Content

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

  1. Welcome to AutoIt and the forum! As I understand the helpfile extraction is optional: "These included files can then be "extracted" during execution of the compiled script if the statement is executed." The example in the help file shows how to use a flag to decide if extraction is needed or not.
    1 point
  2. @MeNeedHelp You can rename files using autoit with the function "Filemove": https://www.autoitscript.com/autoit3/docs/functions/FileMove.htm For example: Filemove("C:\some_file_to_rename.txt", "C:\new_file_name.txt") This way you can rename files without having to do it manually with windows PS: as Jos said, try to be a bit more polite on the forum. A "hello guys" and "thanks for your help" is not too much to write
    1 point
  3. @MeNeedHelp, Do you seriously think this is a clear question? What exact;y do you want to do and tried that isn't working? ( .. and consider the tone of your answer as I have a pretty good memory which tells me the last response was one that really deserved you to be banned but decided at the time to let it slide. This only happens one time.) Jos
    1 point
  4. 1 point
  5. Malkey

    Letters in "Input"

    Try this. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") $hGui = GUICreate("My GUI edit") $IP = GUICtrlCreateInput("", 10, 15, 200, 22) $IP2 = GUICtrlCreateInput("", 10, 40, 80, 22) GUICtrlCreateLabel("<- Digits and dots only.", 215, 15, 200, 22) GUICtrlSetFont(-1, 12) GUICtrlCreateLabel('<- "n.nn.nnnn.n" pattern only.', 95, 40, 300, 22) GUICtrlSetFont(-1, 12) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func WM_COMMAND($hWnd, $msg, $wParam, $lParam) $nNotifyCode = BitShift($wParam, 16) $nID = BitAND($wParam, 0x0000FFFF) If $nID = $IP Then ; Only digits and dots If $nNotifyCode = $EN_CHANGE Then GUICtrlSetData($IP, StringRegExpReplace(GUICtrlRead($IP), "[^0-9.]+", "")) EndIf EndIf If $nID = $IP2 Then ; Allow n.nn.nnnn.n characters only - where n is a digit. For example 2.15.1598.1 is allowed. If $nNotifyCode = $EN_CHANGE Then $temp2 = GUICtrlRead($IP2) $REPattern = "\d\.\d\d\.\d\d\d\d\.\d" $iLen = StringLen($temp2) If StringRegExp($temp2, StringLeft($REPattern, $iLen * 2)) = 0 Or $iLen > 11 Then GUICtrlSetData($IP2, StringTrimRight($temp2, 1)) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND
    1 point
  6. 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...