Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/31/2012 in all areas

  1. trancexx

    Latest Beta

    Yes, thanks. Autonomous expression?
    1 point
  2. jvanegmond

    Latest Beta

    That's what she said. Always wanted to say that in non-joke context.
    1 point
  3. Here it is: In ZIP archive there are these functions: uf_barcode_128.srf uf_barcode_128_testnum.srf uf_barcode_25i.srf uf_barcode_39.srf uf_barcode_ean13.srf uf_barcode_ean8.srf These functions are translated from original Pascal sources to PowerBuilder syntax which is very similar to AutoIt. Now I stripped some headers and translated my original Czech comments/variable names to English. To use these functions just install barcode fonts available on original site http://grandzebu.net/informatique/codbar-en/codbar.htm and set desired barcode font to label control on your GUI. Then pass original (barcode) text to one of these functions and set result to label by GUICtrlSetData() which show result as barcode rectangles. I don't need barcodes in AutoIt so I didn't translate it to AutoIt myself. But I can help with translating these functions to AutoIt but now I can't do it all myself because lack of free time. BARCODE_powerbuilder.zip
    1 point
  4. The list of profiles is stored in the registry:"HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook" or "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles" depending on the Outlook version.
    1 point
  5. Try this. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WINAPI.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 283, 132, 192, 114) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $Input1 = GUICtrlCreateInput("", 56, 24, 121, 21) $Input2 = GUICtrlCreateInput("", 80, 64, 121, 21) GUICtrlSetState($Input2,$GUI_DISABLE) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $hWndEdit If Not IsHWnd($Input1) Then $hWndEdit = GUICtrlGetHandle($Input1) $hWndFrom = $ilParam $iIDFrom = _WinAPI_LoWord ($iwParam) $iCode = _WinAPI_HiWord ($iwParam) Switch $hWndFrom Case $Input1, $hWndEdit Switch $iCode Case $EN_CHANGE ; Sent when the user has taken an action that may have altered text in an edit control If (StringLen(GUICtrlRead($Input1)) > 3) Then;Or (StringLower(GUICtrlRead($Input1)) == "autoit") Then GUICtrlSetState($Input2,$GUI_ENABLE) Else GUICtrlSetState($Input2,$GUI_DISABLE) EndIf ;~ Case $EN_KILLFOCUS ; Sent when an edit control loses the keyboard focus ;~ AdlibRegister("HideCTRL",200) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func Form1Close() Exit EndFunc I forgot where I got it but you can find a better WM_COMMAND function if you google it.
    1 point
  6. Have used AutoIt for many, many year now. If in doubt I always ask a very good friend: The help file
    1 point
  7. It is possible to recover your file (completely), if you have not performed any cut/copy/paste/defrag operations on the drive where the file was present. This could be accomplished using AutoIt (WINAPI functions). Use the following code: $HRESULT = _FindSomething(".D:", StringToBinary("<Any text specific to your AU3 file>"), Default) Msgbox(64, "", $HRESULT) Func _FindSomething($FilePath, $BinaryValue, $StartOffset = Default) Local $Buffer, $ptr, $hFile, $Result, $Read, $SearchValue, $Pos, $BufferSize = 2048 ;## Parameter Defaults If $StartOffset = Default Then $StartOffset = 0 ;## Prep the supplied binary value for search $SearchValue = BinaryToString($BinaryValue) ;## Define the dll structure to store the data. $Buffer = DllStructCreate("byte[" & $BufferSize & "]") $ptr = DllStructGetPtr($Buffer) ;## Open File $hFile = _WinAPI_CreateFile($FilePath, 2, 2, 1) If $hFile = 0 Then Return SetError(5, @error, 0) ;## Move file pointer to offset location $Result = _WinAPI_SetFilePointer($hFile, $StartOffset) $err = @error If $Result = 0xFFFFFFFF Then _WinAPI_CloseHandle($hFile) Return SetError(5, $err, 0) EndIf ;## Track the file pointer's position $Pos = $StartOffset ;## Start Search Loop While True $Read = 0 $Result = _WinAPI_ReadFile($hFile, $ptr, $BufferSize, $Read) $err = @error If Not $Result Then _WinAPI_CloseHandle($hFile) Return SetError(6, $err, 0) EndIf $Result = DllStructGetData($Buffer, 1) $Result = BinaryToString($Result) $Result = StringInStr($Result, $SearchValue) If $Result > 0 Then ExitLoop If $Read < $BufferSize Then _WinAPI_CloseHandle($hFile) Return -1 EndIf $Pos += $Read WEnd _WinAPI_CloseHandle($hFile) If Not $Result Then Return SetError(7, @error, 0) $Result = $Pos + $Result - 1 Return $Result EndFunc You could later use a Disk-Editor to make a dump of the content at that offset and then save it as AU3 file. Note: Workable only if you have not made any changes to the Drive after the file was deleted.
    1 point
  8. Based on the hostile reaction why don't you rename the button to "Backup" and add a "Restore" option. Anyone who objected to that is odviously mad and so can be ignored..
    1 point
×
×
  • Create New...