Leaderboard
Popular Content
Showing content with the highest reputation on 04/09/2015 in all areas
-
ISN AutoIt Studio Version 0.98 BETA is now ONLINE! Happy testing! Changelog: (by Google translator) -> ISN AutoIt Studio: <- ----------------------------------- - Fix: Various bug fixes - Fix: Fixed a bug by not run code stored by Tidy and co. lost. (Thx to Rex) - Fix: When not .au3 files (eg txt data.) Were often some buttons (eg printing or searches.) Locked. This is now fixed. - Fix: The little debug window right below could not be disabled. This is now fixed. - Fix: F4 (and double) in the output console now works with the AutoItSyntaxCheck - Change: The dialog "More AU3 file compile" (in the Project Settings -> Compile Settings) is now called "Select files to compile". - NEW: There is now the Project menu item "Project Settings". Here many project-specific settings are now combined. - NEW: The project features have been incorporated into the project settings. - NEW: "Select files to compile" dialog, you can now change the order of the files to be compiled. In addition, can now be included in the order as the main file. - NEW: For commands such as If, While, For, Func, etc., after pressing the Enter key now automatically made a tab feeder. - NEW: The open tabs can now be moved via Drag'n Drop with each other. - NEW: Danish language updated (thx to Rex) - NEW: The Obfuscator was replaced by the Au3Stripper tool. (Since the development of the obfuscator has been set) - NEW: Data folder Au3Defs was removed. The data is now available (as in SciTE4AutoIt) in their own folders. ( Data Api or Data Properties) The data from the old Au3Defs folders are automatically transferred to the new folder structure at the start of the ISN. (If there are writeable!) - NEW: AutoIt3Wrapper updated - NEW: Hotkeys and plugins in the program settings have now Icons - NEW: Keywoards such as If, While, etc. Func now automatic EndIf, Wend, etc. EndFunc be inserted at the end. (Can also be activated in the program settings) - NEW: When writing declarations such as Global, Local, or const a $ character can now be automatically added to wunscht. (P program settings) - NEW: Automatic storage: In the program settings can now Auto save on time and keyboard input are activated. - NEW: In the "Compile Settings" there is now an input field to the folder structure ready for the project to continue. With also some variables (eg.% Version% project) can be used. - NEW: Temporary scripts: It is now under "File -> Create New File" temporary scripts will be created. These are automatically stored in a folder previously defined. (S. Project settings) On request the files after the close can be deleted again. (Perfect for test scripts, etc.) -> ISN form Studio 2: <- ----------------------------------- - Fix: Various bug fixes - Fix: Fixed a bug where the tab was destroyed in "GUI Properties" window - NEW: When multiple controls are selected these can now be changed simultaneously in size. - NEW: For TabItems (Tabseiten) own handles can now be defined. (Right click on tabitem -> Handle for tabitem specify) - NEW: You can now copy and paste multiple controls at once. - NEW: handles in the GUI can now be defined as a Global / Local Const - NEW: New control: Dummy Control2 points
-
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_Open1 point
-
Here some useless graphical examples using GDI+, made for fun (my 1st GDI+ codes ): !Some examples may run slowly on WinXP machines (workaround in this thread)! Some examples using Hex() function need adjustment when running on AutoIt version 3.3.8.0+ otherwise colors are flashing (fixed versions in AiO package below)!!! #01 Flying Pearl Necklaces: Source code here (577 downloads previously)! Flying Pearl Necklaces.au3 #02 Flying Squares: Source code here (265 downloads previously)! Flying Squares.au3 #03 Rotating Squares: Source code here! Rotating_Squares.au3 #04 Plasma & Plasma Variant: Source codes here! Plasma: Plasma.au3 Plasma Variant: Plasma Variante.au3 #05 L-System Fractals: Source code here (382 downloads previously)! L-System Fractals.7z #06 Sinus Scroller: Source code here (218 downloads previously)! Sinus Scroller.au3 #07 Visualization: Analog Meter: download here (including source, needed files and compiled exe): Source code + needed files here (473 downloads previously)! Visualizer_Analog Meter.7z More GDI+ visualizations here by monoceres or by Eukalyptus Audio Visualization Collection (German site) #08 Particle Catapult: Source code here (70 downloads previously)! Particle_Catapult.au3 #09 Rotating Cube: Source code here (79 downloads previously)! Rotating_Cube.au3 #10 Simple Ball Collision Simulation: Source code here (35 downloads previously)! Simple_Ball_Collision_Simulation.au3 (it is not finished yet! look from time to time into this thread for an update! Nice tutorial here) #11 Particle Explosions: Source code here: Explosions__from_AutoIteroids_.au3 #12 Rotating Letters: Source codes here: Rotating Letters.au3 Transparent version (87 downloads previously): Rotating Letters Transparent.au3 #13 Rotating Cube 2: Source code here (53 downloads previously): Rotating Cube 2.au3 #14 Rotating Cube 2 with Textures: Source code here (68 downloads previously): Rotating Cube 2 + Textures.7z #15 Rotating Cube 2 with some examples from above on each surface: Source code here (55 downloads previously): Rotating Cube 2 + animated surfaces.7z #16 Rotating Cube 2 simple: Source code here: Rotating Cube 2 - Simple.au3 Or with background pic or Rotating Cube 2 simple + Background #17 Tramp of Particles: Source code here: Tramp of Particles.au3 #18 Twister: Source code here: Twister.au3 WinAPI version is 2.5x faster (look in AiO archive)! #19 Star Burst: Source code here: Star Burst.au3 #20 Warp Starfield: Source code here: Warp Starfield.au3 #21 Plasma 2: Source code here: Plasma 2.au3 #22 Isometric Level-3 Cube: Source code here: Isometric Level-3 Cube.au3 #23 Zoomer: Source code here (7 downloads previously): Zoomer.au3 GDIP.au3 needed for Zoomer! #24 Suspended Cloth Simulation: Source code here: Suspended Cloth Simulation.au3 #25 Visualizer: Oscilloscope Farbrausch: Source code here (30 downloads previously): Visualizer Oscilloscope Farbrausch.au3 To run Visualizer Oscilloscope Farbrausch.au3 properly you need following files: Bass.au3, BassExt.au3, Bass.dll and BassExt.dll. These files can be found in AiO package or on German AutoIt site! #26 Im- Exploding Particle Logo: Source code here: Im- Exploding Particle Logo.7z #27 Pixel Text Effect: Source code here (12 downloads previously): Pixel Text Effect.7z or with ♬chip sound♫ aka demo style (download from German AutoIt site or from AiO archive). #27 works best on Vista+ machines! #28 Star Wars Scroller: Source code here: Star Wars Scroller.au3 For a complete Star Wars Intro have a look to eukalyptus' Star-Wars Intro (see below!) #29 Rotated Letters Simple: Source code here: Rotated Letters Simple.au3 #30 Ballet of Letters: Source code here: Ballet of Letters.au3 #31 Perfect Illusion: Source code here: Perfect Illusion Variant 1.au3 Perfect Illusion Variant 2.au3 Perfect Illusion Variant 3.au3 Mesmerizing Squares Screensaver (previous downloads approx. 100): Mesmerizing_Squares_Screensaver.au3 (compiled version here): Don't stare too long on it or you will be mesmerized One more: Rotating triangle + vertical scroller + music (modification of monoceres' code): Magic Lines Screesaver (110 downloads previously): Magic Lines Screensaver.7z Another screensaver - 3D Star Scrolling Screensaver (83 downloads previously): GDI+ 3D Star Scrolling Screensaver.au3 !Some examples may run slowly on WinXP machines (workaround in this thread)! Some examples using Hex() function need adjustment when running on AutoIt version 3.3.8.0+ otherwise colors are flashing (fixed versions in AiO package below)!!! AiO download link ☞ AiO1 or AiO2 ☜ (all examples above compiled + source codes packed with 7-Zip) Have a look also to the game I made using GDI+: Link: AUTOITEROIDS v1.018 Build 2011-06-09 (Final) (a clone of the game Asteroids made by Atari 1979) I hope you like it! Any kind of comment is welcome!!! My examples are all done with AutoIt v3.3.0.0 on Vista x32! Kudos to: monoceres, smashly, malkey, Eukalyptus and Authenticity! Check out Some Graphical Examples using GDI+ Vol. II build 2016-01-25 More examples made by other members in this thread (thanks you very much!): Spinning Flying Pearl Necklaces by smashly: Spinning Flying Squares by smashly and ProgAndy LMP Visualization by youknowwho4eva: SineWorm by monoceres: Enterprise Warp by youknowwho4eva: Confused ASCII by monoceres: Lissajous Curve by monoceres: Butterfly Curve by monoceres: ParticleCollisionFun2 by crashdemons: Extreme nice physic engine by moritz1243 (German site): Lingering Line by MvGulik: Scroller Sine Blobs by Lakes: Cube surface and 3D axis and by Lakes: by eukalyptus: by eukalyptus: Two more examples by eukalyptus: and FEEL FREE TO POST YOUR GDI+ EXAMPLES HERE,TOO!!! Have fun and regards, UEZ ✌ PS: more modified examples also here in this topic History of my useless scripts above:1 point
-
Pure guy. You (as many others) are victim of Microsoft, who need money for new and new versions of not needed and not wanted systems, so they every 2 years create new version of Windows just to get more money. The most changes in new Windows are to bad. People definitely are not more productive in newer Windows as you said! It's exactly opposite way! I hate all newer Windows after XP. Yes I can stand Windows7 as it's relatively normal but everything other is crap/shit (Vista,Win8). With each new Windows there is so much problems (cripled GUI, cripled compatibility, everything good changed to bad) so developers and users of applications have to solve many redundant tasks. Microsoft does all these changes not for improving OS but only just to have new changed/diferent version to get more money for new sold OS licences. They just synthetically create previous versions obsolete as soon as possible to force people paying for new licences.1 point
-
You must have been using it in a way that was never intended or maybe you had a crap version. I think it's time people stopped messing around with all this bigger, better, faster bloat nonesence and actually do some computations. ^^1 point
-
GUICtrlListView_AddSubItem Bug? (error when looping)
MuffettsMan reacted to kylomas for a topic
Your welcome. Just wanted to show an example of populating a LV from an SQLite produced 2D array. It sounded like you were mixing up _additem which uses a "0" offset and _addsubitem which uses a "1" offset.1 point -
Is there a GUI Time Picker?
MuffettsMan reacted to MikahS for a topic
GUICtrlCreateDate Look at example 4.1 point -
I'm a pc and I find It funny that Microsoft even acknowledges Vista's existence, commercial and physical failure that it was, compared to xp which although old remains one of their few successes.1 point
-
does SciTE Script Editor have an auto re-run functionality?
MuffettsMan reacted to Exit for a topic
Here is a part of my User.Optons file # http://www.scintilla.org/CommandValues.html user.shortcuts=\ F4|IDM_STOPEXECUTE|\ F9|IDM_TOGGLE_FOLDALL| F4 stops the current scriptF9 toggles script folding (just a bonus for You)1 point -
does SciTE Script Editor have an auto re-run functionality?
MuffettsMan reacted to mLipok for a topic
the simplest way to be happy Run your script from SciTe4Au3 (I mean Jos version) and now look in console: So the only one what you must to do is : EDIT: CTRL+ALT+BREAK and for other way you can edit: "c:UsersuserAppDataLocalAutoIt v3SciTEAutoIt3WrapperAutoIt3Wrapper.ini" and add: Which will give you a new way to stop or restart running script. ps. for the last one you need the newest SciTe4Au3 Beta1 point -
1 point
-
Function exit from script with StdOut error
SorryButImaNewbie reacted to caramen for a topic
lol Re I am gonna help you too let me see... Let us know the console error msg Also for ppls like me it whould be apreciate to get english translation for your text.1 point -
Window with custom title bar
virhonestum reacted to JohnOne for a topic
Create an empty label where title bar would normally be, and add the parentdrag style to it.1 point -
1 point
-
Really Special Charactes in label (√/←/...)
virhonestum reacted to jchd for a topic
Switch the Scite source to UTF8 mode: File >> Encoding >> UTF8 + BOM (or UTF8). You need a recent Scite4AutoIt3 to get most benefits of accompanying tools.1 point -
#include <Array.au3> Global $aFolders = _FileListToArray($sPath, '*', 2, True) Global $sSuffix = '_renamed' For $i = 1 To Ubound($aFolders) - 1 DirMove($aFolders[$i], $aFolders[$i] & $sSuffix) Next TD1 point
-
GUICtrlListView_AddSubItem Bug? (error when looping)
MuffettsMan reacted to kylomas for a topic
MuffetsMan, You can do that or you do it this way... #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <array.au3> #include <sqlite.au3> _sqlite_startup() _Sqlite_open() _sqlite_exec(-1, 'create table t1 (t1name, t1rank, t1serial)') _sqlite_exec(-1, 'insert into t1 values ("Joe", "E1", 12345),("Al", "E2", 34567),("Sue", "E9", 98765);') local $arows,$irows, $icols _SQLite_GetTable2d(-1,'select * from t1;', $arows, $irows, $icols) local $gui010 = guicreate('SQLite ListView Population Example') local $aSize = wingetclientsize($gui010) local $lv010 = guictrlcreatelistview('Name|Rank|Serial #',0,0,$aSize[1],$aSize[0]) ; generic routine to populate a listview from an SQLite returned 2D array for $1 = 1 to ubound($arows) - 1 _GUICtrlListView_AddItem($lv010, $arows[$1][0]) for $2 = 1 to ubound($arows,2) - 1 _GUICtrlListView_AddsubItem($lv010,$1-1, $arows[$1][$2], $2) ; $1-1 is the index of the item, $2 is the index of the sub-item next next guisetstate() while 1 switch guigetmsg() case $gui_event_close Exit EndSwitch WEnd kylomas1 point -
_GUICtrlListView_GetItemText not working with variable
MuffettsMan reacted to BrewManNH for a topic
Actually if you change the line to this, it will work with the control ID or the variable. $rowID = _GUICtrlListView_GetItemText($hListView, Number($selectedRow)) The function requires a number, _GUICtrlListView_GetSelectedIndices returns a string containing a number. I'm not sure why the SendMsg function works with the string, but the GUICtrlSendMsg function won't. Maybe it has something to do with the DLLCall function that converts the string to a number.1 point -
ConsoleWrite(StringreplaceAll("deer", "e", "o") & @CRLF) Func StringreplaceAll($sString, $sProbe, $sPatch) Local $tProc = DllStructCreate("BYTE ASM[20]") ;~ AutoIt allocates memory with execute rights? ;~ I have NX bit enabled, I assumed issues if not explicitly giving execute rights $tProc.ASM = "0x" _ & "8B742404" _ ;~ mov esi, dword[esp+4] -> get start address (pointer) of the string & "AC" _ ;~ @@: lodsb -> load char from [esi] to al & increment esi by one & "3C00" _ ;~ cmp al, 0 -> is char = 0 & "740A" _ ;~ jz @f -> if yes then jump to return & "3C" & Hex(Asc($sProbe), 2) _ ;~ cmp al, NNh -> if not then compare with $sProbe & "75F7" _ ;~ jne @b -> if not equal then load next byte from string & "C646FF" & Hex(Asc($sPatch), 2) _ ;~ mov byte[esi-1], NNh -> if equal then replace with $sPatch & "EBF1" _ ;~ jmp @b -> load next byte from string & "C3" ;~ @@: ret -> return ;~ Technically shouldn't we preserve esi? Return DllCallAddress("NONE:cdecl", DllStructGetPtr($tProc), "STR", $sString)[1] EndFunc1 point
-
GUICtrlListView_AddSubItem Bug? (error when looping)
MuffettsMan reacted to JohnOne for a topic
Change... For $i = 1 To 50 To... For $i = 0 To 501 point -
Translate C# to Autoit
MuffettsMan reacted to guinness for a topic
It's polite to link or attribute to the person(s) who wrote that code. Otherwise we all think you know what you're doing. Edit: Oh and the whole "I have been trying for hours comment" doesn't work around here. Do us a favour and show us the fruits of your "hard" labour.1 point -
I like Melba23's way, anyway, since some other worse attempt has been posted, here is another even worst way ..... #include <array.au3> $sString = "Line 1" & @LF & "Line 2" & @LF & "Line 3" MsgBox(0, "nr. of @LF", UBound(_ArrayFindAll(StringSplit($sString, "", 2), Chr(10))))1 point
-
And another way. #include <MsgBoxConstants.au3> ; Based on http://www.autoitscript.com/forum/topic/6330-new-fast-line-counter/page__view__findpost__p__44449 ;For file ;$file = "Lines.txt" ;Local $N = FileGetSize($file) ;MsgBox($MB_SYSTEMMODAL, "Count", StringLen(StringAddCR(FileRead($file, $N))) - $N) ;For a string ;$sString = FileRead($file) $sString = "Line 1" & @CRLF & "Line 2" & @LF & "Line 3" MsgBox($MB_SYSTEMMODAL, "Count", StringLen(StringAddCR($sString)) - StringLen($sString))1 point
-
Disable buttons if checkbox not checked
MuffettsMan reacted to Melba23 for a topic
timdecker, I would do it like this: #include <file.au3> #include <GUIConstantsEx.au3> Global $a_csv[2] = [3, "Col 1,Col 2,Col 3"] ;$s_Path = FileOpenDialog("Select CVS File", @ScriptDir, "comma seperated values (*.csv)") ;If @error Then ; MsgBox(4096, "", "No File(s) chosen") ; Exit ;Else ;_FileReadToArray($s_Path, $a_csv) GUICreate("CSV Listview", 900, 450, -1, -1) $listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 600, 210) $checkboxName = StringSplit($a_csv[1], ",") $iCount = $checkboxName[0] Global $aCheck[$iCount + 1] Global $mapColumn[$iCount + 1] $nextSample = GUICtrlCreateButton("Map sample submition button ", 395, 320, 180, 30) $runProg = GUICtrlCreateButton("Run Program", 700, 400, 180, 30) $button_enabled = 1 For $j = 1 To $iCount ; Store controIDs of the checkboxes $aCheck[$j] = GUICtrlCreateCheckbox($checkboxName[$j], 10, 190 + (50 * $j), 100, 30) $mapColumn[$j] = GUICtrlCreateButton("Map " & '"' & $checkboxName[$j] & '"' & " to input box", 150, 190 + (50 * $j), 180, 30) GUICtrlSetState($aCheck[$j], $GUI_UNCHECKED) GUICtrlSetState($mapColumn[$j], $GUI_DISABLE) Next For $i = 2 To UBound($a_csv) - 1 $s_temp = StringReplace($a_csv[$i], ",", "|") GUICtrlCreateListViewItem($s_temp, $listview) Next ;EndIf GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case Else For $i = 1 To $iCount If $msg = $aCheck[$i] Then If GUICtrlRead($msg) = 1 Then GUICtrlSetState($mapColumn[$i], $GUI_ENABLE) Else GUICtrlSetState($mapColumn[$i], $GUI_DISABLE) EndIf ExitLoop EndIf Next EndSwitch WEnd Exit Please ask if you have any questions. M231 point