Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/03/2015 in all areas

  1. LAST VERSION - 1.0 02-Feb-15 This UDF allows to use API Virtual Hard Disk (VHD) in AutoIt scripts. VHD format is a publicly-available image format specification that specifies a virtual hard disk encapsulated in a single file, capable of hosting native file systems while supporting standard disk and file operations. VHD is supported on Windows 7 and Windows Server 2008 R2. WinAPIVhd UDF written for AutoIt 3.3.6.x or later, however, if you are using AutiIt 3.3.12.x, you can integrate this library into AutoIt package (see below). The library contains a detailed help file (WinAPIVhd.chm) in AutoIt style, syntax highlighting and calltips files for SciTE (required full version), and full examples. I hope that many users will find this library useful. Moreover, I created two icons for the file types .vhd (Virtual Hard Disk) and .vhdx (Hyper-V Virtual Hard Disk) which you can use for yourself. You can also download more document icons in the same style for AutoIt, Restorator, etc. To associate icons with the required file types, you can use my simple utility >File Types Manager. Installation (optionaly) If you are using AutiIt 3.3.12.0 or later, you can integrate WinAPIVhd UDF library into AutoIt package. This will add the calltips and syntax highlighting for new functions, and provide a simpler way to include the library in your scripts. To integrate WinAPIVhd UDF library into AutoIt, you should do the following steps. Before to do anything, you should make sure that the WinAPIVhd UDF library is not included in the AutoIt package. For more information, see the help file (WinAPIVhd.chm) within the archive. Сopy APIVhdConstants.au3 and WinAPIVhd.au3 to AutoIt3Include.Сopy Examples*.au3 to AutoIt3ExamplesHelpFile.Сopy SciTE*.* to AutoIt3SciTE (only if the full version of SciTE is installed).Сopy HelpWinAPIVhd.chm to AutoIt3.Open AutoIt3IncludeAPIConstants.au3 in SciTE and add the line #include "APIVhdConstants.au3" to the end of list.Open AutoIt3IncludeWinAPIEx.au3 in SciTE and add the line #include "WinAPIVhd.au3" to the end of list. Available functions WinAPIVhd UDF Library v1.0 Previous downloads: 17 WinAPIVhd.zip Example #Include <APIConstants.au3> #Include <GUIConstantsEx.au3> #Include <EditConstants.au3> #Include <WinAPIEx.au3> #Include <APIVhdConstants.au3> #Include <WinAPIVhd.au3> Opt('MustDeclareVars', 1) Opt('TrayAutoPause', 0) Global $hForm, $hVHD = 0, $Edit, $Button[3], $Path, $Size = 128 * 1024 * 1024 If _WinAPI_GetVersion() < '6.1' Then MsgBox(16, 'Error', 'Require Windows 7 or later.') Exit EndIf $hForm = GUICreate('VHD API Example', 460, 302) $Edit = GUICtrlCreateEdit('', 13, 13, 434, 238, $ES_READONLY) GUICtrlSetFont(-1, 9, 400, 0, 'Courier New') GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetColor(-1, 0x404040) $Button[0] = GUICtrlCreateButton('Create VHD', 12, 263, 140, 27) $Button[1] = GUICtrlCreateButton('Open VHD', 160, 263, 140, 27) $Button[2] = GUICtrlCreateButton('Close VHD', 308, 263, 140, 27) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE If $hVHD Then _VHD_Close() EndIf Exit Case $Button[0] $Path = FileSaveDialog('Create VHD', @ScriptDir, 'Virtual Hard Disk (*.vhd)|All Files (*.*)', 2 + 16, 'Test.vhd', $hForm) If $Path Then If FileExists($Path) Then FileDelete($Path) EndIf Else ContinueLoop EndIf GUICtrlSetData($Edit, '') If Not _VHD_Create($Path, $Size) Then If FileExists($Path) Then FileDelete($Path) EndIf ContinueLoop EndIf For $i = 0 To 1 GUiCtrlSetState($Button[$i], $GUI_DISABLE) Next GUiCtrlSetState($Button[2], $GUI_ENABLE) Case $Button[1] $Path = FileOpenDialog('Open VHD', @ScriptDir, 'Virtual Hard Disk (*.vhd)|All Files (*.*)', 1 + 2, '', $hForm) If $Path Then Else ContinueLoop EndIf GUICtrlSetData($Edit, '') If Not _VHD_Open($Path) Then ContinueLoop EndIf For $i = 0 To 1 GUiCtrlSetState($Button[$i], $GUI_DISABLE) Next GUiCtrlSetState($Button[2], $GUI_ENABLE) Case $Button[2] _VHD_Close() GUiCtrlSetState($Button[2], $GUI_DISABLE) For $i = 0 To 1 GUiCtrlSetState($Button[$i], $GUI_ENABLE) Next EndSwitch WEnd Func _P2L($sDisk) Local $aData, $aList, $iDisk, $iTime, $sMask = '' $iDisk = StringReplace($sDisk, '\\.\PHYSICALDRIVE', '') If Not StringIsDigit($iDisk) Then Return $sDisk EndIf $iDisk = Number($iDisk) $iTime = TimerInit() While TimerDiff($iTime) < 5000 $aList = DriveGetDrive('FIXED') If IsArray($aList) Then For $i = 1 To $aList[0] If Not StringInStr($sMask, $aList[$i]) Then $aData =_WinAPI_GetDriveNumber($aList[$i]) If (IsArray($aData)) And ($aData[1] = $iDisk) Then Return StringUpper($aList[$i]) EndIf EndIf $sMask&= $aList[$i] Next EndIf Sleep(10) WEnd Return $sDisk EndFunc ;==>_P2L Func _Log($sEvent, $iError = -1) Switch $iError Case -1 $sEvent &= @CRLF Case 0 $sEvent &= ': OK' & @CRLF Case Else $sEvent &= ': FAIL (' & $iError & ')' & @CRLF EndSwitch GUICtrlSendMsg($Edit, $EM_SETSEL, 32767, 32767) GUICtrlSetData($Edit, $sEvent, 1) EndFunc ;==>_Log Func _VHD_Close() Local $sDisk = _P2L(_WinAPI_GetVirtualDiskPhysicalPath($hVHD)) _WinAPI_DetachVirtualDisk($hVHD) If @Error Then _Log('Detach', @Extended) Else _Log('Detach', 0) EndIf _WinAPI_CloseHandle($hVHD) $hVHD = 0 If $sDisk Then _Log('VHD (' & $sDisk & ') has been closed!') EndIf EndFunc ;==>_VHD_Close Func _VHD_Create($sPath, $iSize) Local $tVST, $tCVDPV1, $tGVDI, $sDisk, $Error = True _Log('Path: ' & _WinAPI_PathCompactPathEx($sPath, 60)) Do $tVST = _WinAPI_CreateVirtualStorageType($VIRTUAL_STORAGE_TYPE_DEVICE_VHD, $VIRTUAL_STORAGE_TYPE_VENDOR_MICROSOFT) $tCVDPV1 = _WinAPI_CreateCreateVirtualDiskParametersV1($iSize) $hVHD = _WinAPI_CreateVirtualDisk($sPath, $tVST, $tCVDPV1, $VIRTUAL_DISK_ACCESS_ALL, $CREATE_VIRTUAL_DISK_FLAG_FULL_PHYSICAL_ALLOCATION) If @Error Then _Log('Create', @Extended) ExitLoop Else _Log('Create', 0) EndIf _WinAPI_AttachVirtualDisk($hVHD) If @Error Then _Log('Attach', @Extended) ExitLoop Else _Log('Attach', 0) EndIf $sDisk = _WinAPI_GetVirtualDiskPhysicalPath($hVHD) If @Error Then ; Nothing EndIf _VHD_Initialize($sDisk) If @Error Then _Log('Initialize', @Extended) ExitLoop Else _Log('Initialize', 0) EndIf $Error = False Until 1 If $Error Then If $hVHD Then _WinAPI_DetachVirtualDisk($hVHD) _WinAPI_CloseHandle($hVHD) EndIf $hVHD = 0 Return 0 EndIf $tGVDI = _WinAPI_GetVirtualDiskInformation($hVHD, $GET_VIRTUAL_DISK_INFO_IDENTIFIER) If Not @Error Then _Log('GUID: ' & _WinAPI_StringFromGUID(DllStructGetPtr($tGVDI, 'Identifier'))) EndIf $tGVDI = _WinAPI_GetVirtualDiskInformation($hVHD, $GET_VIRTUAL_DISK_INFO_SIZE) If Not @Error Then _Log('Size: ' & _WinAPI_StrFormatByteSize(DllStructGetData($tGVDI, 'VirtualSize'))) EndIf _Log('VHD (' & _P2L($sDisk) & ') has been successfully created and ready for use!') Return 1 EndFunc ;==>_VHD_Create Func _VHD_Initialize($sDisk) ;~ Local Const $PARTITION_ENTRY_UNUSED = 0x00 ;~ Local Const $PARTITION_EXTENDED = 0x05 ;~ Local Const $PARTITION_FAT_12 = 0x01 ;~ Local Const $PARTITION_FAT_16 = 0x04 ;~ Local Const $PARTITION_FAT_32 = 0x0B Local Const $PARTITION_IFS = 0x07 ;~ Local Const $PARTITION_LDM = 0x42 ;~ Local Const $PARTITION_NTFT = 0x80 ;~ Local Const $PARTITION_VALID_NTFT = 0xC0 Local Const $PARTITION_STYLE_MBR = 0 ;~ Local Const $PARTITION_STYLE_GPT = 1 ;~ Local Const $PARTITION_STYLE_RAW = 2 Local Const $tagDISK_GEOMETRY = 'int64 Cylinders;dword MediaType;dword TracksPerCylinder;dword SectorsPerTrack;dword BytesPerSector;' Local Const $tagCREATE_DISK_MBR = 'dword Signature;byte GPT[16];' ;~ Local Const $tagCREATE_DISK_GPT = 'byte DiskId[16];dword MaxPartitionCount' Local Const $tagCREATE_DISK = 'dword PartitionStyle;' & $tagCREATE_DISK_MBR Local Const $tagPARTITION_INFORMATION_MBR = 'byte PartitionType;boolean BootIndicator;boolean RecognizedPartition;dword HiddenSectors;byte GPT[104];' ;~ Local Const $tagPARTITION_INFORMATION_GPT = 'byte PartitionType[16];byte PartitionId[16];uint64 Attributes;wchar Name[36];' Local Const $tagPARTITION_INFORMATION_EX = 'dword PartitionStyle;int64 StartingOffset;int64 PartitionLength;dword PartitionNumber;boolean RewritePartition;byte Alignment[3];' & $tagPARTITION_INFORMATION_MBR Local Const $tagDRIVE_LAYOUT_INFORMATION_MBR = 'ulong Signature;byte GPT[36];' ;~ Local Const $tagDRIVE_LAYOUT_INFORMATION_GPT = 'byte DiskId[16];int64 StartingUsableOffset;int64 UsableLength;ulong MaxPartitionCount;' Local Const $tagDRIVE_LAYOUT_INFORMATION_EX = 'dword PartitionStyle;dword PartitionCount;' & $tagDRIVE_LAYOUT_INFORMATION_MBR & 'byte PartitionEntry[144];' Local Const $tagVERIFY_INFORMATION = 'int64 StartingOffset;dword Length' Local $hFile, $tDG, $tCD, $tDLIEX, $tPIEX, $tVI, $Error, $Extended = 0 Do $Error = 1 $hFile = _WinAPI_CreateFileEx($sDisk, $OPEN_EXISTING, BitOR($GENERIC_READ, $GENERIC_WRITE), BitOR($FILE_SHARE_READ, $FILE_SHARE_WRITE), $FILE_ATTRIBUTE_NORMAL) If @Error Then ExitLoop EndIf ; IOCTL_DISK_GET_DRIVE_GEOMETRY $Error = 2 $tDG = DllStructCreate($tagDISK_GEOMETRY) If Not _WinAPI_DeviceIoControl($hFile, $IOCTL_DISK_GET_DRIVE_GEOMETRY, 0, 0, DllStructGetPtr($tDG), DllStructGetSize($tDG)) Then ExitLoop EndIf ; IOCTL_DISK_CREATE_DISK $Error = 3 $tCD = DllStructCreate($tagCREATE_DISK) DllStructSetData($tCD, 'PartitionStyle', $PARTITION_STYLE_MBR) DllStructSetData($tCD, 'Signature', 0xA4B57300) If Not _WinAPI_DeviceIoControl($hFile, $IOCTL_DISK_CREATE_DISK, DllStructGetPtr($tCD), DllStructGetSize($tCD)) Then ExitLoop EndIf ; IOCTL_DISK_SET_DRIVE_LAYOUT_EX $Error = 4 $tDLIEX = DllStructCreate($tagDRIVE_LAYOUT_INFORMATION_EX) DllStructSetData($tDLIEX, 'PartitionStyle', $PARTITION_STYLE_MBR) DllStructSetData($tDLIEX, 'PartitionCount', 1) DllStructSetData($tDLIEX, 'Signature', 0xA4B57300) $tPIEX = DllStructCreate($tagPARTITION_INFORMATION_EX, DllStructGetPtr($tDLIEX, 'PartitionEntry')) DllStructSetData($tPIEX, 'PartitionStyle', $PARTITION_STYLE_MBR) DllStructSetData($tPIEX, 'StartingOffset', 0) DllStructSetData($tPIEX, 'PartitionLength', DllStructGetData($tDG, 'Cylinders') * DllStructGetData($tDG, 'TracksPerCylinder') * DllStructGetData($tDG, 'SectorsPerTrack') * DllStructGetData($tDG, 'BytesPerSector')) DllStructSetData($tPIEX, 'PartitionNumber', 1) DllStructSetData($tPIEX, 'RewritePartition', 1) DllStructSetData($tPIEX, 'PartitionType', $PARTITION_IFS) DllStructSetData($tPIEX, 'BootIndicator', 0) DllStructSetData($tPIEX, 'RecognizedPartition', 1) DllStructSetData($tPIEX, 'HiddenSectors', 1) If Not _WinAPI_DeviceIoControl($hFile, $IOCTL_DISK_SET_DRIVE_LAYOUT_EX, DllStructGetPtr($tDLIEX), DllStructGetSize($tDLIEX)) Then ExitLoop EndIf ; IOCTL_DISK_VERIFY $Error = 5 $tVI = DllStructCreate($tagVERIFY_INFORMATION) DllStructSetData($tVI, 'StartingOffset', 0) DllStructSetData($tVI, 'Length', DllStructGetData($tPIEX, 'PartitionLength')) If Not _WinAPI_DeviceIoControl($hFile, $IOCTL_DISK_VERIFY, DllStructGetPtr($tVI), DllStructGetSize($tVI)) Then ExitLoop EndIf ; IOCTL_DISK_UPDATE_PROPERTIES $Error = 6 If Not _WinAPI_DeviceIoControl($hFile, $IOCTL_DISK_UPDATE_PROPERTIES) Then ExitLoop EndIf $Error = 0 Until 1 If $Error Then $Extended = _WinAPI_GetLastError() EndIf If $hFile Then _WinAPI_CloseHandle($hFile) EndIf Return SetError($Error, $Extended, Not $Error) EndFunc ;==>_VHD_Initialize Func _VHD_Open($sPath) Local $tVST, $tGVDI, $sDisk, $Error = True _Log('Path: ' & _WinAPI_PathCompactPathEx($sPath, 50)) Do $tVST = _WinAPI_CreateVirtualStorageType($VIRTUAL_STORAGE_TYPE_DEVICE_VHD, $VIRTUAL_STORAGE_TYPE_VENDOR_MICROSOFT) $hVHD = _WinAPI_OpenVirtualDisk($sPath, $tVST, 0, $VIRTUAL_DISK_ACCESS_ALL) If @Error Then _Log('Open', @Extended) ExitLoop Else _Log('Open', 0) EndIf _WinAPI_AttachVirtualDisk($hVHD) If @Error Then _Log('Attach', @Extended) ExitLoop Else _Log('Attach', 0) EndIf $Error = False Until 1 If $Error Then If $hVHD Then _WinAPI_DetachVirtualDisk($hVHD) _WinAPI_CloseHandle($hVHD) EndIf $hVHD = 0 Return 0 EndIf $tGVDI = _WinAPI_GetVirtualDiskInformation($hVHD, $GET_VIRTUAL_DISK_INFO_IDENTIFIER) If Not @Error Then _Log('GUID: ' & _WinAPI_StringFromGUID(DllStructGetPtr($tGVDI, 'Identifier'))) EndIf $tGVDI = _WinAPI_GetVirtualDiskInformation($hVHD, $GET_VIRTUAL_DISK_INFO_SIZE) If Not @Error Then _Log('Size: ' & _WinAPI_StrFormatByteSize(DllStructGetData($tGVDI, 'VirtualSize'))) EndIf $sDisk = _WinAPI_GetVirtualDiskPhysicalPath($hVHD) If Not @Error Then _Log('VHD (' & _P2L($sDisk) & ') has been successfully opened and ready for use!') EndIf Return 1 EndFunc ;==>_VHD_Open
    2 points
  2. I've recently been uncovering the useful commandline tools that can be found natively in Windows, one of which was findstr (there is also a GUI interface available in SciTE4AutoIt3.) After coming across this little gem and implementing in >SciTE Jump, it felt only right that I should share this on the forums as a standalone UDF. Thanks Function: ; #FUNCTION# ==================================================================================================================== ; Name ..........: _FindInFile ; Description ...: Search for a string within files located in a specific directory. ; Syntax ........: _FindInFile($sSearch, $sFilePath[, $sMask = '*'[, $fRecursive = True[, $fLiteral = Default[, ; $fCaseSensitive = Default[, $fDetail = Default]]]]]) ; Parameters ....: $sSearch - The keyword to search for. ; $sFilePath - The folder location of where to search. ; $sMask - [optional] A list of filetype extensions separated with ';' e.g. '*.au3;*.txt'. Default is all files. ; $fRecursive - [optional] Search within subfolders. Default is True. ; $fLiteral - [optional] Use the string as a literal search string. Default is False. ; $fCaseSensitive - [optional] Use Search is case-sensitive searching. Default is False. ; $fDetail - [optional] Show filenames only. Default is False. ; Return values .: Success - Returns a one-dimensional and is made up as follows: ; $aArray[0] = Number of rows ; $aArray[1] = 1st file ; $aArray[n] = nth file ; Failure - Returns an empty array and sets @error to non-zero ; Author ........: guinness ; Remarks .......: For more details: http://ss64.com/nt/findstr.html ; Example .......: Yes ; =============================================================================================================================== Func _FindInFile($sSearch, $sFilePath, $sMask = '*', $fRecursive = True, $fLiteral = Default, $fCaseSensitive = Default, $fDetail = Default) Local $sCaseSensitive = $fCaseSensitive ? '' : '/i', $sDetail = $fDetail ? '/n' : '/m', $sRecursive = ($fRecursive Or $fRecursive = Default) ? '/s' : '' If $fLiteral Then $sSearch = ' /c:' & $sSearch EndIf If $sMask = Default Then $sMask = '*' EndIf $sFilePath = StringRegExpReplace($sFilePath, '[\\/]+$', '') & '\' Local Const $aMask = StringSplit($sMask, ';') Local $iPID = 0, $sOutput = '' For $i = 1 To $aMask[0] $iPID = Run(@ComSpec & ' /c ' & 'findstr ' & $sCaseSensitive & ' ' & $sDetail & ' ' & $sRecursive & ' "' & $sSearch & '" "' & $sFilePath & $aMask[$i] & '"', @SystemDir, @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($iPID) $sOutput &= StdoutRead($iPID) Next Return StringSplit(StringStripWS(StringStripCR($sOutput), BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING)), @LF) EndFunc ;==>_FindInFileExample use of Function: #include <Array.au3> #include <Constants.au3> Example() Func Example() Local $hTimer = TimerInit() Local $aArray = _FindInFile('findinfile', @ScriptDir, '*.au3;*.txt') ; Search for 'findinfile' within the @ScripDir and only in .au3 & .txt files. ConsoleWrite(Ceiling(TimerDiff($hTimer) / 1000) & ' second(s)' & @CRLF) _ArrayDisplay($aArray) $hTimer = TimerInit() $aArray = _FindInFile('autoit', @ScriptDir, '*.au3') ; Search for 'autoit' within the @ScripDir and only in .au3 files. ConsoleWrite(Ceiling(TimerDiff($hTimer) / 1000) & ' second(s)' & @CRLF) _ArrayDisplay($aArray) EndFunc ;==>Example
    1 point
  3. think I got it While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $web $pc = GUICtrlRead($combo1) $sRead = IniRead(@DesktopDir & "\asset.ini", $pc, "link", "") ShellExecute($sRead) EndSwitch WEnd
    1 point
  4. #Include "Json.au3" Local $Json = '{ "Headers":[ { "Name":"LOGICAL_NAME","Type":"VARCHAR2"}],"ColumnCount":1,"Rows":[ { "Cells":[ "ThisIsWhatIWant"],"CellCount":1}]}' Local $Obj = Json_Decode($Json) ConsoleWrite(Json_Get($Obj, '["Rows"][0]["Cells"][0]') & @LF) ConsoleWrite(Json_Get($Obj, '.Rows[0].Cells[0]') & @LF) ConsoleWrite(Json_Encode($Obj, $JSON_PRETTY_PRINT) & @LF)
    1 point
  5. SorryButImaNewbie, Once again that tells us absolutely nothing. There is no reference to an $arfolyam control in that snippet other then when you try to read it. Put yourself in our shoes. We have no idea what this script is intended to do nor how it works internally - all we can do is try and work through the code to see if we can spot an error which explains why you are not getting a return when you read a control. At the moment we have absolutely no knowledge of the control other than your statement that it is a "textbox, created in ISN Studio". We have no idea if you have created it correctly, what is likely to be in there to read, or even if it is emptied/destroyed before you read it (a not uncommon problem). Without a decent script to work on there is almost no chance that we can help you - our crystal balls (actually our experience at debugging scripts) can sometimes suggest a good line of attack, but this case is not one which offers much scope for crystallomancy. > All I can suggest is that you add some debugging (such as a MsgBox/ConsoleWrite line) to your script each time the $arfolyam control is mentioned and see if you can spot a time where it does not do what you think it should. That might give you a clue as to what is happening - because there is no way that GUICtrlRead suddenly failed yesterday, it must be that there is nothing to read. Given your seemingly random use of Hungarian notation for your variables, I would also suggest checking that you have not managed to overwrite the original ControlID with another similarly named arfolyam variable. M23
    1 point
  6. 1/ nop, not yet. You can save, but not load bitmaps. 2/ depends what you have to do. Taking the captures is often the most time consuming task, and isexcluded is quite fast with a reasonnable number of exclusion rects. If you have few captures and lot of searchs to do on each, it should be faster NOT to use those rects.
    1 point
  7. Yashied

    File Types Manager

    Links updated.
    1 point
  8. Thinking about this more. It's my understanding that Koda is based off of GuiBuilder. If I continue developing GuiBuilder in the direction that I wanted to take it would be in effect reinventing Koda. I think I will abandon some of my more ambitious plans. I will however attempt to implement the previously disabled controls. It's really awesome that it now runs on the latest AutoIt along with the features that have been added. I will continue to implement a template system and other things which don't take away from the scope of the original GuiBuilder which is minimal screen space, ease of use, etc.
    1 point
  9. Melba23

    Syntax check problem

    Varibobu, Download the latest Beta Au3Check from here. M23
    1 point
  10. You have to learn to think about where the responsibilities should be. Do you think a function called "Move File A to B" should also be responsible for "Prepare directory"? Or could that cause confusion to someone who is not familiar with your code? Or is that not relevant to the process of "Move File A to B"? A simple example will help. For example, we have a humanoid robot which we want to program to wave his left arm and then say "Hello!". We define the functions Main, WaveArm and SayHello. In terms of functionality, it doesn't really matter if we let Main call WaveArm and let WaveArm call SayHello. But should a function called WaveArm also be the trigger for saying "Hello!" afterwards? Or should we let Main call both WaveArm and SayHello in the order we want it to happen? If we choose to keep the responsibility of waving the arm in the method WaveArm and the responsibility of saying "Hello!" in SayHello, we can easily ask a different programmer later to change the code to make the robot say "Hello" first and then wave his arm (the reverse of what we wanted) by changing the Main. He will be done in a few seconds, rather than having to drill into the long and complicated WaveArm function which mainly deals with motor control. It therefore helps with clarity too: If we want to understand the order of the robot's actions, we don't have to drill down into the specifics of how the robot waves his arm by reading the whole WaveArm function, we just have to know that WaveArm will wave the robots arm and let other code deal with the order of the robots operations. In this way, we can create functions which are essentially abstractions of the code we write. We can stop thinking of WaveArm as a series of operations of motor control, but instead think of it as a robot waving its arm (and only that). This helps us write and maintain bigger programs without having to understand every line of code in the system. Placing correct responsibilities is a main principle in software development and is often referred to by the larger term Separation of Concerns, though I find it easier to explain and understand as thinking of placing responsibilities.
    1 point
  11. Ok this is what you want ...i'll leave it to you to play with it... '?do=embed' frameborder='0' data-embedContent>> ; add to OO_JSON #AutoIt3Wrapper_Res_File_Add=json2.txt, rt_rcdata, JSON_TXT_2 #include "resources.au3" ; $json_text = _OO_JSON_Read_File("json2.txt") ; replace this line in oo_json.udf - do for each file, $json_text = _ResourceGetAsString("JSON_TXT_2")
    1 point
  12. @junkew - Sorry, this is just a list for historical reference, though you can get more out of it, if you put the time in. All that stuff would require testing things, which I'm certainly not about to do ... others can though, if they wish. The dates though, should help in some regards. P.S. It is also a quick ready reference to save on searching, and to give awareness of GUI elements that many might not know about ... though that is somewhat of a secondary concern for me. P.S.S. If you can show me what you mean by tabular view and columns, I might consider it. Years ago I discovered you cannot do tables here, which is what I would have preferred. As things look now, I think they are easy enough to read. The second section, GUI Related, will probably end up messier.
    1 point
  13. A program called ByHand.exe.
    1 point
  14. How about this? #include <WinAPIdiag.au3> $n = 53; Error code MsgBox(64, "Test", _WinAPI_GetErrorMessage($n))
    1 point
  15. lsakizada, Thanks - apart from my abysmal round of golf this morning (fortunately my opponent was very nearly as bad!) it has indeed been a really good one so far. M23
    1 point
×
×
  • Create New...