Jump to content

New SciTE4AutoIt3 available with the updated SciTE v3.5.4 release.


Jos
 Share

Recommended Posts

  • Developers

Before I start looking: Which part of SciTEConfig isn't portable yet? pretty sure we changed it such that it adheres to the standard we set using either SCITE-USERHOME or else the SciTE program directory as its "Base" making it portable.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Before I start looking: Which part of SciTEConfig isn't portable yet? pretty sure we changed it such that it adheres to the standard we set using either SCITE-USERHOME or else the SciTE program directory as its "Base" making it portable.

Jos

The modification I added permits to have more than one installation of AutoIt in the same computer and free of registry interaction.
Since, insofar,for what I gather, the directory structure is always the same in regards to SciTE .exe and the installation of AutoIt, therefore with having reference to SciTE location, the other locations are given.
With the following script

Local $n
Local $sSCITE_HOME = @ScriptDir & "\AutoIt3_[3.2.12.1]\SciTE"
Local $sSCITE_USERHOME = $sSCITE_HOME & "\SCITE_USERHOME"
Local $sSCITE_EXE = FileGetShortName($sSCITE_HOME & "\SciTE.exe")

If @Compiled Then
    If Not FileExists($sSCITE_USERHOME) Then DirCreate($sSCITE_USERHOME)
    EnvSet("SCITE_USERHOME", $sSCITE_USERHOME)
    If Not ProcessExists("SciTE.exe") Then
        Run($sSCITE_EXE, @ScriptDir)
        ProcessWait("SciTE.exe")
        Sleep(100)
    EndIf
    For $n = 1 To $CmdLine[0]
        Run($sSCITE_EXE & ' "' & $CmdLine[$n] & '"', @ScriptDir)
    Next
    Run($sSCITE_EXE, @ScriptDir)
EndIf

and a few modifications to AutoIt3Wrapper.au3 , I can run AutoIt with all the good things that come with the standard installation of SciTE4AutoIt3.exe.

So by just relocating the structure elsewhere I can run AutoIt within SciTE just as if it had been installed.

The mods I made does not hinder any features already existent. It expand for the possibility of a "free standing" or portabilitation of an AutoIt install without any future modifications.
The request in the tropic https://www.autoitscript.com/forum/topic/173716-autoit3helpexe-s-behavior/ is also for the same purpose.

I'm still to post mods ( minimal when looking at the code ) of AutoIt3Wrapper.au3 also for the same purpose.

I could zip up my setup and give it to you in a PM as to see the merit in this, or with more time, write all the mods needed for a true portable setup by just moving the folder to a USB drive.

 

 
 

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

Link to comment
Share on other sites

  • Developers

Wouldn't it be much simpler, when you only requirement is to have multiple AutoIt3 installations, to set the AutoIt3Dir in your script to the version you want to use?

#AutoIt3Wrapper_Autoit3Dir=                     ;Optionally override the AutoIt3 install directory to use.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Wouldn't it be much simpler, when you only requirement is to have multiple AutoIt3 installations, to set the AutoIt3Dir in your script to the version you want to use?

#AutoIt3Wrapper_Autoit3Dir=                     ;Optionally override the AutoIt3 install directory to use.

Jos

Well, since only one SciTE version can run at any given time that SciTE is open and given that is for a portable setup and the path will vary, having to declare the path in a directive is much more cumbersome than the system knowing that you are already in such version mode.
The mod. is a simple one and does not, or, should not, affect anything else but would come in handy if nothing else.
Should be known that for my setup I've implemented such and I'm happy with the results. The request comes from the fact that having these mods as a standard install would benefit everyone and does not take much to add to the current code, in my view.

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

Link to comment
Share on other sites

  • Developers

Understand you are passioned about this but I am not that convinced this is something I am willing to support for just you. :)
The thing is that I need to be able to maintain and document this and honestly want to avoid adding even more options to the many that are there already unless it would serve a larger portion of the community.

Jos


 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

in new Au3.3.14.0

https://www.autoitscript.com/autoit3/docs/script_breaking_changes.htm

  • New files are written in UTF-8 with no BOM ($FO_UTF8_NOBOM) mode by default. Use FileOpen() to override.

 

so can I propose to consider change in

SciTEGlobal.properties

from this:

# Internationalisation
#NewFileEncoding=CodePage/UTF8BOM/UTF8/UTF16BE/UTF16LE         # Only available in SciTE4AutoIt3 version

to this:

# Internationalisation

#NewFileEncoding=CodePage/UTF8BOM/UTF8/UTF16BE/UTF16LE         # Only available in SciTE4AutoIt3 version

NewFileEncoding=UTF8

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers

I don't think that is needed as a file is opened in default as UTF8-without bom in SciTE:

3-5-2015
*** Merged the SciTE v 3.5.4 by Neil Hodgson with our own version of SciTE. (Jos)
    Added  utf8.auto.check which will autodetect UTF8 encoded files without BOM and files containing Highvalue ASCII characters and setting the correct encoding.
        We have set the default to 4 which means that the encoding is set to UTF8 without BOM for any script containing normal ASCII characters.
        #~ Enhance function of auto checking utf8: providing two methods
        #~ utf8.auto.check=1: detect utf8 and add BOM automatically
        #~ utf8.auto.check=2: detect utf8 and do not add BOM
        #~ utf8.auto.check=3: detect ascii high characters and if none found set default encoding to UTF8 and add BOM
        utf8.auto.check=4: detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I'm just learn how to use abbreviations in SciTE4AutoIt

Question 1:

why here:

#; -- Directives --
include=#include <GUIConstants.au3>\n|
include=#include <|.au3>\n
incl=#include <|.au3>\n
includeonce=#include-once\n|

is duplicated "include"

Question 2:

Why "incl" not working ?

Question 3:

may I propose new ones:

incl1=#include-once\n|
prag=#pragma compile(|,)\n

Question 4:

may I propose such a change:

incl=#include <|.au3>\n
incl1=#include-once\n|
include=#include "|.au3"\n

 

EDIT:
edited because of forum bug:

incl=#include <|.au3>\n
incl1=://////-=-
include=#include "|.au3"\n

I mean 

incl1=#include-once\n|

in CodeTag is visible as:

incl1=://////-=-

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers

I'm just learn how to use abbreviations in SciTE4AutoIt

may I propose such a change:

I will merge in the changes when you send me your updated abbrev.properties, makes it much easier to make the modifications.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I had installed SciTE4AutoIt, along with AU3.3.12.0.
Is the installation of Au3.3.14.0 changing anything in previously installed SciTE4AutoIt ?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers

I had installed SciTE4AutoIt, along with AU3.3.12.0.
Is the installation of Au3.3.14.0 changing anything in previously installed SciTE4AutoIt ?

 

Not sure what you are asking me here, but all that will happen is that the AutoIt3 installer will update the SciTE config files for AutoIt3 like au3.keywords.properties.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Can I add some comments in this file: au3.user.calltips.api

I'm thinking of making some kind of #Region #EndRegion feature in this above mentioned file.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers

It is a user maintainable file so go ahead and change what you like, but am not sure what you are looking for with the #region directives.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I have serveral my own UDF, also using some UDF from Forum.

How I can maintain calltips when one UDF is changed , and  there is need to Remove all old CallTips and Add new CallTips, but only this which belongs to the desired UDF ?

EDIT:

is there a way to have/use separate CallTips files for each separate UDF ?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers

I have serveral my own UDF, also using some UDF from Forum.

How I can maintain calltips when one UDF is changed , and  there is need to Remove all old CallTips and Add new CallTips, but only this which belongs to the desired UDF ?

EDIT:

is there a way to have/use separate CallTips files for each separate UDF ?

I am sorry but you just totally confused me with that first question. When you want to start all kinds of initiatives then you will have to invest in sorting out how things work. All knowledge I have is also available to you of which most is in the SciTE docs.

You can go crazy with the au3.user.calltips.api in whatever way you want but you are mostly on your own when it comes to sorting things out. ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I believe I've identified a possible issue in AU3Stripper 15.503.1200.2.  When I compile the following code I receive an error (included beneath).

#region ; Imgur Uploadur

#region ; AutoIt3Wrapper
#AutoIt3Wrapper_Version=B

#AutoIt3Wrapper_Run_Tidy=n
    
#AutoIt3Wrapper_If_Run
    #AutoIt3Wrapper_Run_AU3Check=n
#Autoit3Wrapper_If_Compile
    #AutoIt3Wrapper_Run_AU3Check=y
    #AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 -d
    #autoit3Wrapper_jump_to_first_error=y
    #AutoIt3Wrapper_Run_Au3Stripper=y
    #Au3Stripper_Parameters=/MergeOnly
#AutoIt3Wrapper_EndIf
#endregion 

#include "WinHttp.au3"
#include "Base64.au3"

#include <String.au3>
#include <TrayConstants.au3>

Const $program_name = "Imgur Uploadur"

_main()

Func _main()
    ClipPut('')

    Local Const $image_file = $CMDLine[1]

    Switch FileGetSize($image_file) / 1048576 <= 10
        Case True
            AdlibRegister(_progress_update, 250)
            
            Local Const $link = _imgur_uploadur($image_file)

            Switch @error
                Case 0
                    ShellExecute($link, '', '', "open")

                    ClipPut($link)

                    TrayTip($program_name, "Copied to Clipboard!", 30, $TIP_ICONASTERISK)
                
                Case Else
                    TrayTip($program_name, "Error: " & @error, 30, $TIP_ICONASTERISK)
            EndSwitch
            
            AdlibUnRegister(_progress_update)
    EndSwitch
EndFunc

Func _progress_update()
    Local Static $dot

    Local Static $called = 0

    $called += 1

    If $called = 4 Then
        $called = 0
    EndIf
    
    For $i = 1 To $called
        $dot &= '.'
    Next

    ToolTip("Uploading" & $dot)
EndFunc

; ===========================================================
; Author .: trancexx 
; PayPal .: trancexx@yahoo.com
; ===========================================================
Func _imgur_uploadur(Const $image_file)
    Local Const $client_id = "d6d07200ef825bd" ; <-- Your Imgur API v3 client ID goes here.

    Local $connect = '<form action="https://api.imgur.com/3/upload.xml" method="post" enctype="multipart/form-data">' & _
                                   ' <input type="file" name="image"/>'                                                             & _ 
                                     '</form>'

    Local Const $open = _WinHttpOpen()

    Local Const $returned = _WinHttpSimpleFormFill($connect, $open, Default, "name:image", $image_file, "Authorization:Client-ID " & $client_id)
    
    Switch @error
        Case 0
            Return _StringBetween($returned, "<link>", "</link>")[0]

        Case True
            Return SetError(@error, 0, False)
    EndSwitch

    _WinHttpCloseHandle($connect)

    _WinHttpCloseHandle($open)
EndFunc
#endregion 

Func _imgur_uploadur1(Const $image_file)
    Local Const $hOpen = _WinHttpOpen("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)")
    
    ConsoleWrite("_WinHttpOpen" & @TAB & @error & @CRLF)

    Local Const $hConnect = _WinHttpConnect($hOpen, "https://api.imgur.com")
    
    ConsoleWrite("_WinHttpConnect" & @TAB & @error & @CRLF)

    Local Const $hRequest = _WinHttpOpenRequest($hConnect, "POST", "/3/upload.xml", "HTTPS")
    
    ConsoleWrite("_WinHttpOpenRequest" & @TAB & @error & @CRLF)

    _WinHttpSetTimeouts($hRequest, 10000, 60000, 90000, 90000)
    
    ConsoleWrite("_WinHttpSetTimeouts" & @TAB & @error & @CRLF)

    Local Const $client_id = "d6d07200ef825bd"
    
    _WinHttpAddRequestHeaders($hRequest, "Authorization:Client-ID " & $client_id)
    
    ConsoleWrite("_WinHttpAddRequestHeaders" & @TAB & @error & @CRLF)

    _WinHttpAddRequestHeaders($hRequest, "name:image " & $image_file)
    
    ConsoleWrite("_WinHttpAddRequestHeaders" & @TAB & @error & @CRLF)

    Local Const $sContentType = "enctype='multipart/form-data'"
    
    Local Const $sDataToSend = _Base64Encode(FileRead($image_file))

    _WinHttpSimpleSendSSLRequest($hRequest, $sContentType, Default, Default, $sDataToSend)
    
    ConsoleWrite("_WinHttpSimpleSendSSLRequest" & @TAB & @error & @CRLF)

    _WinHttpReceiveResponse($hRequest)
    
    ConsoleWrite("_WinHttpReceiveResponse" & @TAB & @error & @CRLF)
    
    Local $sReceivedData
        
    Switch _WinHttpQueryDataAvailable($hRequest)
        Case True
            ConsoleWrite("_WinHttpQueryDataAvailable" & @TAB & @error & @CRLF)

            Do
                $sReceivedData &= _WinHttpReadData($hRequest)

                If Not @extended Then
                    ExitLoop
                EndIf
                
                ConsoleWrite($sReceivedData & @CRLF)
            Until False         
            
            Switch StringInStr($sReceivedData, "error")
                Case True
                    SetError (6)
            EndSwitch
    EndSwitch   
    
    Local Const $iError = @error

    If $hRequest Then _WinHttpCloseHandle($hRequest)
    
    If $hConnect Then _WinHttpCloseHandle($hConnect)
    
    If $hOpen Then _WinHttpCloseHandle($hOpen)
    
    Return SetError($iError, 0, $sReceivedData)
EndFunc

#cs
Func _HostImGurUpload ( $sPicPath )
    Local $hOpen, $hConnect, $hRequest, $sHost, $sDataToSend, $sReceivedData, $iError, $sResponse, $sPostData, $sContentType
    $sHost = 'api.imgur.com'
    $hOpen = _WinHttpOpen ( $sUserAgent )
    If @error Then
        SetError ( 1 )
    Else
        $hConnect = _WinHttpConnect ( $hOpen, $sHost )
        If @error Then
            SetError ( 2 )
        Else
            $hRequest = _WinHttpOpenRequest ( $hConnect, 'POST', '/2/upload.xml', 'HTTP/1.1' )
            If @error Then
                SetError ( 3 )
            Else
                _WinHttpSetTimeouts ( $hRequest, 10000, 60000, 90000, 90000 )
                $sDataToSend = _HostImGurSetDataToSend ( $sPicPath )
                _WinHttpAddRequestHeaders ( $hRequest, 'Accept: */*' )
                _WinHttpAddRequestHeaders ( $hRequest, 'Expect: 100-continue' )
                $sContentType = 'Content-Type: multipart/form-data; boundary=' & StringTrimLeft ( $sBoundary, 2 )
                _WinHttpSendRequest ( $hRequest, $sContentType, $WINHTTP_NO_REQUEST_DATA, StringLen ( $sDataToSend ) )
                If @error Then
                    SetError ( 4 )
                Else
                    _PicUploadProgress ( $hRequest, $sPicPath, $sDataToSend )
                    If Not @error Then
                        $hTimerInit = TimerInit ()
                        _WinHttpReceiveResponse ( $hRequest )
                        If @error Then
                            SetError ( 5 )
                        Else
                            If _WinHttpQueryDataAvailable ( $hRequest ) Then
                                $sReceivedData = ''
                                While 1
                                    $sReceivedData &= _WinHttpReadData ( $hRequest )
                                    If Not @extended Then
                                        SetError ( 0 )
                                        ExitLoop
                                    EndIf
                                WEnd
                                If StringInStr ( $sReceivedData, 'error' ) Then SetError ( 6 )
                            Else
                                SetError ( 7 )
                            EndIf
                        EndIf
                    Else
                        SetError ( 8 )
                    EndIf
                EndIf
            EndIf
        EndIf
    EndIf
    $iError = @error
    If $hRequest Then _WinHttpCloseHandle ( $hRequest )
    If $hConnect Then _WinHttpCloseHandle ( $hConnect )
    If $hOpen Then _WinHttpCloseHandle ( $hOpen )
    Return SetError ( $iError, 0, $sReceivedData )
EndFunc ;==> _HostImGurUpload ()

Func _HostImGurSetDataToSend ( $sPicPath )
    Local $sData = _PicReadData ( $sPicPath )
    If @error Then Return SetError ( 1 )
    Local $sImageName = _GetFullNameByFullPath ( $sPicPath )
    If @error Or $sImageName = '' Then Return SetError ( 2 )
    Local $sContentType = _PicGetContentType ( $sPicPath )
    If @error Then Return SetError ( 3 )
    Return SetError ( 0, '', $sBoundary & @CRLF & _
        'Content-Disposition: form-data; name="image"; filename="' & $sImageName & '"' & @CRLF & _
        $sContentType & @CRLF & @CRLF & $sData & @CRLF & $sBoundary & @CRLF & _
        'Content-Disposition: form-data; name="key"' & @CRLF & @CRLF & $sImgurApiKey & @CRLF & $sBoundary )
EndFunc ;==> _HostImGurSetDataToSend ()
#ce
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /NoStatus /beta /in "D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur.au3"
+>08:11:44 Starting AutoIt3Wrapper v.15.503.1200.5 SciTE v.3.5.4.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Matthew\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Matthew\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.15.0)  params:-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 -d  from:C:\Program Files (x86)\AutoIt3\Beta  input:D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur.au3
+>08:11:45 AU3Check ended.rc:0
>Running Au3Stripper (15.503.1200.2)  from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline: /Beta
+> 0 Au3Stripper v15.503.1200.2 finished merging 3173 lines of code, stripped 1143 comment lines and Merged 205 Continuation lines.
+>        Created:D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur_stripped.au3 with 1825 lines.
+>08:11:45 Au3Stripper ended.rc:0
>Running AU3Check (3.3.15.0)  params:-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 -d  from:C:\Program Files (x86)\AutoIt3\Beta  input:D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur_stripped.au3
"D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur_stripped.au3"(1825,1) : warning: #comments-end has no matching #comments-start.
D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur_stripped.au3 - 0 error(s), 1 warning(s)
->08:11:45 AU3Check ended. Press F4 to jump to next error.rc:1
>Running:(3.3.15.0):C:\Program Files (x86)\AutoIt3\Beta\aut2exe\aut2exe.exe  /in "D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur_stripped.au3" /out "C:\Users\Matthew\AppData\Local\AutoIt v3\Aut2exe\~AU3iraqgdd.exe" /nopack /comp 2
+>08:11:46 Aut2exe.exe ended.C:\Users\Matthew\AppData\Local\AutoIt v3\Aut2exe\~AU3iraqgdd.exe. rc:0
+>08:11:46 Created program:D:\Programming\AutoIt\My Scripts\Imgur Uploadur\Imgur Uploadur.exe
+>08:11:46 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.892

 

Edited by jaberwacky
Link to comment
Share on other sites

  • Developers

Thanks for the report. Please try the current beta version to see if that also fixes it for you.

15.503.1200.3: Fixed regression with Commentblocks leaving the #CE causing an au3check warning.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

It was really a glitch in au3stripper which surprises me that it wasn't reported yet by anybody. It was of course just a warning so things would still work.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked and unpinned this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...