Jump to content
Sign in to follow this  

au3 x64-Switch Wrapper

Recommended Posts

Hello Forum,

together with Melba23 I wrote the ICU - Icon Configuration Utility. As this app accesses the desktop listview, it needs to be compiled in line with the @OSArch to be able to access the OS listview.

For the next release I was thinking about adding a wrapper to include the x86 and the x64 exe in one file. I came up with the following solution:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

If @OSArch = "X86" Then
    $sFilename = @ScriptDir & "\au3_32bit.exe"
    FileInstall("bins\au3_32bit.exe", $sFilename)
    $sFilename = @ScriptDir & "\au3_64bit.exe"
    FileInstall("bins\au3_64bit.exe", $sFilename)

If Not FileExists($sFilename) Then _Exit("Could not extract temporary file to" & @CRLF & @CRLF & $sFilename)

$iPID = RunWait(FileGetShortName($sFilename) & " " & $CmdLineRaw, @ScriptDir)

$timer = TimerInit()
While FileExists($sFilename)
    If TimerDiff($timer) > 5000 Then
        _Exit("Could not delete temporary extracted file" & @CRLF & @CRLF & $sFilename)

Func _Exit($sMsg = "")
    If $sMsg Then MsgBox(16 + 262144, "Error", $sMsg)
EndFunc   ;==>_Exit

I would be glad about any feedback on possibilities to improve this simple one :idea:.


Edited by KaFu

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...