Sign in to follow this  
Followers 0
jaberwacky

Will you beta test my current script, please?

48 posts in this topic

#21 ·  Posted

Here you go


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites



#22 ·  Posted (edited)

I appreciate that you've taken the time to help me bug test. :) The latest version should correct the incorrect console background color. And I'll be looking into the Tools error now.

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

#23 ·  Posted

Nice little program, but I have noticed a few english errors (Such as a button spelt hilite rather than highlight in the general tab). Also, I have found that it doesnt actually work for me :)

Before you get worried, the reason is that the scite I tested it on was running off my thumbdrive - there is no autoit installation on the computer I am currently using. Therefore, I think that it might be a good idea to have an option for the user to change the directory that it checks for the scite settings in if they are not found by the program, and also have an optional override if they want to use it on a computer (such as my own one, not the one I am using now) where there is a local installation and one on another drive.

Well, thats about it for my criticism for now. Other than that, it is quite well laid out - not horribly cluttered or anything like that. If this were to become a finished project, I would definately use it.

Hope this has helped, and given you a good idea for the program.

Mike, there is an executable on the SciTE download page with this description, "A single file executable called Sc1 (640K) does not need any DLL or properties files as these are linked into the executable. You may still create properties files if you wish. Sc1.exe has been compressed with the UPX compressor so that it is a fast download. It does not need to be decompressed to be used." Is that the one that you're using?

Share this post


Link to post
Share on other sites

#24 ·  Posted

If we're talking anal here ...

In relation to the "User Include Folders" setting, adding some additional support for handling the possible multiple paths here might be a idea.

I think I have what you wanted. Just click 'Select'. Select one directory. Rinse and repeat until you've selected all of your directories.

Share this post


Link to post
Share on other sites

#25 ·  Posted

Yep, that will do it. :)


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

#26 ·  Posted (edited)

Mike, there is an executable on the SciTE download page with this description, "A single file executable called Sc1 (640K) does not need any DLL or properties files as these are linked into the executable. You may still create properties files if you wish. Sc1.exe has been compressed with the UPX compressor so that it is a fast download. It does not need to be decompressed to be used." Is that the one that you're using?

I dont know, I got it off my brother and he doesnt remember :)

But if you like, I can rar it for you and send it off to you if you like. It is the full AutoIT installation though so I will just send you Scite and you should have the rest.

Edited by Mikeman27294

Share this post


Link to post
Share on other sites

#28 ·  Posted

Not on this computer. I have the full installation on a thumb drive.

Share this post


Link to post
Share on other sites

#30 ·  Posted (edited)

Sorry, I havent checked back here in a while. I'll just send Scite and a little readme saying how to set it all up then.

Scratch that, I'll just send the entire installation with maximum file compression in a rar file. I hope you have winrar.

Edited by Mikeman27294

Share this post


Link to post
Share on other sites

#32 ·  Posted

Loads of settings, wow!! ;) One thing , I am not a fan of guis with scrollbars on them. I minimized the window & when I restored it, the scrollbar was off :D (probably not your problem) :) I would put some of the settings -- font, fold margin, caret -- on a page called "Appearence" or something like that. Also, it is really slow when changing tabs. Love the customizability it would (does?) give. :)

Share this post


Link to post
Share on other sites

#33 ·  Posted (edited)

I have brought out the Explorer, Directory, and General Settings into another tab. I also added the Debug Trace settings too. So it's a lot less cluttered. Scroll bars are kinda needed because I want to keep the height of the window at 600. This keeps it from being too large for those who have notebooks. I noticed the minimize and refreshing problem and was thinking on it when I saw your post. =D Thanks for your reply.

When you say slow changing tabs, how slow?

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

#34 ·  Posted (edited)

Takes ~1.5s to change between General/Theme/Tidy settings tabs. I figure it's probably because of all the controls on each tab & so splitting out some controls onto different tabs would make a difference.

Edit: It's also the same way for the default SciTe customizer - switching to/from the Theme tab takes a bit.

Edited by ChrisN

Share this post


Link to post
Share on other sites

#37 ·  Posted

OK, latest update sees some fairly dramatic GUI restructuring. Also, this should play nice with portable versions of AutoIt and Scite4AutoIt3. Please bug report if it does not play nice. Don't put this in the top level directory of your thumb drive though. See original post for download.

Share this post


Link to post
Share on other sites

#39 ·  Posted

Just in case (seems somewhat similar to other reported case).

GUI Minimize and Restore issue. (Running:(3.3.7.23), Win-XP)

If you scroll down, than, after a Minimize+Restore, the whole section is displayed in the wrong position. (Tabs placed at top of visible window again, instead of the top of the scrollable area. (easy to work around / beta.)

Screeny (temp)


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • FMS
      Saving GUI info external
      By FMS
      Dear reader,
       
      At the moment I'm trying to make a script that is changeble by the users.
      It is a script that type's words for you whish u can change what it should be.
      I was thinking that the users may change the button settings in the second tab whit a pull down menu.
       
      At this point the text that must be typed in are hard coded in the program.
      I know that I must "save" the text in a diffrent file but i don't now how.
      Also mine search on the net or forum wasn't fruitfull.(maybe i was looking wrong;))

      Could somebody push me in the right direction?
      (I'm still al little bit new at this so any help or info is appreciated)
       
      thanks in advanced.
       
      #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 318, 228, 192, 124) $Tab1 = GUICtrlCreateTab(8, 32, 289, 177) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $Btn001 = GUICtrlCreateButton("Button1", 25, 68, 75, 25) $Btn002 = GUICtrlCreateButton("Button2", 110, 68, 75, 25) $Btn003 = GUICtrlCreateButton("Button3", 196, 68, 75, 25) $Btn004 = GUICtrlCreateButton("Button4", 25, 100, 75, 25) $Btn005 = GUICtrlCreateButton("Button5", 110, 100, 75, 25) $Btn006 = GUICtrlCreateButton("Button6", 196, 100, 75, 25) $Btn007 = GUICtrlCreateButton("Button7", 25, 132, 75, 25) $Btn008 = GUICtrlCreateButton("Button8", 110, 132, 75, 25) $Btn009 = GUICtrlCreateButton("Button9", 196, 132, 75, 25) $Btn010 = GUICtrlCreateButton("Button10", 25, 164, 75, 25) $Btn011 = GUICtrlCreateButton("Button11", 110, 164, 75, 25) $Btn012 = GUICtrlCreateButton("Button12", 196, 164, 75, 25) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $Combo1 = GUICtrlCreateCombo("", 144, 72, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, " 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12") $Btn013 = GUICtrlCreateButton("Button13", 40, 168, 75, 25) $Btn014 = GUICtrlCreateButton("Button14", 152, 168, 75, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Btn001 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 1 is pushed") Case $Btn002 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 2 is pushed") Case $Btn003 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 3 is pushed") Case $Btn004 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 4 is pushed") Case $Btn005 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 5 is pushed") Case $Btn006 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 6 is pushed") Case $Btn007 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 7 is pushed") Case $Btn008 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 8 is pushed") Case $Btn009 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 9 is pushed") Case $Btn010 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 10 is pushed") Case $Btn011 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 11 is pushed") Case $Btn012 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 12 is pushed") Case $Btn013 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 13 is pushed") Case $Btn014 send("{ALTDOWN}{TAB}{ALTUP}") Sleep(1000) Send ("Button 14 is pushed") EndSwitch WEnd  
    • BetaLeaf
      [Solved]Gui triggering wrong case events
      By BetaLeaf
      I am puzzled. When I check the radio for "Force Disk Mode", I see "Ram Mode" in ConsoleLog when it should be saying "Disk Mode"(from the consolewrite command). Also, clicking the ok button does not work either. Why is it not working?
       
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $SelectMode = GUICreate("Select Mode", 111, 72, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $DS_SETFOREGROUND)) $DiskMode = GUICtrlCreateRadio("Force Disk Mode", 8, 8, 113, 17) $RamMode = GUICtrlCreateCheckbox("Force Ram Mode", 8, 24, 113, 17) $OkButton = GUICtrlCreateRadio("Ok", 8, 40, 97, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case GUICtrlRead($DiskMode) = $GUI_CHECKED $Mode = 1 ConsoleWrite("Disk Mode" & @CRLF) Case GUICtrlRead($RamMode) = $GUI_CHECKED $Mode = 0 ConsoleWrite("Ram Mode" & @CRLF) Case $OkButton ConsoleWrite("Ok Clicked" & @CRLF) GUISetState(@SW_HIDE) ExitLoop EndSwitch WEnd  
    • TheDcoder
      Help with resizing controls in a resizable window!
      By TheDcoder
      Hello! I am trying make my GUI Controls resize correctly... Here is my GUI's code:
      #include <ButtonConstants.au3> #include <ColorConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> Global $g_hMainGUI = GUICreate("Test GUI", 500, 316, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) GUISetBkColor($COLOR_WHITE, $g_hMainGUI) GUICtrlCreateGroup("Box 1", 6, 2, 488, 197) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) GUICtrlCreateLabel("Label", 9, 20, 67, 15) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUICtrlCreateCombo("", 77, 14, 334, 21, $CBS_DROPDOWNLIST) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUICtrlCreateButton("Button 0", 415, 13, 74, 23) GUICtrlSetResizing(-1, BitOR($GUI_DOCKAUTO, $GUI_DOCKVCENTER, $GUI_DOCKHEIGHT)) GUICtrlCreatelistView("Col 1|Col 2|Col 3", 12, 42, 476, 149, $LVS_SINGLESEL, BitOR($LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE)) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) GUICtrlCreateGroup("Box 2", 6, 199, 253, 112) ;GUICtrlSetResizing(-1, $GUI_DOCKHEIGHT) GUICtrlCreateButton("Button 1", 11, 214, 121, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 2", 11, 245, 121, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 3", 133, 245, 121, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 4", 133, 214, 121, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 5", 11, 276, 121, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 6", 133, 276, 121, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateGroup("Box 3", 264, 199, 230, 112) ;GUICtrlSetResizing(-1, $GUI_DOCKHEIGHT) GUICtrlCreateButton("Button 7", 269, 214, 220, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 8", 269, 245, 220, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUICtrlCreateButton("Button 9", 269, 276, 220, 30) GUICtrlSetResizing(-1, $GUI_DOCKAUTO + $GUI_DOCKSTATEBAR) GUISetState() Local $nMsg = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($g_hMainGUI) Here is what I need: 

      1. Prevent button 0, Label & Combo from moving down
      2. Prevent expansion of Box 1 & 2
       
      I tried a lot but I can't get the desired result, now my brain hurts!
      Thanks in Advance, TD!
    • tarretarretarre
      miniSQL - A simple Standalone PDO-syntax-like MySQL-library with AutoitObject
      By tarretarretarre
      Now its my turn to give back to the community ( Better late than never :P)..
       
      First i want to thank progAndy for his amazing UDF which this idea came from

       
      And the AutoitObject Team (For making autoit fun again)
       

      I dont have so much to say more thant to let the project speak for itself, ive had this for a couple of months but it was "integrated" into my own "framework" but today I decided to release it because i have seen some people on the forum search for something like this.
      What libraries does this use and are they included?
      Connector/C 6.1.6 ( https://dev.mysql.com/downloads/connector/c/ ) And yes, they are included in the download so nothing has to be installed or anything

      What are the features:
      Prepared statements 32 and 64 bit environment Multiline prepared statements  Simplicity User-friendly PDO-like Syntax & Methods (http://php.net/pdo)  
      So whats the difference between this and x's Mysql UDF?
      When you are fetching your data from your database, you use your table-names to display them, like this:
      with $MySql Local $Vars = ["?", $lastname, "?", $age] .prepare("SELECT id, surname, lastname FROM users WHERE lastname = ? AND AGE > ?") .execute($Vars) Consolewrite(stringformat("Searchresult: %d Hits", .rowCount()) for $row in $oRows consolewrite("Surname: " & $row.surname & @crlf) consolewrite("Lastname: " & $row.lastname & @crlf) next endwith  
      Function-list (Yeah i might improve this when i have time)
      ; Every parameter is a default value of method _miniSQL_setDllDir(@ScriptDir); returns nothing Local Const $MySql = _miniSQL_LoadLibrary(); Returns object with methods ; Starts the library, connects to the database and returns the object $MySql.Startup($sHost, $sUser, $sPass = "", $sDatabase = "", $iPort = 0, $sUnix_socket = "", $iClient_Flag = 0); Returns TRUE if connection was succeded otherwise FALSE ; Shuts down the library and prevents any methods to be executed $MySql.Shutdown() ; The desired SQL query goes here (SELECT x FROM table) $MySql.prepare($sQuery); Returns nothing ; Used for multi-line prepared statements (See Example3 - newline prepared statements) $MySql.PrepareGlue($sQuery); Returns nothing ; Cleans any previous prepared statement of any kind $MySql.PrepareClean(); Returns nothing ; Executes a prepared statement of any kind, with or without passed arguments $MySql.execute($aVars = Null, $iExecuteStyle = $_miniSQL_ExecuteStoreResult); returns TRUE if success, otherwise FALSE ; Options for $iExecuteStyle: $_miniSQL_ExecuteStoreResult = 0 and $_miniSQL_ExecuteOnly = 1 ; Fetches previous executed prepared statement (If anything was stored "see Options for iExecuteStyle") $MySql.fetchAll($iFetchStyle = $_miniSQL_FetchObject); Returns (Depends on $iFetchStyle) ; Options for $iFetchStyle: $_miniSQL_FetchObject = 0 (Default), $_miniSQL_FetchSingleObject = 1, $_miniSQL_FetchArray = 2, $_miniSQL_FetchSingleValue = 3 ; Gives you the "lastinsertId" (The last id that was affected) $MySql.lastInsertId(); Returns the last affected id ; Counts the affected rows done by any MySQL operation (INSERT\SELECT\UPDATE\DELETE) $MySql.rowCount(); Returns how affected rows ; Use this if want to know why nothing is working (Can be used anywhere after $MySql.Startup()) $MySql.debug(); Returns nothing ; Retrives the last MysqlError set $MySql.SQLerror(); Returns error (If any) Here is some example code:
      #include <miniSQL\miniSQL.au3> ; Set default dir for our dlls (Only has to be done once) _miniSQL_setDllDir(@ScriptDir & "\miniSQL") ; Declared as CONST since we never want to accidentally change the variables original value Local Const $MySql = _miniSQL_LoadLibrary() ;Connect to database & Init library If Not $MySql.Startup("localhost", "user", "pass", "db", 3306) Then MsgBox(0, "Failed to start library", $MySql.debug()) Exit EndIf With $MySql .prepare("SELECT * FROM members") If Not .execute() Then MsgBox(0, "Failed to execute query", .sqlError()) Local $oRows = .fetchAll() ; Print how many rows got affected by latest query ConsoleWrite(StringFormat("Number of rows to display: %s", .rowCount()) & @CRLF) ; we use isObj to check if we got any result. If IsObj($oRows) Then For $row In $oRows ConsoleWrite(StringFormat("Id: %s", $row.id) & @CRLF) ConsoleWrite(StringFormat("Name: %s", $row.name) & @CRLF) ConsoleWrite(StringFormat("Bio: %s", $row.bio) & @CRLF) Next Else ConsoleWrite("No rows to show"&@CRLF) EndIf EndWith ; Use this in your app when you are done using the database $MySql.Shutdown() #include <miniSQL\miniSQL.au3> ; Set default dir for our dlls (Only has to be done once) _miniSQL_setDllDir(@ScriptDir & "\miniSQL") ; Declared as CONST since we never want to accidentally change the variables original value Local Const $MySql = _miniSQL_LoadLibrary() ;Connect to database & Init library If Not $MySql.Startup("localhost", "user", "pass", "db", 3306) Then MsgBox(0, "Failed to start library", $MySql.debug()) Exit EndIf With $MySql ; We use an array to make our query look nicer Local $vars = [":name", @UserName&Random(1,10,1)] ; Prepare our statement .prepare("UPDATE members SET name = :name WHERE 1") If Not .execute($vars) Then MsgBox(0, "Failed to execute query", .sqlError()) ; Print how many rows got affected by latest query ConsoleWrite(StringFormat("Example 1 rows affected: %s", .rowCount()) & @CRLF) EndWith ; We can also prepare like this With $MySql Local $vars = ["?", @UserName, "?", 1] ; Prepare our statement .prepare("UPDATE members SET name = ? WHERE id = ?") If Not .execute($vars) Then MsgBox(0, "Failed to execute query", .sqlError()) ; Print how many rows got affected by latest query ConsoleWrite(StringFormat("Example 2 rows affected: %s", .rowCount()) & @CRLF) EndWith ; Use this in your app when you are done using the database $MySql.Shutdown()  
      With $MySql ; We use an array to make our query look nicer Local $vars = ["?", 1] ;Line by line prepared statement .prepareClean(); .prepareGlue("SELECT *") .prepareGlue("FROM members") .prepareGlue("WHERE id = ?") If Not .execute($vars) Then MsgBox(0, "Failed to execute query", .sqlError()) ; Print how many rows got affected by latest query ConsoleWrite(StringFormat("Example 1 rows affected: %s", .rowCount()) & @CRLF) EndWith ; Use this in your app when you are done using the database $MySql.Shutdown() Some code from one of my applications at work using this UDF
      With $MySql .prepareClean() .prepareGlue("SELECT") .prepareGlue("cases.cases_dedu_casenumber,") .prepareGlue("cases.cases_created_by_ugid,") .prepareGlue("cases.cases_dedu_ftg,") .prepareGlue("cases.cases_date_created,") .prepareGlue("cases.cases_date_finished,") .prepareGlue("cases.cases_protocol_director,") .prepareGlue("cases.cases_finished_by_ugid,") .prepareGlue("IFNULL(uid1.names_name, 'none') as createdByFullname,") .prepareGlue("IFNULL(uid2.names_name, 'none') as finishedByFullname") .prepareGlue("FROM cases") .prepareGlue("LEFT JOIN names AS uid1") .prepareGlue("ON cases.cases_created_by_ugid = uid1.names_uid") .prepareGlue("LEFT JOIN names AS uid2") .prepareGlue("ON cases.cases_finished_by_ugid = uid2.names_uid") if $_App_Case_SearchFor Then .prepareGlue(StringFormat("WHERE cases_dedu_casenumber LIKE '%s'",$_App_Case_SearchFor)) .prepareGlue("ORDER BY cases.cases_date_created DESC") .prepareGlue("LIMIT 0, 30") if not .execute() then return __ThrowException(.sqlError()) Local $oRows = .fetchAll() EndWith  
       
      Git: https://gitlab.com/xdtarrexd/MiniSQL.git
      Download: Zip generated from Github
       
      Feel free to open your mind about this
    • gil900
      GUIImageButton* - Create GDIP button with image and with frame
      By gil900
      Hello,
      I worte this:

      $hGUI = GUICreate('', 326, 260, 312, 159) WinSetOnTop($hGUI,'',1) GUISetBkColor(0xF5FF82) GUISetState(@SW_SHOW) _GDIPlus_Startup() $hGUI_hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) $Button1Image = @ScriptDir&'\button.png' ; $Button1Image = 'img_button' ; <- Activate this line if you want the image to be loaded from resources $Button2Image = @ScriptDir&'\button2.png' ; $Button2Image = 'img_button2' ; <- Activate this line if you want the image to be loaded from resources $Button = GUIImageButton_Create($hGUI_hGraphics,$Button1Image,95, 72) Sleep(1000) ; Set frame for the button GUIImageButton_SetSquareFrame($hGUI,$hGUI_hGraphics,$Button,10,0xFF00A300) Sleep(1000) ; Set the image button2.png for the button GUIImageButton_SetNewImage($hGUI_hGraphics,$Button,$Button2Image) Sleep(1000) ; Set the image button1.png for the button GUIImageButton_SetNewImage($hGUI_hGraphics,$Button,$Button1Image) Sleep(1000) ; Set new frame instead of the previous GUIImageButton_SetSquareFrame($hGUI,$hGUI_hGraphics,$Button,5,0xFFFF0505) Sleep(1000) ; Remove the frame from the button GUIImageButton_RemoveSquareFrame($hGUI,$Button) Sleep(1000) ; Set frame again GUIImageButton_SetSquareFrame($hGUI,$hGUI_hGraphics,$Button,1) Sleep(1000) ; Remove only the image from the button GUIImageButton_CleanGraphics($hGUI,$Button,0) ; If the 3 parameter is 1 then it will clean also the frame. *It will not remove the button! only clean the visual output Sleep(1000) ; Set the image button2.png for the button GUIImageButton_SetNewImage($hGUI_hGraphics,$Button,$Button2Image) ; This will remove the button. you can call it without calling GUIImageButton_CleanGraphics before ;~ GUIImageButton_Delete($hGUI,$Button1) ;~ Do ;~ Until GUIGetMsg() = $GUI_EVENT_CLOSE ; To use the button just: ; This will not work if you activated line 80 and will not work during the sleeps... ConsoleWrite('listening to $Button:' & @CRLF) While Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button[0] ; <- *[0] ConsoleWrite('$Button1 Clicked' & @CRLF) EndSwitch WEnd ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUIImageButton_Create ; Description ...: Create button with image ; Syntax ........: GUIImageButton_Create($hGUI_hGraphics, $Image, $x_pos, $y_pos[, $x_size = Default[, $y_size = Default]]) ; Parameters ....: $hGUI_hGraphics - value of _GDIPlus_GraphicsCreateFromHWND($hGUI) ; $Image - Can be path the the image file or resource name ; $x_pos - the x pos of the image in the GUI. ; $y_pos - the y pos of the image in the GUI. ; $x_size - [optional] the x size of the image ; $y_size - [optional] the y size of the image ; ** x size and y size must be the same as the real xy size of the image file! ; Return values .: Button handle (Array): ; [0] is the ctrl id and this is the only important thing. [1] & [2] are for internal use only ; Author ........: gil900 ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUIImageButton_SetSquareFrame ; Description ...: Create frame around the button ; Syntax ........: GUIImageButton_SetSquareFrame($hGUI, $hGUI_hGraphics, Byref $aButton[,$iLineWidth = 1 [, ; $LineColor_rgba = 0xFF000000]]) ; Parameters ....: $hGUI - A handle for the GUI ; $hGUI_hGraphics - value of _GDIPlus_GraphicsCreateFromHWND($hGUI). ; $aButton - value of GUIImageButton_Create ; $iLineWidth - [optional] The width in pixels of the frame. Default is 1. ; $LineColor_rgba - [optional] the color value - [0xFF & RGB code]. ; Default is 0xFF000000. ; Return values .: None ; Author ........: gil900 ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUIImageButton_SetNewImage ; Description ...: Set new image over the previous one. ** The new image must be the same size! ; Syntax ........: GUIImageButton_SetNewImage($hGUI_hGraphics, $aButton, $Image) ; Parameters ....: $hGUI_hGraphics - value of _GDIPlus_GraphicsCreateFromHWND($hGUI). ; $aButton - value of GUIImageButton_Create ; $Image - Can be path the the image file or resource name ; Return values .: None ; Author ........: gil900 ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUIImageButton_RemoveSquareFrame ; Description ...: Remove only the frame around the image(if exists) ; Syntax ........: GUIImageButton_RemoveSquareFrame($hGUI, Byref $aButton) ; Parameters ....: $hGUI - A handle for the GUI ; $aButton - value of GUIImageButton_Create ; Return values .: None ; Author ........: gil900 ; Example .......: No ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUIImageButton_Delete ; Description ...: Remove the button ; Syntax ........: GUIImageButton_Delete($hGUI, Byref $aButton) ; Parameters ....: $hGUI - A handle for the GUI ; $aButton - value of GUIImageButton_Create ; Return values .: None ; Author ........: gil900 ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: GUIImageButton_CleanGraphics ; Description ...: Clean ONLY the graphics of the button. Can clean only the image without the frame or the image+frame((if exists)) ; * It will not delete the button. ; Syntax ........: GUIImageButton_CleanGraphics($hGUI, Byref $aButton[, $CleanFrame = 1]) ; Parameters ....: $hGUI - A handle for the GUI ; $aButton - value of GUIImageButton_Create ; $CleanFrame - [optional] 1 = clean image+frame(if exists) ; 2 = clean image only ; . Default is 1. ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; ===============================================================================================================================  
      Download full code with the images:
      GUIImageButton - r2.rar
      GUIImageButton.rar
      Tested on Autoit 3.3.14.2
      If the title is not good enough then you can edit it and and write better one.
       
      Hope you found it useful. If so then please leave a comment. It took a long time to share this piece of code with the documentation