Leaderboard
Popular Content
Showing content with the highest reputation on 07/30/2014 in all areas
-
It was done because people were abusing the fact that Default evaluated to -1. Passing Default to GUI controls, and created functions that took a numeric parameter and checking for -1 rather than explicitly checking for Default. Or the other way around and checking for Default but the user passing -1. Any evaluation of a number to try and guess if it is Default is wrong. Apart from triggering a fatal error, the only sensible number we can assign is 0. Not because it is more likely to be significant (it's not, -1 is more abnormal) but because it is more likely to be confused with an actual 0. That makes it more likely that the only sensible use of Default is to indicate one thing, the Default keyword. The correct use of testing for Default is: If $something = Default This will never fail because the user passed a number instead.1 point
-
Use the examples in the zip of first post they are updated. You can see the global variables in top of uiawrappers udf. Uia_ is now the prefix. See latest simple spy that gives basic source code for control and parents.1 point
-
Try this: Local $aIPs = [ _ "10.89.185.2", _ "0.96.0.194", _ " 100.100 . 250.123", _ "140.red.tde.net:80", _ "256.100.526.210", _ "108.9.10.626", _ "141-52.8.80", _ "141.24.249.129", _ "141.24-249.129", _ "141..249.130.", _ "141.24.249.*1", _ "141.24.33.161", _ "141.24:.33.161", _ "141.155.238.1438", _ "141.24.033.162", _ "141.24.33.192", _ "141.16.94.X0" _ ] For $ipv4 In $aIPs ConsoleWrite($ipv4 & " -> " & (StringRegExp($ipv4, "^(?:[1-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}$", 0) ? "" : "in") & "valid" & @LF) Next1 point
-
I remember now. It's because before there was a policy of not using UDF functions inside the native function examples, due to the separation of the two. This has slightly relaxed since I came up with a script to merge the help files into one. I would be more inclined to use the Win32 API for creating a temp file.1 point
-
The second example shows subset of barcodes supported by OcvitaBarcode.ocx. Script shows index of symbology in barcode (property hrtext) and gui label. It's good idea to reset combo by the wheel of mouse, though Global $Sym_Type_Line, $Sym_Index_Line, $Sym_Types, $Sym_Indexes Global $oBCode, $oBCodeGUI Global $SymIndex InitSymTypes() $GUI = GUICreate("OCVITA_BARCODE by AutoIt3, Valery Ivanov, 19 September, 2013", 400, 400, -1, -1) $SymLabel = GuiCtrlCreateLabel("Symbology name:", 100, 15, 100, 20) $Sym = GUICtrlCreateCombo("", 180, 10, 200, 20) GUICtrlSetData(-1,$Sym_Type_Line,"BARCODE_QRCODE") $SymIndex = GetIndexOfSym("BARCODE_QRCODE") $SymILabel = GuiCtrlCreateLabel("Symbology index - " & $SymIndex, 100, 50, 300, 20) $oBCode = ObjCreate("Ocvita.Barcode") $oBCode.symbology = $SymIndex $oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280) GUISetState() ;$oBCode.AboutBox() While 1 $Msg = GUIGetMsg(1) Switch $Msg[0] Case -3 Exit Case $Sym $Sym_Type = GUICtrlRead ($Sym) if $SymIndex <> GetIndexOfSym($Sym_Type) then $SymIndex = GetIndexOfSym($Sym_Type) GUICtrlSetData($SymILabel, "Symbology index - " & $SymIndex) RefreshBCode($SymIndex) endif ;set focus to combo GUICtrlSetState ($Sym,256) EndSwitch WEnd $oBCode = 0 GUICtrlDelete($oBCodeGUI) ;=============================== func InitSymTypes() ; API barcode types ;Local $SL = "1 BARCODE_CODE11,2 BARCODE_C25MATRIX,3 BARCODE_C25INTER,4 BARCODE_C25IATA,6 BARCODE_C25LOGIC,7 BARCODE_C25IND,8 BARCODE_CODE39,9 BARCODE_EXCODE39,13 BARCODE_EANX,16 BARCODE_EAN128,18 BARCODE_CODABAR,20 BARCODE_CODE128,21 BARCODE_DPLEIT,22 BARCODE_DPIDENT,23 BARCODE_CODE16K,24 BARCODE_CODE49,25 BARCODE_CODE93,28 BARCODE_FLAT,29 BARCODE_RSS14,30 BARCODE_RSS_LTD,31 BARCODE_RSS_EXP,32 BARCODE_TELEPEN,34 BARCODE_UPCA,37 BARCODE_UPCE,40 BARCODE_POSTNET,47 BARCODE_MSI_PLESSEY,49 BARCODE_FIM,50 BARCODE_LOGMARS,51 BARCODE_PHARMA,52 BARCODE_PZN,53 BARCODE_PHARMA_TWO,55 BARCODE_PDF417 PDF417,56 BARCODE_PDF417TRUNC,57 BARCODE_MAXICODE,58 BARCODE_QRCODE,60 BARCODE_CODE128B,63 BARCODE_AUSPOST,66 BARCODE_AUSREPLY,67 BARCODE_AUSROUTE,68 BARCODE_AUSREDIRECT,69 BARCODE_ISBNX,70 BARCODE_RM4SCC,71 BARCODE_DATAMATRIX,72 BARCODE_EAN14,75 BARCODE_NVE18,76 BARCODE_JAPANPOST,77 BARCODE_KOREAPOST,79 BARCODE_RSS14STACK,80 BARCODE_RSS14STACK_OMNI,81 BARCODE_RSS_EXPSTACK,82 BARCODE_PLANET,84 BARCODE_MICROPDF417,85 BARCODE_ONECODE,86 BARCODE_PLESSEY,87 BARCODE_TELEPEN_NUM,89 BARCODE_ITF14,90 BARCODE_KIX,92 BARCODE_AZTEC,93 BARCODE_DAFT,97 BARCODE_MICROQR,98 BARCODE_HIBC_128,99 BARCODE_HIBC_39,102 BARCODE_HIBC_DM,104 BARCODE_HIBC_QR,106 BARCODE_HIBC_PDF,108 BARCODE_HIBC_MICPDF,112 BARCODE_HIBC_AZTEC,128 BARCODE_AZRUNE,129 BARCODE_CODE32,130 BARCODE_EANX_CC,131 BARCODE_EAN128_CC,132 BARCODE_RSS14_CC,133 BARCODE_RSS_LTD_CC,134 BARCODE_RSS_EXP_CC,135 BARCODE_UPCA_CC,136 BARCODE_UPCE_CC,137 BARCODE_RSS14STACK_CC,138 BARCODE_RSS14_OMNI_CC,139 BARCODE_RSS_EXPSTACK_CC,140 BARCODE_CHANNEL,141 BARCODE_CODEONE,142 BARCODE_GRIDMATRIX" ; barcode types supported Local $SL = "1 BARCODE_CODE11,2 BARCODE_C25MATRIX,3 BARCODE_C25INTER,4 BARCODE_C25IATA,6 BARCODE_C25LOGIC,7 BARCODE_C25IND,8 BARCODE_CODE39,9 BARCODE_EXCODE39,13 BARCODE_EANX,20 BARCODE_CODE128,21 BARCODE_DPLEIT,22 BARCODE_DPIDENT,23 BARCODE_CODE16K,24 BARCODE_CODE49,25 BARCODE_CODE93,28 BARCODE_FLAT,29 BARCODE_RSS14,30 BARCODE_RSS_LTD,32 BARCODE_TELEPEN,34 BARCODE_UPCA,37 BARCODE_UPCE,40 BARCODE_POSTNET,47 BARCODE_MSI_PLESSEY,50 BARCODE_LOGMARS,51 BARCODE_PHARMA,52 BARCODE_PZN,53 BARCODE_PHARMA_TWO,55 BARCODE_PDF417 PDF417,56 BARCODE_PDF417TRUNC,58 BARCODE_QRCODE,60 BARCODE_CODE128B,70 BARCODE_RM4SCC,71 BARCODE_DATAMATRIX,72 BARCODE_EAN14,75 BARCODE_NVE18,76 BARCODE_JAPANPOST,77 BARCODE_KOREAPOST,79 BARCODE_RSS14STACK,80 BARCODE_RSS14STACK_OMNI,82 BARCODE_PLANET,84 BARCODE_MICROPDF417,86 BARCODE_PLESSEY,87 BARCODE_TELEPEN_NUM,89 BARCODE_ITF14,90 BARCODE_KIX,92 BARCODE_AZTEC,97 BARCODE_MICROQR,98 BARCODE_HIBC_128,99 BARCODE_HIBC_39,102 BARCODE_HIBC_DM,104 BARCODE_HIBC_QR,106 BARCODE_HIBC_PDF,108 BARCODE_HIBC_MICPDF,112 BARCODE_HIBC_AZTEC,129 BARCODE_CODE32,140 BARCODE_CHANNEL,141 BARCODE_CODEONE,142 BARCODE_GRIDMATRIX" Local $Syms = StringSplit($SL,",") $Sym_Type_Line = "" $Sym_Index_Line = "" for $i = 1 to $Syms[0] $Parts = StringSplit($Syms[$i]," ") $Sym_Type_Line &= $Parts[2]& "|" $Sym_Index_Line &= $Parts[1]& "|" next $Sym_Type_Line = StringTrimRight($Sym_Type_Line,1) $Sym_Index_Line = StringTrimRight($Sym_Index_Line,1) $Sym_Types = StringSplit($Sym_Type_Line,"|") $Sym_Indexes = StringSplit($Sym_Index_Line,"|") endfunc ;=============================== func GetIndexOfSym($Item) for $i = 1 to $Sym_Types[0] if $Item = $Sym_Types[$i] then return $Sym_Indexes[$i] next return 1 endfunc ;=============================== func RefreshBCode($NewSymIndex) $oBCode = 0 GUICtrlDelete($oBCodeGUI) $oBCode = ObjCreate("Ocvita.Barcode") $oBCode.symbology = $NewSymIndex $oBCode.barcode = $NewSymIndex $oBCode.hrtext = $NewSymIndex $oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280) endfunc1 point
-
This isn't laborious work. There is the Ocvita Barcode ActiveX Control based on zint engine. It has more than 50 1D (EAN, ISBN, Code 128 and so on) and 2D (QR Code, Datamatrix, Aztec) symbologies. You can download from here http://ocvita.ru/content/view/90/35/ Register OcvitaBarcode.ocx by command regsvr32 OcvitaBarcode.ocx BCode.au3 is my simple example how to use Ocvita Barcode ActiveX by AutoIt3 $GUI = GUICreate("OCVITA_BARCODE by AutoIt3, Valery Ivanov, 19 September, 2013", 400, 400, -1, -1) $oBCode = ObjCreate("Ocvita.Barcode") $oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280) $oBCode.barcode = "Valery" $oBCode.hrtext = "Valery" GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 Exit EndSelect WEnd Enjoy!1 point
-
So if you know that what exactly is the problem? #include <WinApi.au3> ; ZIP CLSID Global Const $sCLSID_Zip = "{23170f69-40c1-278a-1000-000110010000}" ; Interface IInArchive is defined like this: Global Const $sIID_IInArchive = "{23170F69-40C1-278A-0000-000600600000}" Global Const $tagIInArchive = _ "Open hresult(ptr;uint64*;ptr);" & _ "Close hresult();" & _ "GetNumberOfItems hresult(uint*);" & _ "GetProperty hresult(uint;int;variant*);" & _ "Extract hresult(uint;uint;int;ptr);" & _ "GetArchiveProperty hresult(int;variant*);" & _ "GetNumberOfProperties hresult(uint*);" & _ "GetPropertyInfo hresult(uint;bstr*;int*;int*);" & _ "GetNumberOfArchiveProperties hresult(uint*);" & _ "GetArchivePropertyInfo hresult(uint;bstr*;int*;int*);" Global Const $h7ZIP_DLL = DllOpen("C:\Program Files\7-Zip\7z.dll") ; for me it would be this location. You set yours. Local $oIInArchive = Create_7Z_Object($sCLSID_Zip, $sIID_IInArchive, $tagIInArchive) ;... Do whatever you want with this object here... ; The end ; An super cool function would be: Func Create_7Z_Object($sCLSID, $sIID, $sTag) ; Guids Local $tCLSID = _WinAPI_GUIDFromString($sCLSID) Local $tIID = _WinAPI_GUIDFromString($sIID) ; Actual call. $h7ZIP_DLL is DllOpen-ed 7z.dll Local $aCall = DllCall($h7ZIP_DLL, "long", "CreateObject", "struct*", $tCLSID, "struct*", $tIID, "ptr*", 0) ; Check for errors of some kind If @error Or $aCall[0] Then Return SetError(1, 0, 0) ; Make object out of pointer Return ObjCreateInterface($aCall[3], $sIID, $sTag) EndFunc What I can see as possible problem is IInStream interface implementation. The thing is you have to do it manually but considering you had issues with the above, somehow I think you won't be able to do it. ...Ask for help when you hit the wall.1 point
-
Function Reference _ComboBoxAutoFill.au3 AutoFill a ComboBox edit control. Sintax: _GUICtrlComboBox_AutoFillCreate( hWnd[, lPartialSearch] ) _GUICtrlComboBox_AutoFillDelete( hWnd ) _GUICtrlComboBox_AutoFillSetContent( hWnd, vData ) _GUICtrlComboBox_AutoFillUpdateContent( hWnd ) Supports: ; Native and UDF combobox functions! Downloads: Version: 0.12 _ComboBoxAutoFill_(RedirectLink).html Note: Usage example is included! Sample: Match from beginning: Match from any string: Fixes: Regards, João Carlos.1 point