martin Posted May 2, 2009 Share Posted May 2, 2009 (edited) I wondered how to make a string grid and played around with some ideas. Since I don't actually need one it's ground to a halt Maybe some of the ideas will be useful to someone.I got most things I was thinking of at least to the stage where I think I could make them work, but there are lots of things missing or incomplete.I know that you can use the Excel UDF's or OpenOffice Calc UDFs but that wasn't the point and an AUtoIt string grid seemed like a good idea to me for a while .source = stringGrid01.zipEdit made a couple of changes based on Yashied's post #4 mgrefStringGrid Edited May 17, 2009 by martin boomingranny, robertocm, mLipok and 1 other 4 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Michel Claveau Posted May 2, 2009 Share Posted May 2, 2009 Hi! It is cool & mega-Fun. But GuiCtrlSetOnHover_UDF.au3 is missing. But, OK, I found it in another message. Link to comment Share on other sites More sharing options...
martin Posted May 2, 2009 Author Share Posted May 2, 2009 Hi!It is cool & mega-Fun.But GuiCtrlSetOnHover_UDF.au3 is missing.But, OK, I found it in another message.I haven't used the hover udf, but obviously either I did or I intended to, so you can just comment out or delete the line#include "GuiCtrlSetOnHover_UDF.au3". Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Yashied Posted May 3, 2009 Share Posted May 3, 2009 Well done, but when you click the mouse at the border of the grid cell is not activated. And still working slowly, and ..., but this great work. 5+ My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
martin Posted May 3, 2009 Author Share Posted May 3, 2009 Well done, but when you click the mouse at the border of the grid cell is not activated. And still working slowly, and ..., but this great work. 5+I think there are some things that could be done to improve the speed and maybe drawing the whole grid rather than building it like a brick wall would be better and faster.I played with it again and made a change which makes redrawing the cells 3 times faster, and made it so that you can select at the border of a cell.I updated the attached zip in the first post. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Dampe Posted May 4, 2009 Share Posted May 4, 2009 Wow impressive design. It chews a little bit of CPU when changing column size though Link to comment Share on other sites More sharing options...
GioVit Posted September 9, 2009 Share Posted September 9, 2009 Hi, martin very nice code, congratulation do you have plan to modify this UDF in order to edit array in a GUI, like GUICtrlCreateArray? Link to comment Share on other sites More sharing options...
martin Posted September 9, 2009 Author Share Posted September 9, 2009 Hi, martinvery nice code, congratulationdo you have plan to modify this UDF in order to edit array in a GUI, like GUICtrlCreateArray?No plans at all.If there is something you would like to do with it then I might be able to help. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
GioVit Posted September 13, 2009 Share Posted September 13, 2009 No plans at all.If there is something you would like to do with it then I might be able to help.Sorry for late answerI would Like a function to edit array that can be integrated in a GUI window with other controls, don't need interactive width or height resize, nor formula calculation or range selection, but do need scrolling bar, Columns alignment definition and optional title on top and left that can be copied from top row and left Column from the same Array.I think it would be great UDF for those who need edit a database or large amount of data from an array, like me.Thanks in advance Link to comment Share on other sites More sharing options...
Medic873 Posted June 25, 2012 Share Posted June 25, 2012 Can I ask if there is a way to define a cell so say Case $Buttonstart $Cell1ColumA = SetText ("eoihf"); Just wodering ive been trying to pick through it looking for a way but havnt found anything really Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 26, 2012 Share Posted June 26, 2012 (edited) Would be useful as UDF... Edited June 26, 2012 by MrCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
martin Posted June 29, 2012 Author Share Posted June 29, 2012 (edited) Can I ask if there is a way to define a cell so say Case $Buttonstart $Cell1ColumA = SetText ("eoihf"); Just wodering ive been trying to pick through it looking for a way but havnt found anything really You could have a function something like this Func SetCellText($iCol, $iRow,$sText);where $iCol is from 1 to column number of columns, $iRow is from 1 to number of rows Local $iCell if $iCol < 0 or $iCol > $ColCount then return -1 if $iRow < 0 or $iRow > $RowCount then return -2 $iCell = $lab[($ColCount ) * ($irow - 1) + $icol] GuiCtrlSetData($iCell, $sText) endfunc There is a $Cells array which holds 8 items of information for each cell including the text. The actual displayed cell is just a label in an array of labels ($lab). The $Cells index is $Row * $ColCount + $Col ;where $Row and $Col start at 0. I'm not sure the $Cells array was used much if at all in the example I gave. EDIT: The line style around a cell is stored there, but there is something needed because if you change the border of a cell (right click context menu) the border isn't shown untill the window is redrawn. @MrCreator- I thought it might make a useful UDF when I started experimenting with it but there was very little interest and it needs a lot of work to make a useful udf. I did use a simplified version of it in one project but I don't have the spare time to play with it now. Edited June 30, 2012 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
czardas Posted June 30, 2012 Share Posted June 30, 2012 (edited) I liked it. I only took a quick glance at the code. Some things seemed to be slightly suggish but I will have to check it again. I can imagine it being a fair bit of work to create a UDF using this. Still it's an excellent example. Thank you! Edited June 30, 2012 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
martin Posted June 30, 2012 Author Share Posted June 30, 2012 I liked it. I only took a quick glance at the code. Some things seemed to be slightly suggish but I will have to check it again. I can imagine it being a fair bit of work to create a UDF using this. Still it's an excellent example. Thank you!I'm glad you liked it. Yes, it is very sluggish, especially the first time the cells are drawn or when a column width or row height is changed. If you reduce the number of columns it helps and I think that in the project where I used the basic idea I only had 10 columns and only drew the cells which could be seen rather than all of them as I think the example does. My conclusion was that AutoIt is not the best language to use for this. It's probably more sensible to use an Excel udf or Open Office. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
ProgAndy Posted June 30, 2012 Share Posted June 30, 2012 (edited) I'm glad you liked it. Yes, it is very sluggish, especially the first time the cells are drawn or when a column width or row height is changed. If you reduce the number of columns it helps and I think that in the project where I used the basic idea I only had 10 columns and only drew the cells which could be seen rather than all of them as I think the example does. My conclusion was that AutoIt is not the best language to use for this. It's probably more sensible to use an Excel udf or Open Office.If you need a responsive grid or spreadsheet control, try to use a custom control implemented in a DLL like RAGrid or SpreadSheet. AutoIt is just too slow to draw a complete GUI effortlessly without external help. Edited June 30, 2012 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
NassauSky Posted March 27, 2015 Share Posted March 27, 2015 I know this is an old topic but I had a need for something like this. I tried running it in Autoit v3 and it gives me a couple errors. It first declared some constants that seemed to have been already declared in the newer version so I just remarked out those lines: ;Global Const $WM_ENTERSIZEMOVE = 0x231, $WM_EXITSIZEMOVE = 0x232 ;Global Const $WS_EX_COMPOSITED = 0x2000000;to stop flashing graphics. Not essential and might increase CPU load so add/remove on resizing? but the problem really is the variable $aSB_WindowInfo. It is refered to around line 1083 and it says it's undeclared: For $x = 0 To UBound($aSB_WindowInfo) - 1 Any ideas? Link to comment Share on other sites More sharing options...
argumentum Posted March 28, 2015 Share Posted March 28, 2015 I know this is an old topic but I had a need for something like this. I tried running it in Autoit v3 and it gives me a couple errors. It first declared some constants that seemed to have been already declared in the newer version so I just remarked out those lines: ;Global Const $WM_ENTERSIZEMOVE = 0x231, $WM_EXITSIZEMOVE = 0x232 ;Global Const $WS_EX_COMPOSITED = 0x2000000;to stop flashing graphics. Not essential and might increase CPU load so add/remove on resizing? but the problem really is the variable $aSB_WindowInfo. It is refered to around line 1083 and it says it's undeclared: For $x = 0 To UBound($aSB_WindowInfo) - 1 Any ideas? yes, comment out the for loop and the "If $index = -1 Then Return 0", that should do it. After all it was an idea and it was in 2009 and was not continued but you can continue it =) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now