Sign in to follow this  
Followers 0
jaberwacky

Will you beta test my current script, please?

48 posts in this topic

#1 ·  Posted (edited)

I am restructuring Jos' SciTEConfig to allow more control over SciTE.

I would greatly appreciate if you would run it on your machine and tell me if it presents an accurate picture of your current SciTE configuration, please.

This is not intended to replace the current SciTEConfig. This is just an alternative for those of us that want more control.

This script will now perform the following duties:

1. Load a new theme.

2. Change the default action of scripts, I.E., change from edit to run.

3. Enable and disable tools from the Tools menu.

4. Change the loaded definitions from production to beta.

5. Enable and disable the context menu entries.

6. A live preview for on the fly tweaking!

Note: For most of these items, the script must be compiled.

Note: If you decide to change any of the 'Context Menu' items then be sure to back up your current registry!!!!!!!!!!!!!!!!!!!!

Note: Back up your au3.properties too.

Note: Works best with the latest AutoIt3 beta version (3.3.9). Also, works best with Jos' latest SciTE4AutoIt3 betas.

Enjoy!

SciTE Customizer previous: 15|5|4|0|21|0|10|5|9|11|6

Edited by LaCastiglione

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thank you for the kind words. Seeing as to how Australia is the opposite side of Earth and another hemisphere, things there are the opposite of what they are here. My winters are your summers and my nights are your days. Right? I hope that my constructive criticism isn't your sarcasm. =P Kidding.

I corrected the spelling mistakes and am now thinking of how to best implement your suggestions. Thanks!

SciTE was running at the time right? This is strange because SciTE has an interface for getting user settings. No need to know where the SciTE directory is located.

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

The original SciTeconfig would write the configuration for some of the settings in properties files that are normally in the User's profile folder and not in the Scite folder. It would ignore the SciTE folder and put them there even if you don't have AutoIt3 and Scite installed on the computer. If yours can overcome that defect I would definitely be interested in taking a look at it.


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

#5 ·  Posted (edited)

The original SciTeconfig would write the configuration for some of the settings in properties files that are normally in the User's profile folder and not in the Scite folder. It would ignore the SciTE folder and put them there even if you don't have AutoIt3 and Scite installed on the computer. If yours can overcome that defect I would definitely be interested in taking a look at it.

Have you run the script on your machine? If so, did it get your configuration or did it even work at all?

If SciTE and AutoIt are not installed then SciTEConfig wouldn't be on your computer.

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

If where talking anal here ...

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


"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

#8 ·  Posted (edited)

If where talking anal here ...

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

I'm not sure what you mean. Doesn't AutoIt only use one folder as the include folder?

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

So, I'm assuming that you ran the script and that it presented your current SciTE and Tidy configurations accurately?

Well, Yes. Although I did not pay to much attention if settings where actually correct compared to what I use. (Will do that later ... )

I'm not sure what you mean. Doesn't AutoIt only use one folder as the include folder?

Nope, you can use more locations/folders if you like in the 'User' Include setting. (semicolon delimited path setting) ... "X:/Path1;Y:/Path2"

- Useful for keeping different types of 'User' includes files separated. (Debug, Personal function, Others, etc)

Edited by MvGulik

"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

#10 ·  Posted (edited)

Could not find any settings problem. Except maybe the Tidy:'Tail comments'. All four check-marks are on. (I'm not using any of the related settings in Tidy.ini. ... Except for "endfunc_comment=0", but that one seems to be a old/depreciated option name.)

---

Personal code comment:

When using a lot of switch cases I generally use a initial "Nothing to do" case. (Just a personal habit to eliminate a full scan in case its not really needed.)

$message = GUIGetMsg()
Switch $message ; main edit messages
Case 0 ;; nothing to do.
Case $bgcolor_btn
...
Edited by MvGulik

"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

#11 ·  Posted (edited)

If were 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.

Please try the latest version to see if this is what you wanted. I did the Case 0 thing. I can't believe that I never thought to do that!

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

#12 ·  Posted

Observed change: Additional folder selection for the "Standard library" setting.

No no. :) Although being able to change the "Standard library" setting was missing. That was not what I had in mind.

The general problem I have in mind is that here, and in SciteConfig. When you use the [select] on the "User-defined libraries" setting. It allows you only to changed the whole string with a new, but single, path.

So in the case of a user that has a "User-defined libraries" setting with multiple paths (aka: Me). The [select] feature is of no real use.

... But considering the potential work needed versus the minor benefits. I would first take a good look at it ... (+Source code is available, so If I really feel like I need something like that, I could/should try it myself of course.)

Tidy:'Tail comments': Seems ok now, But can't say much more as Tidy itself is giving me unexpected results after trying to ditch the "endfunc_comment=N" option. ... and dinner is calling.


"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

#13 ·  Posted

Thank you for the kind words. Seeing as to how Australia is the opposite side of Earth and another hemisphere, things there are the opposite of what they are here. My winters are your summers and my nights are your days. Right? I hope that my constructive criticism isn't your sarcasm. =P Kidding.

I corrected the spelling mistakes and am now thinking of how to best implement your suggestions. Thanks!

SciTE was running at the time right? This is strange because SciTE has an interface for getting user settings. No need to know where the SciTE directory is located.

Yeah I had it running. But because I use it on numerous computers (and I am a huge fan of portable applications), I had it running off my thumbdrive. Well, I will be looking forward to see whether you will implement that idea of mine, and if so, I will be :) <As happy as that guy there haha.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Yeah I had it running. But because I use it on numerous computers (and I am a huge fan of portable applications), I had it running off my thumbdrive. Well, I will be looking forward to see whether you will implement that idea of mine, and if so, I will be :) <As happy as that guy there haha.

I don't think it can be done. That is if I'm understanding you. I'm going to put SciTE on a thumbdrive and try it on a computer which has never had SciTE installed.

Edit: Forgot to Quote Mikeman

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

#15 ·  Posted

I can't get this to run for me. If I run the script from SciTE it errors with the following error:

C:AutoItScriptsSciTE4AU3 ConfigSciTE Director.au3 (26) : ==> The requested action with this object has failed.:

$this.AddProperty("Hwnd", $elscope_private, $hwnd)

$this.AddProperty("Hwnd", $elscope_private, $hwnd)^ ERROR

If I run the .exe it just puts an icon in the System tray and no GUI shows up and it does nothing.

Windows 7 Enterprise, x86, running as an administrator.


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

#16 ·  Posted (edited)

I can't get this to run for me. If I run the script from SciTE it errors with the following error:

If I run the .exe it just puts an icon in the System tray and no GUI shows up and it does nothing.

Windows 7 Enterprise, x86, running as an administrator.

Beta or release version of AutoIt? I forgot to mention that the beta version is needed.

Edited by LaCastiglione

Share this post


Link to post
Share on other sites

#17 ·  Posted

I was using the release. With the Beta version the error goes away, but I found another issue, when I try to change the font used, as soon as I select a font and click OK in the font window I get a series of errors and the font change doesn't get applied.

BTW, this is being used on an installed version of AutoIt, not a portable version, so far.

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2578)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2579)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2580)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2581)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2582)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2583)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2584)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2585)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2586)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2587)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2588)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2589)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2590)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2591)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2592)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2593)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2594)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2595)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2596)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2597)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2598)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2599)

source :

helpfile :

helpcontext : 2036879460

=============================================

=============================================

! AutoItCOM Test: We intercepted a COM error!

description :

windescription: Member not found.

number : 0x80020003

lastdllerror : 0

scriptline : (2600)

source :

helpfile :

helpcontext : 2036879460

=============================================


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

#18 ·  Posted

I was using the release. With the Beta version the error goes away, but I found another issue, when I try to change the font used, as soon as I select a font and click OK in the font window I get a series of errors and the font change doesn't get applied.

BTW, this is being used on an installed version of AutoIt, not a portable version, so far.

Updated. See OP.

Share this post


Link to post
Share on other sites

#19 ·  Posted

Ok, the error with the font selection is gone now, that's a good thing. :)

But, the theme tab doesn't accurately show the console window colors. Also, the Tools tab isn't showing anything in it.


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

#20 ·  Posted

Ok, the error with the font selection is gone now, that's a good thing. :)

But, the theme tab doesn't accurately show the console window colors. Also, the Tools tab isn't showing anything in it.

Could you show me a screen shot of the Theme Settings window and of your console window which show the colors in question?

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

    • 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
    • xiantez
      SciTE Config - Syntax Color Question
      By xiantez
      Hey Community,
      I was changing around my color scheme manually for syntax highlighting. I really enjoy using a dark background color. However, this seems to be problematic because my blinking cursor is also very dark. Is there a setting in the ScITE config where I can manipulate the blinking cursor to be a different color like "white" so it is easy to spot when coding. The closest thing I found was "Caret Line Color", but this just changes the line highlight.  Your help is greatly appreciated!!

    • DavidLago
      GUI Interaction (VB6)
      By DavidLago
      Hello. 
      Not sure this is the right forum. If I'm wrong, please, let me know.
      I have a task that I really don't know where to begin at. I have a legacy application built in VB6 (yeah, I know) and lately it has been reported to slow down some of the hours of the day and I'm supposed to have a end-user-experience log for this.
      I have worked with IE before, doing things like _IEFormGetCollection, then _IEFormElementGetCollection, and manipulating @extended tags, also, _IEFormElementGetObjByName, _IEFormElementSetValue and _IEFormSubmit at the end. Another example is _IEImgGetCollection, then working with the variable properties, like $xyz.src.
      What I need to do is basically the same.
      - Collecting GUIForms or elements and Setting values into forms (like _IEFormElementSetValue) 
      - Submitting the info to generate an order on another frame of the GUI, and measure the timing.
       
      What I need to know:
      What function or section to be based upon. I have searched in the help file for over a hour with no luck. I've found some stuff within _WinAPI, GDIPlus, and GUIReference, though I wasn't able to find a suitable function to work with this. I have also searched and read some topics in our forum, but most of them refers to AutoIt GUIs. If I missed something, please, educate me.
      Of course, I'll post whatever I can share about what could be helpful for other users.
    • lrstndm
      command prompt shows up at compiled code
      By lrstndm
      Hi all,
      I am working on a application with a GUI and command prompt in 1.
      Currently my code looks this simple >
      #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Change2CUI=y #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 615, 437, 192, 124) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But when I compile this and run the compiled version there is also a command prompt shown. But I don't want this.
      Besides that, I also want it to be possible when I run my script from the command prompt, the program will give feedback in the command prompt where it was started from. With the setup above. This is possible with the ConsoleWrite command. 
      Is it possible to hide the command prompt one way or another when I start the GUI? Or do I have to change my script?
      I hope someone can help me.
      Regards,
      lrstndm