Jump to content

Recommended Posts

Posted

Yes there is a pb scrollbars example have not been update I will fix them

Posted
; SQLite3 dll version must match

#include <MsgBoxConstants.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>

Global $sSQliteDll = _SQLite_Startup()
If @error Then
    If MsgBox($MB_SYSTEMMODAL + $MB_YESNO + $MB_DEFBUTTON2, "SQLite Error", (@AutoItX64 ? 'SQLite3_x64.dll' : 'SQLite3.dll') & " Can't be Loaded!" & @CRLF & @CRLF & _
            "Not FOUND in @ScriptDir, @WorkingDir," & @CRLF & @TAB & "@LocalAppDataDir\AutoIt v3\SQLite," & @CRLF & @TAB & "@SystemDir or @WindowsDir" & _
            @CRLF & @CRLF & "Would you like to go to the site to download it ?") = $IDYES Then ShellExecute("https://www.sqlite.org/download.html")
    Exit 4
EndIf

MsgBox($MB_SYSTEMMODAL, (@AutoItX64 ? 'SQLite3_x64.dll' : 'SQLite3.dll') & " Loaded", $sSQliteDll & " (v" & _SQLite_LibVersion() & ")")
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Shutdown()

This "Example 1" will be better than the current one.
If the DLL is not there it takes you to the site for download.
 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

..to be or not to be..

As the well read and organized coder that I am ( or aim to be :D ) I read the WiKi. Add button(s) with $idRun, and $idCancel to have $idCntrlName = ...
Then I run the script and I get "error: $idCancel previously declared as a 'Const'." and I open the offending file and I read:

...
Global Const $MB_SERVICE_NOTIFICATION = 0x00200000 ; The caller is a service notifying the user of an event.

Global Const $MB_RIGHTJUSTIFIED = $MB_RIGHT ; Do not use, see $MB_RIGHT. Included for backwards compatibility.

; Indicates the button selected in the message box
Global Const $IDTIMEOUT = -1 ; The message box timed out
Global Const $IDOK = 1 ; OK button was selected
Global Const $IDCANCEL = 2 ; Cancel button was selected
...

... I found it, "funny" ? 🤷‍♂️

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

  • 3 weeks later...
Posted

To help some unnecessary confusion, I was thinking a small note added to OnAutoItExitRegister may be handy:

Quote

Any declared parameters in a function called by OnAutoItExitRegister are treated as undeclared when called, and will cause a crash if used by the function. Use @NumParams or IsDeclared if a function with parameters must be used.

Best Regards

Donny

LibreOffice UDF  

Scite4AutoIt Spell-Checker Using LibreOffice

WPS Office adapter — Use MS Word UDFs with WPS Office!

LibreOffice API Inspector tools

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

Posted

Good points @argumentum,

Quote

The function called must not have any parameters.

 

LibreOffice UDF  

Scite4AutoIt Spell-Checker Using LibreOffice

WPS Office adapter — Use MS Word UDFs with WPS Office!

LibreOffice API Inspector tools

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

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
×
×
  • Create New...