Jump to content

Run Script (x64)


CE101
 Share

Recommended Posts

I have a script that processes XLS files. Some of these files are quite large (16000 rows) and about 10% of the time it crashes on a number of specific COM statements throughout the script.

Someone suggested that I should run in 64-bit mode instead of 32-bit. And that seemed to solve the problem.

Now my problem is that sometimes out of habit I forget to click "Run Script (x64)".   
In Windows Explorer, when I right-click on the script I get a dropdown list of 30 items, including....
        Run Script
        Compile Script
        Compile with Options
        Compile Script (x64)
        Compile Script (x86)
        Run Script (x64)
        Run Script (x86)

So if I am not really focused I can click RunScript or RunScriptx86 instead of RunScriptx64 and I wont know until it crashes, sometimes 30 minutes later.

QUESTION.
Is there any code that can be added to the script that will warn me when I'm not running x64 mode ?

Link to comment
Share on other sites

Thank you for getting back to me.

I understand from the following articles that #AutoIt3Wrapper_UseX64 is a directive to the compiler ...  
   https://www.autoitscript.com/wiki/AutoIt3Wrapper_Directives
   https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/AutoIt3Wrapper.html  

I am not compiling the script. I am running it in interpretive mode.

Do wrapper directives also affect the way the Interpreter does its thing?
Does the wrapper directive UseX64 force the Interpreter to work in 64-bit mode?

Link to comment
Share on other sites

  • Developers
8 hours ago, CE101 said:

Do wrapper directives also affect the way the Interpreter does its thing?
Does the wrapper directive UseX64 force the Interpreter to work in 64-bit mode?

Yes but only when using the Full SciTE4AutoIt3 version, which runs AutoIt3Wrapper when doing a Run or Compile from within SciTE !

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

  • 4 years later...

Hello,

I am not sure if it is allowed to use this thread for my question.
I just tested autoti and one of my first problems is, that
the Scite autoit editor uses the x32 engine on my x64 windows OS system.

I tried to solve this problem with forum postings in the last 10 years,
but i still have no success.

My os.au3 script ist simple:
$sx64 = @AutoItX64 
ConsoleWrite("$sx64=" & $sAutoItX64 & @CR)

If i compile this script inside the windows explorer with Compile x64,
the x64 autoit engine will be used.

But if i start this script inside the Scite Editor the result is
$sx64=0

I installed first
https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe
and then
https://www.autoitscript.com/site/autoit-script-editor/downloads/

Is there any suggestion what i can do, to use the x64 autoit engine with Scite?

Regards
 

Link to comment
Share on other sites

  • Developers

It is fine when you use this thread when it is related and actually contains the answer as well. ;) 

Install the full version of SciTE4AutoIt3 and use this directive in your script:

#AutoIt3Wrapper_UseX64=y

This will ensure that AutoIt3_x64.exe is used to shell the script when that is what you want.

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

13 hours ago, Jos said:

It is fine when you use this thread when it is related and actually contains the answer as well. ;) 

Install the full version of SciTE4AutoIt3 and use this directive in your script:

#AutoIt3Wrapper_UseX64=y

This will ensure that AutoIt3_x64.exe is used to shell the script when that is what you want.

Jos

 

I tried to use the line
#AutoIt3Wrapper_UseX64=y
already in my script. Nothing changed.

After this I thought, that I had installed the full version of SciTE4AutoIt3.
But obviously I did not have the correct version. If this version:
https://www.autoitscript.com/site/autoit-script-editor/downloads/
is the wrong one, where I can find the full SciTE4AutoIt3 version?

 

Regards

 

Link to comment
Share on other sites

  • Developers

Show me the SciTE Console output when you run/compile the script so I can see what you have.

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

On 1/28/2021 at 12:45 PM, Jos said:

Show me the SciTE Console output when you run/compile the script so I can see what you have.

Hello,

sorry for the late answer. Here is the Console Output:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\marvel\Documents\autoit\x64.au3"    
$sOSArch=X64
$sX64=0
>Exit code: 0    Time: 0.08042



Program code was:

#AutoIt3Wrapper_usex64=Y
; #pragma compile(x64, true)


$sOSArch = @OSArch
ConsoleWrite("$sOSArch=" & $sOSArch & @CR)
$sX64 = @AutoItX64
ConsoleWrite("$sX64=" & $sX64 & @CR)

 

 

 

Link to comment
Share on other sites

  • Developers

Ok, so you are running the x32 version and are NOT running the full SciTE4AutoIt3 version. Install that first and then the directive will run the x64 version.

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

On 2/1/2021 at 7:42 PM, Jos said:

Ok, so you are running the x32 version and are NOT running the full SciTE4AutoIt3 version. Install that first and then the directive will run the x64 version.

 

Hm, it seems to be that you are right. 

I installed the version from

https://www.autoitscript.com/site/autoit-script-editor/downloads/

again and now i get 

$sOSArch=X64

$sX64=1

+>22:02:29 AutoIt3.exe ended.rc:0

+>22:02:29 AutoIt3Wrapper Finished.

 

I really thought that I had installed the full version. But obviously not. Strange.... 

In the meantime new questions have appeared. I try to solve them first for me.

 

 

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