Jump to content

Problem with AutoIt3Wrapper


 Share

Recommended Posts

This script check for:

HKCR\AutoIt3Script\Shell\Compile, "", "REG_SZ", 'Compile Script'

HKCR\AutoIt3Script\Shell\Compile\Command, "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2Exe.exe /in "%l"'

HKCR\AutoIt3Script\Shell\Run, "", "REG_SZ", 'Run Script'

HKCR\AutoIt3Script\Shell\Run\Command, "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\AutoIt3.exe "%1" %*'

and another values of reg (make for autoit installer)

The problem is: i dnt wanna make that values....because i make a Cascading Menu for AutoIt. But if AutoIt3Wrapper.au3 check for:

If @OSArch = "X86" Or StringInStr(RegRead("HKCR\AutoIt3Script\Shell\Run\Command", ""), "AutoIt3.exe") Then
Update_Directive($Full_source, $directives, "#AutoIt3Wrapper_UseX64", $INP_UseX64, "n", "1=y;0=n;4=n")
Else
Update_Directive($Full_source, $directives, "#AutoIt3Wrapper_UseX64", $INP_UseX64, "y", "1=y;0=n;4=n")
EndIf


--------------------


If $Option = "Compile" Then
If $AUT2EXE_PGM <> "" And FileExists($AUT2EXE_PGM) Then
; support old override for AUT2EXE
ElseIf $CurrentAutoIt_InstallDir <> "" And FileExists($CurrentAutoIt_InstallDir & "\aut2exe\aut2exe.exe") Then
If @OSArch <> "x86" And FileExists($CurrentAutoIt_InstallDir & "\aut2exe\aut2exe_x64.exe") And StringInStr(RegRead("HKCR\AutoIt3Script\Shell\Compile\Command", ""), "aut2exe_x64.exe") Then
$AUT2EXE_PGM = $CurrentAutoIt_InstallDir & "\aut2exe\aut2exe_x64.exe"
Else
$AUT2EXE_PGM = $CurrentAutoIt_InstallDir & "\aut2exe\aut2exe.exe"
EndIf
Else
If @OSArch <> "x86" And FileExists($CurrentAutoIt_InstallDir & "\aut2exe\aut2exe_x64.exe") And StringInStr(RegRead("HKCR\AutoIt3Script\Shell\Compile\Command", ""), "aut2exe_x64.exe") Then
$AUT2EXE_PGM = $CurrentAutoIt_InstallDir & "\aut2exe\aut2exe_x64.exe"
Else
$AUT2EXE_PGM = $CurrentAutoIt_InstallDir & '\aut2exe\Aut2Exe.exe'
EndIf
EndIf

------------------


If @OSArch = "X86" Or StringInStr(RegRead("HKCR\AutoIt3Script\Shell\Run\Command", ""), "AutoIt3.exe") Then
SetDefaults($INP_UseX64, "n", "auto=a;yes=y;no=n;1=y;0=n;4=n", "y;n", 0, 0)
Else
SetDefaults($INP_UseX64, "y", "auto=a;yes=y;no=n;1=y;0=n;4=n", "y;n", 0, 0)
EndIf

and dnt found that entry so force for "x64 compile".

i have 2 option:

edit AutoIt3Wrapper.au3 or add that entry.

I dnt wanna edit all time AutoIt3Wrapper.au3 when this is updated. So please change the code =).

I dont installa from setup. I have my installer.

Sry my english is so bad XD.

PD: my contex menu actualy is (forced that 2 entry)

#NoTrayIcon
If (Not StringCompare (@OSArch, 'X64')) Then
$verHKLM = 'HKLM64'
Else
$verHKLM = 'HKLM'
EndIf
RegWrite($verHKLM & "\SOFTWARE\Classes\.au3", "", "REG_SZ", 'AutoIt3Script')
RegWrite($verHKLM & "\SOFTWARE\Classes\.au3", "PerceivedType", "REG_SZ", 'au3')
RegWrite("HKCR\AutoIt3Script\DefaultIcon", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Icons\au3script_v10.ico')
RegWrite("HKCR\AutoIt3Script\Shell\Compile", "", "REG_SZ", 'Compile Script')
RegWrite("HKCR\AutoIt3Script\Shell\Compile\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2Exe.exe /in "%l"')
RegWrite("HKCR\AutoIt3Script\Shell\Run", "", "REG_SZ", 'Run Script')
RegWrite("HKCR\AutoIt3Script\Shell\Run\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\AutoIt3.exe "%1" %*')
RegWrite("HKCU\Software\AutoIt v3\Aut2Exe", "LastExeDir", "REG_SZ", 'My Documents')
RegWrite("HKCU\Software\AutoIt v3\Aut2Exe", "LastScriptDir", "REG_SZ", 'My Documents')
RegWrite("HKCU\Software\AutoIt v3\Aut2Exe", "LastIconDir", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Aut2Exe\Icons')
RegWrite("HKCU\Software\AutoIt v3\Aut2Exe", "LastIcon", "REG_SZ", '')
RegWrite("HKCU\Software\AutoIt v3\Aut2Exe", "LastCompression", "REG_DWORD", '2')
RegWrite("HKCU\Software\AutoIt v3\Aut2Exe", "AllowDecompile", "REG_DWORD", '1')
RegWrite("HKCU\Software\AutoIt v3\AutoIt", "Include", "REG_SZ", '')
RegWrite("HKCR\AutoIt3Script\Shell\AutoIt", "MUIVerb", "REG_SZ", 'AutoIt')
RegWrite("HKCR\AutoIt3Script\Shell\AutoIt", "SubCommands", "REG_SZ", 'AutoIt.Edit;AutoIt.Wrapper;AutoIt.Run;AutoIt.Compile;AutoIt.RunX86;AutoIt.CompileX86')
RegWrite("HKCR\AutoIt3Script\Shell\AutoIt", "icon", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Aut2Exe\Icons\AutoIt_Main_v9_48x48_RGB-A.ico')
RegWrite("HKCR\AutoIt3Script\Shell\Open\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\SciTE\SciTE.exe "%1"')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Edit", "", "REG_SZ", 'Edit Script')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Edit\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\SciTE\SciTE.exe "%1"')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Wrapper", "", "REG_SZ", 'Wrapper Script')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Wrapper\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe /prod /in "%l"')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Run", "", "REG_SZ", 'Run Script')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Run\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\AutoIt3_x64.exe "%1" %*')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Compile", "", "REG_SZ", 'Compile Script')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.Compile\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2Exe_x64.exe /in "%l"')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.RunX86", "", "REG_SZ", 'Run Script (x86)')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.RunX86\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\AutoIt3.exe "%1" %*')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.CompileX86", "", "REG_SZ", 'Compile Script (x86)')
RegWrite($verHKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\AutoIt.CompileX86\Command", "", "REG_SZ", @ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2Exe.exe /in "%l"')
Link to comment
Share on other sites

I fixed editing AutoIt3Wrapper:

StringInStr(RegRead("HKCRAutoIt3ScriptShellRunCommand", ""), "AutoIt3.exe")

for:

StringInStr(RegRead("HKCUSoftwareAutoIt v3Aut2Exe", "DefaultCompileVer"), "x86")

StringInStr(RegRead("HKCRAutoIt3ScriptShellCompileCommand", ""), "aut2exe_x64.exe")

for:

StringInStr(RegRead("HKCUSoftwareAutoIt v3Aut2Exe", "DefaultCompileVer"), "x64")

3° And add:

RegWrite("HKCUSoftwareAutoIt v3Aut2Exe", "DefaultCompileVer", "REG_SZ", 'x86')

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

  • Recently Browsing   0 members

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