Jump to content

Setting up CI on GitHub for autoit scripts?


rcmaehl
 Share

Recommended Posts

Added solution here: 

 

 

Hi all,

I'm attempting to setup CI on github for several of my projects. I've encountered a few issues I've been able to solve (namely tools exiting before they're complete), but my current issue is that I can't seem to get #AutoIt3Wrapper headers to be parsed. Unlike AU3Check and Aut2exe, using the same parameters SciTE shows being used does not seem to work. I'm wondering if I'm doing something wrong? Any advice on the matter is appreciated, and my CI yml is below.

name: lili

on: 
 push:
   paths-ignore:
     - '.github/**'
     - '!.github/workflows/**'
     - '*.md'

jobs:
  build:

    runs-on: windows-latest
    steps:
    - name: Install Autoit
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe -OutFile autoit-v3-setup.exe
           ./autoit-v3-setup.exe /S
    - name: Checkout repo
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           git clone https://github.com/rcmaehl/LinuxLiveUSBCreator
           cd LinuxLiveUSBCreator
           Move-Item * ..
    - name: Install Autoit Code Stripper
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip -OutFile Au3Stripper.zip
           Expand-Archive -Force .\Au3Stripper.zip C:\"Program Files (x86)"\AutoIt3\Aut2Exe\
    - name: Wrap Code
      run: |
           cd C:\"Program Files (x86)"\AutoIt3
           ./AutoIt3.exe "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\Program Files (x86)\AutoIt3\Aut2Exe\sources\LiLi\LiLi USB Creator.au3"
           Start-Sleep -s 10
    - name: Compile
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           cd LinuxLiveUSBCreator
           $ver= git rev-list --count HEAD
           cd ..
           mkdir build
           ./Aut2exe.exe /in "sources\LiLi\LiLi USB Creator.au3" /out build\LiLiUSBCreator-2.10alpha$ver.exe /nopack /icon tools\img\lili.ico /comp 4 /x64
           Start-Sleep -s 10
           Move-Item tools build
    - name: Upload
      uses: actions/upload-artifact@v2
      with:
       name: LinuxLiveUSBCreator
       path: C:\Program Files (x86)\AutoIt3\Aut2Exe\build
       if-no-files-found: error

TIA!

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

1 minute ago, TheDcoder said:

Cool, GitHub now has Windows VMs for CI?

Yep

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Very nice. Sorry for going a bit off-topic, another interesting thing is that LiveLinuxUSB is the reason why I discovered AutoIt, I have no idea where I would be now if it weren't for it :wacko:

Thanks for forking the project and improving it :)

As for your actual question, tagging @Jos so that he can advice you on AutoIt3Wrapper.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Just now, TheDcoder said:

Very nice. Sorry for going a bit off-topic, another interesting thing is that LiveLinuxUSB is the reason why I discovered AutoIt, I have no idea where I would be now if it weren't for it :wacko:

Thanks for forking the project and improving it :)

As for your actual question, tagging @Jos so that he can advice you on AutoIt3Wrapper.

Yeah I remember using LiLi wayyyyy back in the day because it was really easy persistent storage. Sad to see the original dev got busy, but it's understandable. Regardless, some of the original translators saw the thread on r/Linux so hopefully I'll have a 2.10 with updated translations out within a month or so. The original dev's coding style is quite a bit different than how I would code and I'm still getting used to it.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

23 minutes ago, rcmaehl said:

Yeah I remember using LiLi wayyyyy back in the day because it was really easy persistent storage.

That's cool, I never used that feature personally... I was just trying out various Linux distros.

1 hour ago, rcmaehl said:

The original dev's coding style is quite a bit different than how I would code and I'm still getting used to it.

Yeah, he also doesn't use the usual Hungarian notation to denote the type of the variable :tv_horror:

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • Developers
4 hours ago, rcmaehl said:

I can't seem to get #AutoIt3Wrapper headers to be parsed. Unlike AU3Check and Aut2exe, using the same parameters SciTE shows being used does not seem to work.

Not sure I understand the question as I only see the input (CI)  which I guess I can interpret, but have no idea what you mean with "headers to be parsed". 
Could you explain please and maybe add the log of "what you do see" ?

... and arn't you missing the download for AutoIt3Wrapper from that Script?  (Maybe you could start explaining what that CI exactly should accomplish for this noob when it comes to Github CI's) 

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

5 hours ago, Jos said:

... and arn't you missing the download for AutoIt3Wrapper from that Script?  (Maybe you could start explaining what that CI exactly should accomplish for this noob when it comes to Github CI's) 

Jos 

I'm not seeing in under https://www.autoitscript.com/site/autoit/downloads/ or https://www.autoitscript.com/site/autoit-script-editor/downloads/ so I thought it came by default. I must have installed it a while ago on my own system without realizing. Let me see if I can add that

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

5 hours ago, Jos said:

(Maybe you could start explaining what that CI exactly should accomplish for this noob when it comes to Github CI's) 

It's just basically a task which is done for each commit/revision to the code, people use it to run syntax checks, build errors etc. These checks are ran in a VM in the cloud, GitHub provides this feature for free (for public repositories).

10 minutes ago, rcmaehl said:

I'm not seeing

It's included in the full version of the SciTE4AutoIt3 editor I think :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

I was able to get it to work. I didn't realize running the wrapper actually compiled the script instead of having to manually run Aut2Exe. I'll post my new CI yml in case anyone else ever experiences this issue (Yes, the sleeps ARE needed).

name: lili

on: 
 push:
   paths-ignore:
     - '.github/**'
     - '!.github/workflows/**'
     - '*.md'

jobs:
  build:

    runs-on: windows-latest
    steps:
    - name: Install Autoit
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe -OutFile autoit-v3-setup.exe
           ./autoit-v3-setup.exe /S
           Start-Sleep -s 10
    - name: Checkout repo
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           git clone https://github.com/rcmaehl/LinuxLiveUSBCreator
    - name: Install Full Editor tools
      run: |
           Invoke-WebRequest -Uri https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe -OutFile SciTE4AutoIt3.exe
           ./SciTE4AutoIt3.exe /S
           Start-Sleep -s 10 
    - name: Wrap Code
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe\LinuxLiveUSBCreator\sources\LiLi\
           ../../../../AutoIt3.exe "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\Program Files (x86)\AutoIt3\Aut2Exe\LinuxLiveUSBCreator\sources\LiLi\LiLi USB Creator.au3"
           Start-Sleep -s 10
    - name: Rename and Aggregate Files
      run: |
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           mkdir build
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe\LinuxLiveUSBCreator
           $ver= git rev-list --count HEAD
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe\LinuxLiveUSBCreator\Sources\LiLi
           Move-Item "LiLi USB Creator.exe" C:\"Program Files (x86)"\AutoIt3\Aut2Exe\build
           cd C:\"Program Files (x86)"\AutoIt3\Aut2Exe
           Move-Item LinuxLiveUSBCreator\tools build
           cd build
           Rename-Item -Path "LiLi USB Creator.exe" -NewName LiLiUSBCreator-2.10alpha$ver.exe
    - name: Upload
      uses: actions/upload-artifact@v2
      with:
       name: LinuxLiveUSBCreator
       path: C:\Program Files (x86)\AutoIt3\Aut2Exe\build
       if-no-files-found: error

 

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Hello, I'm the guy who made initial CI and I think using chocolatey to install autoit3 could be better, would look much cleaner. Has anyone here worked with autoit3 installing from chocolatey?

I don't use Windows so every change that was needed to do was (almost) a blind guess and I'm honestly surprised that it works (more or less). Rcmaehl has been a big help with his Windows expertise (and it's his project after all).

Link to comment
Share on other sites

  • 2 months later...

@rcmaehl 
Please consider to change Title
from:

Quote

Setting up CI for autoit scripts?

to:

Quote

Setting up CI on GitHub for autoit scripts?

 

And add tag  GitHub to yours OP

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

  • rcmaehl changed the title to Setting up CI on GitHub for autoit scripts?

As requested, the current, efficient CI setup for AutoIt is as such:

name: CompileScript

on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - name: Cache tools
        uses: actions/cache@v2
        id: cache
        with:
          path: |
            autoit-v3-setup.exe
            SciTE4AutoIt3.exe
            C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper
          key: v2
      - name: Download tools
        if: steps.cache.outputs.cache-hit != 'true'
        run: |
          curl -sSfLO https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe `
            -sSfLO https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe `
            -sSfLO https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip
          Expand-Archive Au3Stripper.zip "${env:ProgramFiles(x86)}\AutoIt3\SciTE\Au3Stripper"
      - name: Install tools
        run: |
          Start-Process autoit-v3-setup.exe -ArgumentList /S -NoNewWindow -Wait
          Start-Process SciTE4AutoIt3.exe -ArgumentList /S -NoNewWindow -Wait
      - name: Submodule UDF update
        run: |
          git submodule init
          git submodule update --remote --merge
      - name: Compile Script
        run: |
          Start-Process "${env:ProgramFiles(x86)}\AutoIt3\AutoIt3.exe" "`"${env:ProgramFiles(x86)}\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3`" /NoStatus /prod /in SCRIPT_NAME_CHANGE_ME.au3" -NoNewWindow -Wait
          sha256sum -b SCRIPT_NAME_CHANGE_ME*.exe > checksums.sha256
      - uses: actions/upload-artifact@v2
        with:
          name: Compiled_Script
          path: |
            SCRIPT_NAME_CHANGE_ME*.exe
            checksums.sha256
          if-no-files-found: error
      - name: Zip package
        if: startsWith(github.ref, 'refs/tags/')
        run: 7z a SCRIPT_NAME_CHANGE_ME.zip SCRIPT_NAME_CHANGE_ME*.exe checksums.sha256
      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: |
            SCRIPT_NAME_CHANGE_ME*.exe
            SCRIPT_NAME_CHANGE_ME.zip
            checksums.sha256
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

 
It only needs slight modification for your au3 input, output exe, and output zip file names

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Today I ran into a problem with TIDY implementation in your CI workflows exactly here:
https://github.com/rcmaehl/WhyNotWin11/pull/411

I was trying to use:

#AutoIt3Wrapper_Run_Tidy=Y
#Tidy_Parameters=/reel /portable /showconsoleinfo=9 /proper=1


@rcmaehl could you explain how this CI works on GitHub ?

Question 1:
Do this CI workflows each time download:

Quote


          curl -sSfLO https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe `
            -sSfLO https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe `
            -sSfLO https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip

?


Question 2:
How they are unpaced/installed ?

Question 3:
Could you try to use:
https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3_Portable.zip

instead:
https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe

?

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

@mLipok

Quote

Question 1:
Do this CI workflows each time download:

No, there is this function before in CI which caches the files. If you want to download again, you'd have to change the key. for example v3 or something. Then I think that you can also go back to old caches when you change number to old one.

- name: Cache tools
        uses: actions/cache@v2
        id: cache
        with:
          path: |
            autoit-v3-setup.exe
            SciTE4AutoIt3.exe
            C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper
          key: v2
Quote

Question 2:
How they are unpaced/installed ?

This is done in this step, just a standard install as you would do in command line on Windows.

- name: Install tools
        run: |
          Start-Process autoit-v3-setup.exe -ArgumentList /S -NoNewWindow -Wait
          Start-Process SciTE4AutoIt3.exe -ArgumentList /S -NoNewWindow -Wait

Au3stripper is unpacked in previous step

`Expand-Archive Au3Stripper.zip "${env:ProgramFiles(x86)}\AutoIt3\SciTE\Au3Stripper"`

 

Quote

Question 3:
Could you try to use:

I mean, it can be done, but what would be the benefit of using it instead of the installer?

 

 

I will post this code with comments, what's necessary and not etc. here soon, so will be easier to understand.

Link to comment
Share on other sites

4 minutes ago, micwoj92 said:

I will post this code with comments, what's necessary and not etc. here soon, so will be easier to understand.

Thanks.

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

  • 4 weeks later...
name: wnw11 # just a name, not really important

on: [push, pull_request, workflow_dispatch] # runs workflow on: commit push, pull request and last options allows to trigger it manually

jobs:
  build:
    runs-on: windows-latest # specify windows version, windows-2019 and 2016 are available at the time of writing, latest uses latest available
    steps:
      - uses: actions/checkout@v2 # check outs repository under $GITHUB_WORKSPACE
      - name: Cache tools
        uses: actions/cache@v2 # cache paths specified below so they don't have to be redownloaded each time
        id: cache
        with:
          path: |
            autoit-v3-setup.exe
            SciTE4AutoIt3.exe
            C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper
          key: v2 # cache key, simple change (for example to v3) to redownload, can also be used to roll back to older versions of downloaded programs
      - name: Download tools
        if: steps.cache.outputs.cache-hit != 'true' # downloads tools if they are not in cache
        run: |
          curl -sSfLO https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe `
            -sSfLO https://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe `
            -sSfLO https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip
          Expand-Archive Au3Stripper.zip "${env:ProgramFiles(x86)}\AutoIt3\SciTE\Au3Stripper"
      - name: Install tools # self explanatory, installs tools
        run: |
          Start-Process autoit-v3-setup.exe -ArgumentList /S -NoNewWindow -Wait
          Start-Process SciTE4AutoIt3.exe -ArgumentList /S -NoNewWindow -Wait
      - name: Compile # this just compiles, Start-Process is used because AutoIt returns to CMD before finishing. Definitely much better solution than start-sleep used before.
        run: |
          Start-Process "${env:ProgramFiles(x86)}\AutoIt3\AutoIt3.exe" "`"${env:ProgramFiles(x86)}\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3`" /NoStatus /prod /in WhyNotWin11.au3" -NoNewWindow -Wait
          sha256sum -b WhyNotWin*.exe > checksums.sha256 # output shasums of file so people are sure that the files are genuine 
      - uses: actions/upload-artifact@v2 # uploads artifacts so they can be accessed to download
        with:
          name: WNW11
          path: |
            WhyNotWin11*.exe
            checksums.sha256
          if-no-files-found: error # error if no files found, default is warn, error also sends you email by default
      - name: Zip package # this step creates one zip with all files
        if: startsWith(github.ref, 'refs/tags/') # runs setp only on release (github tag)
        run: 7z a WhyNotWin11.zip WhyNotWin11*.exe checksums.sha256 # this uses 7z to make the zip
      - name: Release # uploads files specified below on release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: |
            WhyNotWin11*.exe
            WhyNotWin11.zip
            checksums.sha256
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

GitHub runners are just windows server datacenter virtual machines

All the "uses:" things are just github repositories, for for example if you want to check out what "softprops/action-gh-release@v1" is and read more documentation on it , then you just go to "https://github.com/softprops/action-gh-release"

Bare minimum for this to work is the download + install tools step and compile step, it will simply test if your code compiles

Official GitHub actions documentations is available at https://docs.github.com/en/actions

Edited by micwoj92
highlighting
Link to comment
Share on other sites

  • 2 months later...

Hi all,

I've recently started moving UDFs I use between multiple projects into their own Github repo. Since I'm lazy and don't want to have to manually merge UDF changes across repos, I've added in basic submodule support to the CI script marked as the answer. 

You can find documentation on submodules here: https://github.blog/2016-02-01-working-with-submodules/

You can find an example submodule UDF here: https://github.com/rcmaehl/_GetSteam

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
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
 Share

×
×
  • Create New...