Jump to content

Running code in beta


Recommended Posts

Nuts, my second post of the day. Must be the heat... :)

I just installed the 3.3.7.14 beta. Put this line in my code:

MsgBox(0, "", @AutoItVersion)

When I select "Beta Run) in Scite (Alt-F5), should the version not return "3.3.7.14"? It shows "3.3.6.1" What am I missing?

Link to comment
Share on other sites

Here's the output. Has to be something simple I'm doing wrong. Does the same thing on my home machine.

>"C:\tools\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "D:\Data\AutoItScripts\scrap.au3" /autoit3dir "C:\tools\AutoIt3\beta" /UserParams

+>19:19:07 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X86)

>Running AU3Check (1.54.19.0) from:C:\tools\AutoIt3

+>19:19:07 AU3Check ended.rc:0

>Running:(3.3.6.0):C:\tools\AutoIt3\autoit3.exe "D:\Data\AutoItScripts\scrap.au3"

+>19:19:25 AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 19.498

Sorry - ran this at home after posting the original query at work. Just noticed I'm at version 3.3.6.0 at home, but it does the same thing at work w/3.3.6.1

Edited by VelvetElvis
Link to comment
Share on other sites

Just to clarify...

I'm running AutoIt v 3.3.6.1 at work. I have the latest beta (3.3.7.14) installed. This is my code:

MsgBox(0, "", @AutoItVersion)

I hit F5. It returns "3.3.6.1"

I hit Alt-F5 ("Beta Run), it still returns "3.3.6.1"

If I "Beta Compile" it and run the .exe, it returns "3.3.6.1"

BTW, I have AutoIt installed in "C:\Tools\" instead of "C:\Program Files\"

Could this be causing my grief? I just did a full reinstall of everything. :)

Edited by VelvetElvis
Link to comment
Share on other sites

Found the problem, but don't know how to fix it.

I reinstalled AutoIt/Scite/beta on another machine, using the default "C:\Program Files\..." folder. "Beta Run" in Scite works fine on this machine. The problem is definitely related to my machine's AutoIt install being in "C:\Tools\..".

There's an .ini or .cfg file that evidently needs to be changed, but darned if I can find it. Can anyone point me in the right direction?

Link to comment
Share on other sites

I think I found the bug:

- beta run sets /autoit3dir "$(autoit3dir)\beta"

- AutoIt3Wrapper appends in beta-mode \beta again.

This results in $(autoit3dir)\beta\beta. The wrapper does not find AutoIT3.exe and therefore searches in @ProgramFiles\AutoItv3\beta.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

I think I found the bug:- beta run sets /autoit3dir "$(autoit3dir)\beta"- AutoIt3Wrapper appends in beta-mode \beta again.This results in $(autoit3dir)\beta\beta. The wrapper does not find AutoIT3.exe and therefore searches in @ProgramFiles\AutoItv3\beta.

Thanks for replying ProgAndy.

Did a search inside all the files in the Autoit install folder, and was surprised to see a few files with "C:\Program Files" hard-coded, even though I didn't install there. Most were in the Scite heirarchy. I didn't know which ones would have an impact, and didn't feel like changing them all, so I wound up uninstalling the whole works and reinstalling to the default folders, which I really don't like doing.

Hopefully this will be fixed in a future release.

Link to comment
Share on other sites

  • Developers

Hopefully this will be fixed in a future release.

What is there to fix?

I think you updated the Autoit3dir= setting in au3.properties?

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

What is there to fix?

I think you updated the Autoit3dir= setting in au3.properties?

No, I didn't change any au3.properties on either my work or home PC.

I just ran another test on another PC, installing to a folder other than the default.

Here's how to reproduce it. On a clean PC with no existing AutoIt.

Reinstall in this order:

- autoit-v3-setup.exe (NOTE: Installed to "C:\Tools\" instead of "C:\Program Files\")

- ScITE4AutoIt3.exe (Installed using defaults)

- autoit-v3.3.7.14-beta-setup.exe (Installed using defaults)

Open ScITE and execute this one-liner

MsgBox(0, "", @AutoItVersion)

Re-run the same code using "Beta Run". They will both show "3.3.6.1", at least they have on 3 machines I tried.

Link to comment
Share on other sites

In au3.properties, the commands for beta run and beta compile have to read like this, then it should work without problems:

bcommand.0="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "$(FilePath)" /autoit3dir "$(autoit3dir)" /UserParams $(1) $(2) $(3) $(4)
...
bcommand.1="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.exe" /beta /in "$(FilePath)" /autoit3dir "$(autoit3dir)"

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

  • Developers

No, I didn't change any au3.properties on either my work or home PC.

I just ran another test on another PC, installing to a folder other than the default.

Here's how to reproduce it. On a clean PC with no existing AutoIt.

Reinstall in this order:

- autoit-v3-setup.exe (NOTE: Installed to "C:\Tools\" instead of "C:\Program Files\")

- ScITE4AutoIt3.exe (Installed using defaults)

- autoit-v3.3.7.14-beta-setup.exe (Installed using defaults)

Open ScITE and execute this one-liner

MsgBox(0, "", @AutoItVersion)

Re-run the same code using "Beta Run". They will both show "3.3.6.1", at least they have on 3 machines I tried.

So, what is the autoit3dir value listed at the top of the au3.properties?

Should be:

# *** Specify here your AutoIt program directory  ***
autoit3dir=C:\tools\AutoIt3

Couple more questions:

What is the commandline shown in the SciTE output pane when you do F5?

You installed AutoIt production to C:\tools\autoit3, but is beta also installed to C:\tools\autoit3\beta ?

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

So, what is the autoit3dir value listed at the top of the au3.properties?

Should be:

# *** Specify here your AutoIt program directory  ***
autoit3dir=C:\tools\AutoIt3

Couple more questions:

What is the commandline shown in the SciTE output pane when you do F5?

You installed AutoIt production to C:\tools\autoit3, but is beta also installed to C:\tools\autoit3\beta ?

Jos

Jos;

I wound up uninstalling and reinstalling to the default folders. I think I may have one box at work with the custom folder settings. I'll check on Monday.

I already posted the SciTE output (post #3 in this thread).

I'm nearly positive the beta installed in c:\Tools as well, but I can't confirm until Monday. I accepted the default install.

ProgAndy, thank you again for your input. You guys are great.

Link to comment
Share on other sites

  • Developers

I already posted the SciTE output (post #3 in this thread).

I'm nearly positive the beta installed in c:\Tools as well, but I can't confirm until Monday. I accepted the default install.

I was looking for what the command looks like for Production run (F5). Post 3 is ALt+F5 for Beta. :)

You will have to follow the logic that I describe were Beta is a subdirectory of the production AutoIt and the value of autoit3dir in au3.properties needs to point to the Production directory.

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 was looking for what the command looks like for Production run (F5). Post 3 is ALt+F5 for Beta. :)

You will have to follow the logic that I describe were Beta is a subdirectory of the production AutoIt and the value of autoit3dir in au3.properties needs to point to the Production directory.

Jos

Jos, is this something that's normally handled properly by the SciTe install, if a different installation directory is specified? Or does this need to be manually edited?

Link to comment
Share on other sites

  • Developers

Jos, is this something that's normally handled properly by the SciTe install, if a different installation directory is specified? Or does this need to be manually edited?

There is no option to specify an alternative directory in the SciTE4AutoIt3 installer, only the AutoIt3 installer.

The SciTE4AutoIt3 installer will find the AutoIt3 installer installation info in the registry and use that.

It will read the following key: "HKLM\Software\AutoIt v3\AutoIt\InstallDir" and install in the SciTE subdirectory.

In case you have a X64 OS the Registry key is "HKLM\Software\Wow6432Node\AutoIt v3\AutoIt\InstallDir" for the x86 setting.

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 case you have a X64 OS the Registry key is "HKLM\Software\Wow6432Node\AutoIt v3\AutoIt\InstallDir" for the x84 setting.

Jos

A new architecture to be coming ? :)

Edit: Jos changed it to 86. I changed it back to 84 (the original post).

Forumer100's law: DO NOT change others post. ;)

Edited by forumer100

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

So, what is the autoit3dir value listed at the top of the au3.properties?

Should be:

# *** Specify here your AutoIt program directory  ***
autoit3dir=C:\tools\AutoIt3

Couple more questions:

What is the commandline shown in the SciTE output pane when you do F5?

You installed AutoIt production to C:\tools\autoit3, but is beta also installed to C:\tools\autoit3\beta ?

Jos

Back at work. Here's the info from the test machine:

- au3.properties: autotit3dir=C:\Tools\AutoIt3

- Output pane (run under 3.3.6.1):

>"C:\Tools\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "M:\Brian\AutoIt scripts\scrap.au3" /autoit3dir "C:\Tools\AutoIt3" /UserParams

+>05:52:51 Starting AutoIt3Wrapper v.2.0.3.0 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86)

>Running AU3Check (1.54.19.0) from:C:\Tools\AutoIt3

+>05:52:51 AU3Check ended.rc:0

>Running:(3.3.6.1):C:\Tools\AutoIt3\autoit3.exe "M:\Brian\AutoIt scripts\scrap.au3"

+>05:52:53 AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 3.341

- The Beta version is in C:\Tools\AutoIt3\Beta\

To recap, running "msgbox(0, "", @AutoItVersion) returns "3.3.6.1" in both production and beta versions.

Link to comment
Share on other sites

To repeat myself: The problem is duplicate code in au3.properties and AutoIt3Wrapper.

In an unmodified SciTe4AutoIt-Installation, the commandline for Beta Run is the following:

bcommand.0="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "$(FilePath)" /autoit3dir "$(autoit3dir)\beta" /UserParams $(1) $(2) $(3) $(4)

As a result, $INP_AutoitDir in the Wrapper will be set to $(autoit3dir)\beta. I will explain the next steps as comments in the AutoIt3Wrapper-Code:

If $INP_AutoIT3_Version = "beta" Then  ; this condition equals true since /beta was specified
    If $INP_AutoitDir = "" Then ; the AutoItDir is not empty
        $INP_AutoitDir = RegRead($RegistryLM, 'BetaInstallDir')
    Else ; this results in the else-branch
        $INP_AutoitDir &= "\beta" ; the wrapper adds \beta. 
        ; Since the directory was already $(autoit3dir)\beta, now it is $(autoit3dir)\beta\beta <-- ERROR!
        ; Modify this to:
        ; If StringRight($INP_AutoitDir, 4) <> "beta" Then $INP_AutoitDir &= "\beta"
    EndIf
    If Not StringInStr($ObfuscatorCmdLine, "/beta") Then $ObfuscatorCmdLine &= " /Beta"
Else
    If $INP_AutoitDir = "" Then
        $INP_AutoitDir = RegRead($RegistryLM, 'InstallDir')
    EndIf
EndIf
If Not FileExists($INP_AutoitDir & "\Autoit3.exe") Then $INP_AutoitDir = "" ; As a result, AutoIt3.exe is not found and the path is cleared
;
If Not FileExists($INP_AutoitDir & "\Autoit3.exe") Or $INP_AutoitDir = "" Then ; $INP_AutoitDir is empty (FileExists-Check is redundant)
    $INP_AutoitDir = StringLeft(@ScriptDir, StringInStr(@ScriptDir, "\Scite") - 1) ; Now start search from ScriptDirectory
    Select
        Case $INP_AutoIT3_Version = "beta" And FileExists(@ProgramFilesDir & "\AutoIt3\beta\Au3Check.exe") ; first check in @ProgramFilesDir
            $INP_AutoitDir = @ProgramFilesDir & "\AutoIt3\Beta"
        Case $INP_AutoIT3_Version = "beta" And FileExists($INP_AutoitDir & "\Beta\au3check.exe")
            ; Use first part of the ScriptDir path.
            ; !ERROR! Searching $INP_AutoitDir & "\Beta, but not adding \beta to variable
            ; As a result the stable version is used, the following line has to be added:
            $INP_AutoitDir &= "\Beta" ; added, not here in original code
        Case FileExists(@ProgramFilesDir & "\AutoIt3\Au3Check.exe")
            $INP_AutoitDir = @ProgramFilesDir & "\AutoIt3"
        Case FileExists($INP_AutoitDir & "\au3check.exe")
            ; Use first part of the ScriptDir path.
        Case Else
            ConsoleWrite("! Unable to determine the location of the AutoIt3 program directory!" & @CRLF)
    EndSelect
EndIf
Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

  • Developers

Sorry ProgAndy, I hadn't read your previous post in detail but you are fully right.

@VelvetElvis,

Just add this line to your SciTEUser.properties or update that line in au3.properties:

bcommand.0="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "$(FilePath)" /autoit3dir "$(autoit3dir)" /UserParams $(1) $(2) $(3) $(4)

I will fix the au3.properties in the distribution.

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

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...