Jump to content

Recommended Posts

Posted (edited)

I have one script, then 6 more scripts in a directory next to that main script and I now have to compile them all one by one and increment their versions for each of them manually and create the folders manually which all takes a few minutes before it is ready to work.

I also think I shouldn't track each scripts version separately when I modify them, instead calling them all one version since it is one program, or should I?

Is there a way to ease this process and make it more efficient?

Edited by 2Radon
Posted (edited)

yes

your solution is called: AutoIt

I made the right solution for my needs. Unfortunately, it is closely related to my project, so it makes no sense to send you the script.

But I glanced to my code, I changed it a little, and proportioned to the needs of a wider group of applications.

Here is an example:

_Au3CompileInSciTE($sAu3_script_FileFullPath)

Func _Au3CompileInSciTE($sAu3_script_FileFullPath)
    Local $a_file = StringSplit($sAu3_script_FileFullPath, '\')
    Local $s_file = $a_file[$a_file[0]]
    Local $sAu3_compiled_FileFullPath = StringReplace($sAu3_script_FileFullPath, '.au3', '.exe')
    FileDelete($sAu3_compiled_FileFullPath)
    ShellExecute($sAu3_script_FileFullPath)
    WinWait('[REGEXPTITLE:(?i).*' & $s_file & '.*SciTE.*]')
    Sleep(100)
    ControlSend("[REGEXPTITLE:(?i).*" & $s_file & '.*SciTE.*]', '', '[CLASS:Scintilla; INSTANCE:1]', '{F7}')
    _WaitForAu3_IsCompiled($sAu3_compiled_FileFullPath)
EndFunc   ;==>_Au3CompileInSciTE

Func _WaitForAu3_IsCompiled($sAu3_compiled_FileFullPath)
    Do
        Sleep(100)
    Until FileExists($sAu3_compiled_FileFullPath) = 1 And ProcessExists('upx.exe') = 0 And ProcessExists('aut2exe.exe') = 0 And ProcessExists('AutoIt3Wrapper.exe') = 0 And ProcessExists('Au3Check.exe') = 0 And ProcessExists('Tidy.exe') = 0 And ProcessExists('AutoIt3Wrapper.exe') = 0And ProcessExists('Au3Stripper.exe') = 0
    _WaitFileIsNotUsed($sAu3_compiled_FileFullPath)
    Sleep(5000)
EndFunc   ;==>_WaitForAu3_IsCompiled

Func _WaitFileIsNotUsed($sFile)
    While _WinAPI_FileInUse($sFile)
        Sleep(10)
    WEnd
EndFunc   ;==>_WaitFileIsNotUsed

rest in your hands ;)

mLipok

edit:

script correction

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:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

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