Leaderboard
Popular Content
Showing content with the highest reputation on 03/20/2014 in all areas
-
Solved! Here's what I used: $oIE.document.parentwindow.execScript('DoSomething(1,22);') I hope this will be useful to someone. - Cascius2 points
-
Based on the Outlook UDF written by wooltown, we (wooltown and I) decided to extend the functionality of the Outlook UDF. As the OutlookEX UDF ("EX" like "extended") has a completely different approach compared to the Outlook UDF it's a complete rewrite. We would like to discuss the design of the UDF with the community. Every feedback, function request etc. is highly welcome. As soon as the discussion shows that we are on the right track we would like to release an alpha version for everyone to test. So please don't be shy and post what you think of this UDF or what functions you need! Every item in Outlook is uniquely identified by EntryID and StoreID. The default StoreID is your inbox Every item has properties to describe the item (subject, startdate ..) and methods to act upon the item (move, delete …) The search and action functions are now separated. As an example the user first searches for the items to be deleted and then calls the delete function If a method can be used for more than one item type (e.g. mail, calendar and notes) the function is called _OL_ItemXXX else the function is called _OL_CalendarXXX The number of properties you can get or pass to most functions is not limited by the number of parameters defined for the function. Properties can be passed as parameters (up to 10) or in an unlimited array as parameter 1 The UDF allows to access all kind of folders (see the following listing). Folders can be passed by name or as an object to a function A lot of testing is still needed as we have written and tested the functions using Outlook 2002 SP3 and Outlook 2010 "wrapper" or "shortcut" functions will be available to let you do all tasks in one go e.g. _OL_Wrapper_SendMail for all functions above. Documentation: The documentation for this UDF (aside from the docu in the UDF itself) will be placed in the AutoIt Wiki. So we can easily modify the docu without releasing a new version each time. There will be pages describing the UDF in general and pages for individual item types (like mail) with detailed information and a lot of tips & tricks. Tested with Outlook 2003 and 2010. Some users reported that it works with Outlook 2013 as well. Starting point: http://www.autoitscript.com/wiki/OutlookEX_UDF_-_General Download1 point
-
After very hard working for two days, the FAST AES UDF finally here. These functions use the embedding DLL technique and the codes are almost all written in low-level language, so it is PURE SCRIPT but run very fast. For general user, the interface is quite simple: ; To encrypt/decrypt memory block or string: $Encrypted = _AesEncrypt("Key", "Plantext") $Decrypted = _AesDecrypt("Key", $Encrypted) $Result = BinaryToString($Decrypted) ; To encrypt/decrypt file _AesEncryptFile("Key", $PlantextFilename, $ChipertextFilename) _AesDecryptFile("Key", $ChipertextFilename, $PlantextFilename) For advanced user, here are some technical details. The exactly key type of the functions should be 16, 24, or 32 bytes binary. If a string is used, the script just convert it into binary and pad 0x00. To use the binary keys, my MD5 and SHA1/SHA2 hash UDF may be helpful (here and here). For both memory and file functions, there are three block cipher modes include "CBC", "CFB", "OFB" can be specified. For example: (See "What is block cipher modes". BTW, CBC mode use the ciphertext stealing method internally.) _AesEncrypt("Key", "Plantext", "CFB") _AesDecrypt("Key", $Encrypted, "CFB") _AesEncryptFile("Key", $PlantextFilename, $ChipertextFilename, "CFB") _AesDecryptFile("Key", $ChipertextFilename, $PlantextFilename, "CFB") _AesEncrypt/_AesDecrypt operate on only one block of memory. If the data to encrypt/decrypt are not continuous, you have to handle all the work by yourself. For example: $IV = Binary("0x00000000000000000000000000000000") $Ctx = _AesEncryptKey($Key) $Ret = _AesCryptOFB($Ctx, $IV, "The quick brown fox ") $Ret &= _AesCryptOFB($Ctx, $IV, "jumps over the lazy dog") MsgBox(0, '', $Ret) $IV = Binary("0x00000000000000000000000000000000") $Ctx = _AesEncryptKey($Key) $Ret = _AesCryptOFB($Ctx, $IV, $Ret) MsgBox(0, '', BinaryToString($Ret)) CBC/CFB/OFB are different. To use the correct CTX generator and set the correct IV are important. Dig the source in AESTest.au3 may get some inspiration. Here is a summary: CBC mode uses _AesEncryptKey/_AesEncryptCBC to encrpyt and _AesDecryptKey/_AesDecryptCBC to decrypt. But if the length of source < 16 bytes, the IV returned by _AesEncryptCBC should be used. Otherwise, use the same IV as _AesEncryptCBC.CFB mode always uses _AesEncryptKey to generate a CTX, but uses _AesEncryptCFB/_AesDecryptCFB to encrypt/decrypt. However, it always uses the same IV to start.OFB mode is the simplest one. Encryption and decryption are exactly the same. See the example.Notice: Although CFB/OFB only use the _AesEncryptKey() to generate a CTX of key, but always regenerate a new CTX before starting to encrypt or decrypt. This library should pass both Known Answer Test and Monte Carlo Test. To try it, download the test vectors from here and remove the comment in AESTest.au3. Have fun!AES.zip 2008/12/06 Update Note: Update MemoryDllCall.au3 AES.zip ECB encrypt/decrypt code in asm by Brian Gladman, other parts by Ward.1 point
-
Update the Excel UDF that comes with AutoIt
232showtime reacted to water for a topic
This UDF is now part of AutoIt since 3.3.12.0. New versions of Microsoft Office have been released since the last changes were made to the Excel UDF. The new extensions (e.g. xlsx) are not (fully) supported, new functions are missing etc. The rewrite of the Excel UDF delivers changes in the following areas: Works with as many instances of Excel as you like - not just one Works with any Workbook - not just the active one Works with any Worksheet - not just the active one Only does what you tell it to do - no implicit "actions" Only one function to read from a cell or a range Only one function to write a string, an 1D or 2D array to a cell or a range Support for every file format Excel supports Speed enhancements when transferring data from/to an Excel sheet (20 - 100 times faster) 2014-03-22 - Beta 5 Known bugs None The example scripts have been tested with Excel 2010 and AutoIt 3.3.10.2 on Windows 7. You need to run the scripts with the latest AutoIt production version (3.3.10.x)! Please test with Excel 2003 and Excel 2007 and post changes you need/want to see in the next beta version! Excel Rewrite Beta 5.zip has been removed as it is now part of AutoIt since 3.3.12.0. (627 downloads) History.txt1 point -
maybe this : #include <array.au3> #include <File.au3> ConsoleWrite(_LastVersion()) Func _LastVersion() Local $aVersion = _FileListToArray('\\Vision-Server\VisionApps\', '?.?.?', 2, False) If UBound($aVersion) Then _ArraySort($aVersion, 1, 1) Return $aVersion[1] EndIf EndFunc ;==>_LastVersion1 point
-
BTW: Could you please give a meaningful title to your threads? Everyone on this forum has a questions - that's what the forum is made for1 point
-
text file to array
goodmanjl531 reacted to mikell for a topic
Otherwise you can try Csv2Array http://www.thorsten-willert.de/Themen/AutoIt/_CSV2Array.au3?a1 point -
While Loop Stopping GuiOnEventMode Actions
mrflibblehat reacted to Melba23 for a topic
mrflibblehat, Correct, AutoIt will queue any other commands until you return to the main idle loop. I suggest you move the contents of that While..WEnd loop inside your main idle loop and use a flag to tell it when to operate - something like this (untested): ; Add this at the start Global $fJoin = False ; [other code] While 1 Sleep(100) ; Look for joins if needed If $fJoin Then $vRecv = TCPRecv($vConnect, 4096) If $vRecv <> "" Then GuiCtrlSetData($Edit1, $vRecv, 1) EndIf EndIf WEnd Func ConnectToIRC() ; [other code] For $i = 1 to Ubound($vChanArr) -1 TCPSend($vConnect, "JOIN " & $vChanArr[$i] & @CRLF) GUICtrlSetData($Combo1, $vChanArr[$i], $vChanArr[$i]) Next ; Set the flag $fJoin = True EndFunc You might also think of clearing the flag at some point by looking to see if you have received the correct number of responses so that you only fire the check when necessary. M231 point -
WinWait not working on a working process?
cassetti reacted to somdcomputerguy for a topic
I use this code to click a button in an application, then wait until the process it started is done. The button that gets 'clicked' is disabled while the program is doing it's thing, then becomes enabled when it's done. I doubt this code will solve your problem, but maybe it'll give you another idea or something. Good Luck. If $Submittable <> 00 And MsgBox(4 + 32 + 4096 + 262144, StringTrimRight(@ScriptName, 4), $SubmitToQuestion) = 6 Then ControlClick("Forum Spam List Checker", "", "Button5") ;Submit button Sleep(250) Do Sleep(10) Until ControlCommand("Forum Spam List Checker", "", "Button5", "IsEnabled") ; Wait until Submission is done EndIf Ignore the If loop, it's not really related to this situation, I just ate too much copy/pasta..1 point -
Don't cha love it. Local $test1 = Random(0, 1, 1) MsgBox(0, "Results 1", "Original : " & $test1 & @CRLF & @CRLF & "Invert 0|1: " & _Invert0_1($test1)) Local $test2 = "101" MsgBox(0, "Results 2", "Original : " & $test2 & @CRLF & @CRLF & "Invert 0|1: " & _Invert0_1($test2)) Local $test3 = "I have 101 things to do (10)." MsgBox(0, "Results 3", "Original : " & $test3 & @CRLF & @CRLF & "Invert 0|1: " & _Invert0_1($test3)) Func _Invert0_1($In) Return Execute(StringRegExpReplace($In, "([^10]*)([10])([^10]*)", "'${1}' & Number( ${2} = 0 ) & '${3}' & ") & '""') EndFunc ;==>_Invert0_11 point
-
Download my rewrite of the Excel UDF. Thi is an untested example: $oExcel = _Excel_Open() $oWorkbook = _Excel_BookOpen($oExcel, "C:\temp\layout.xlsx") _Excel_RangeWrite($oWorkbook, $oWorkbook.ActiveSheet, $aTable1, "B3") ; Write first part _Excel_RangeWrite($oWorkbook, $oWorkbook.ActiveSheet, $aTable2, "B10") ; Write second part _ExcelBookSaveAs(...) _Excel_BookClose($oWorkbook) _Excel_Close($oExcel)1 point
-
Does this help? Double-click the Min,Max or Close buttons(or png) and see them in action #include-once #include <Misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <ButtonConstants.au3> #region ### START Koda GUI secti Global Const $SC_DRAGMOVE = 0xF012 _GDIPlus_Startup() #region $aRes1 = DisplayImage("1.png", -1, -1, 0, True, True) $aRes2 = DisplayImage("bara.png", 251 - 30, -30) ;min $aRes3 = DisplayImage("patrat.png", 251 - 60, -30) ;max $aRes4 = DisplayImage("inchide.png", 251, -30) ;close _Fader($aRes1) ;_Fader($aRes1, False) #endregion While True $nMsg = GUIGetMsg(1) ;check helpfile for GUIGetMsg in advanced mode Switch $nMsg[0] Case $GUI_EVENT_PRIMARYDOWN ;mouse down event Switch $nMsg[1] Case $aRes1[0] _SendMessage($aRes1[0], $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ;for window drag Case $aRes2[0] WinSetState($aRes1[0], "", @SW_MINIMIZE) Case $aRes3[0] WinSetState($aRes1[0], "", @SW_MAXIMIZE) Case $aRes4[0] ExitLoop EndSwitch EndSwitch WEnd ReleaseResources($aRes1) ReleaseResources($aRes2) ReleaseResources($aRes3) ReleaseResources($aRes4) _GDIPlus_Shutdown() Exit Func DisplayImage($sFile, $iPosX = -1, $iPosY = -1, $iAlpha = 0xFF, $bTopmost = True, $bMain = False) Static $hMainWin Local Const $hBmp_Background = _GDIPlus_BitmapCreateFromFile($sFile) ;load the image If @error Then Return SetError(1, 0, 0) ;image cannot be loaded Local Const $iW = _GDIPlus_ImageGetWidth($hBmp_Background), $iH = _GDIPlus_ImageGetHeight($hBmp_Background) ;get the dimension of the background image Local $hGUI If $hMainWin Then $hGUI = GUICreate("", $iW, $iH, $iPosX, $iPosY, -1, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST * $bTopmost, $WS_EX_TOOLWINDOW, $WS_EX_MDICHILD), $hMainWin) Else $hGUI = GUICreate("", $iW, $iH, $iPosX, $iPosY, -1, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST * $bTopmost, $WS_EX_TOOLWINDOW)) EndIf If $bMain Then $hMainWin = $hGUI ;the following would conflict with main GUI mousedown message ;///If $bMovable Then GUICtrlCreateLabel("", 0, 0, $iW, $iH, Default, $GUI_WS_EX_PARENTDRAG) ;create a hidden label for GUI dragging GUISetState(@SW_SHOW, $hGUI) ;show GUI Local Const $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) ;define an empty bitmap where all the gfx stuff will copied to Local Const $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap) ;get the context to the bitmap to be able to copy / draw to the bitmap _GDIPlus_GraphicsDrawImageRect($hGfx, $hBmp_Background, 0, 0, $iW, $iH) ;draw background image to the empty bitmap Local Const $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) ;convert GDI+ image to GDI to display it on the screen using GDI functions Local Const $hScrDC = _WinAPI_GetDC($hGUI) ;get the device context (dc) handle of the GUI Local Const $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) ;create a compatible dc handle Local Const $hOld = _WinAPI_SelectObject($hMemDC, $hHBitmap) ;selects the GDI bitmap object into the specified device context Local Const $tSize = DllStructCreate($tagSIZE) ;create a $tagSIZE struct (x = width, y = height) DllStructSetData($tSize, "X", $iW) ;set data for width DllStructSetData($tSize, "Y", $iH) ;set data for height Local $tSource = DllStructCreate($tagPOINT) ;create a $tagPOINT struct (x = x position, y = y position) Local $tBlend = DllStructCreate($tagBLENDFUNCTION) ;create $tagBLENDFUNCTION struct -> see help file for more info DllStructSetData($tBlend, "Alpha", $iAlpha) ;set the alpha channel of the GUI -> 255 = opaque, 0 = transparent DllStructSetData($tBlend, "Format", 1) ;set the format to 1 -> bitmap has alpha channels DllCall("user32.dll", "bool", "UpdateLayeredWindow", "hwnd", $hGUI, "handle", $hScrDC, "ptr", 0, "struct*", $tSize, "handle", $hMemDC, "struct*", $tSource, "dword", 0, "struct*", $tBlend, "dword", $ULW_ALPHA) ;display bitmap on screen ;release resources otherwise memory will filled up (memory leak) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBitmap) Local $aResource[7] = [$hGUI, $hScrDC, $hHBitmap, $hMemDC, $tBlend, $tSize, $tSource] ;return the handle to release it later Return $aResource EndFunc ;==>DisplayImage Func ReleaseResources(ByRef $aResource) If Not IsArray($aResource) Then Return SetError(1, 0, 0) If UBound($aResource) <> 7 Then Return SetError(2, 0, 0) _WinAPI_ReleaseDC($aResource[0], $aResource[1]) _WinAPI_DeleteDC($aResource[3]) _WinAPI_DeleteObject($aResource[2]) GUIDelete($aResource[0]) EndFunc ;==>ReleaseResources Func _Fader($res1, $bIn = True, $iTrans = 255, $speed = 3, $delay = 10) If Not IsArray($res1) Then Return SetError(1, 0, 0) If UBound($res1) <> 7 Then Return SetError(2, 0, 0) For $a = 0 To $iTrans Step _Iif($bIn, $speed, -$speed) DllStructSetData($res1[4], "Alpha", $a) DllCall("user32.dll", "bool", "UpdateLayeredWindow", "hwnd", $res1[0], "handle", $res1[1], "ptr", 0, "struct*", $res1[5], "handle", $res1[3], "struct*", $res1[6], "dword", 0, "struct*", $res1[4], "dword", $ULW_ALPHA) ;display bitmap on screen Sleep($delay) Next EndFunc ;==>_Fader #region GDI and GDI+ functions Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iPixelFormat = $GDIP_PXF32ARGB, $iStride = 0, $pScan0 = 0) Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "handle*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return $aResult[6] EndFunc ;==>_GDIPlus_BitmapCreateFromScan0 #endregion GDI and GDI+ functions Regards1 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
-
I needed something to use quickly to determine the version of .Net running on the client pc. My older method of using the navigator.userAgent string from a shell object won't work anymore with the newer versions of IE installed on the clients machines so, 20 lines of quick code needed to be revised into something that would. Utilizing the information provided here: http://support.microsoft.com/kb/318785/en-us , you have the dotNetRegVersions.au3 attached below. One thing I could not do was the Win8 - 4.5 version, no test environment for that. So, those of you that would like to make it better, add to, whatever, feel free... As usual, no time taken to do headers, some day maybe ( or someone else can add them ), pretty simple calls and examples should explain it all. Example: #include "dotNetRegVersions.au3" #include <Array.au3> MsgBox(64 + 262144, "Example", ".Net exists = " & _dotNet_reg_Exists() & @CRLF) MsgBox(64 + 262144, "Example", "Version 1.1 or greater exists = " & (_dotNet_reg_VersionIsAtLeast("1.1"))) MsgBox(64 + 262144, "Example", "Version 1.1 exists = " & (_dotNet_reg_VersionExists("1.1"))) MsgBox(64 + 262144, "Example", "Version 2.0 exists = " & (_dotNet_reg_VersionExists("2.0"))) Global $ga_all = _dotNet_reg_VersionAll() _ArrayDisplay($ga_all, "All Versions") Global $ga_latest = _dotNet_reg_VersionLatest() _ArrayDisplay($ga_latest, "Latest") Changed: Most of the sub-funcs to 1 func/switch statement. Added AdmiralAlkex 4.5 msdn find ( Thanks ) dotNetRegVersions.au31 point