Daka

when compile and move that .exe file to other map ERROR

8 posts in this topic

#1 ·  Posted

Hello there,

 

When I compile script and use it out of the map where 
the source code is. So just moving main.exe to
other map, then source code is.
It breaks with error:
Line10010
Error: Subscript used on non-accessible variable

So I wonder what kind of file do I need to 
include with .exe file? Or should I do something else?

Because people that are using needs only .exe file
just start it and use it, with out source code.

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

Look at your script source for this issue. Running it with SciTE probably would be the easiest to figure out any issues.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted

O I tested with compile script to exe (x64)
and I unchecked compile to x64

then I compile it

and if it is in that map where the code is 
it works perfect as much as I move it to other map
it breaks.

You ae saying got to source code and see what is going on.
How? It all works fine.

Only thing how to debug it would be to find out what kind of 
linecode at that .exe file is? But how to do that?
How to see exactly what line of code is not working at .exe file?

Share this post


Link to post
Share on other sites

#4 ·  Posted

ok I figure it out it needs the .dll files in my case it was md5_hash.dll and md5_hash.bas file.
If I take these files to new map it works fine :)

Share this post


Link to post
Share on other sites

#5 ·  Posted

What I am trying to tell yyou is to run the script with SciTE interactively as that will give you the exact information on this issue.
Are you using the Full Scite4AutoIt3 installation? 
Have you checked your script with au3check, which is automatically when you have this installed?

Anyway, try replicating the issue when running it from SciTE for better information.

Jos 


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted

Ok I was just testing script on windows 10 and it gives me troubles.

Jos you said: "What I am trying to tell you is to run the script with SciTE interactively as that will give you the exact information on this issue."

So my question is:
can you see from .exe script some information, like debugging? can it be done with SciTE interactively?

Other question:
I was debugging with teamviewer with client on his windows 10 with only .exe file.
and it didn't work well!

So only thing I was able to do is to get v3 window info and check why it doesn't work!

So now the problem is, I have no idea, what program is doing!

Here is the solution that maybe could work:
To have another window that will open if I click to see debugging of my code.
then I can say, what exactly code is doing and then that print out in debugging window.

But is there some debugger from autoit like you said "SciTE interactively"
is SciTE what I need here? to can debug on .exe and see what the problem may be?

Share this post


Link to post
Share on other sites

#8 ·  Posted

There is no Debugger as such, but one could always have a debug option by checking for a INI value or exe parameter and then do detailed logging to a LOG file. This is quite common practice for Compiled programs.

When you can replicate the issue locally, you could indeed do some interactive debugging by using the standard available:

#AutoIt3Wrapper_Run_Debug_Mode=                 ;(Y/N) Run Script with console debugging. Default=N

This will trigger detailed steps about the program steps taken in the SciTE Outputpane. It could be that this is way too much information. In that case you can add your own ConsoleWrite statements by going into the source and hitting Ctrl+D on the Var or Func you want to have debug information displayed in t he outputpane.

These lines can be easily commented/removed by using the available options under tools. 
This all is only available in the Full version of SciTE4AutoIt3!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

  • Similar Content

    • Earthshine
      By Earthshine
      This baby can do almost any language! I found Gleany on this site and set it up on a fresh win10 install. all i would need to do to make it build an exe of the search files app we discovered is the .NET Target Framework download to build 100 % but the exe works and generates! You also need to add the path the the version of csc.exe that you want to run. MSBuild is part of .NET and can read your .csproj file.
      YOU can develop .NET OR C/C++ on this baby!
      Super lightweight (fit for crappy laptops), and you can use any dev compilers you wish, Ming, MS, etc, whatever.
      To use the build, you need to open the csproj file, else, to check your syntax it can compile individual files as well. The warning are because I do not have the .NET 4.6 Targeting Pack installed... LOL, and I could get rid of the Core warning, yes, I did not want to build a .NET Core.dll I wanted a live x64 exe! Told you MSBUILD could handle .CSPROJ, .VBPROJ, and all others Microsoft. Don't let Visual Code or Visual Studio slow you down, although, this works with Visual Code as well but there is only debugging in CORE.DLL projects

      ListFiles Example.zip
       

    • WoodGrain
      By WoodGrain
      Hi All,
      I'm using UseTraySetIcon("shell32.dll", xx) to set my tray icon to a specific icon while running, is there a way I can specify this icon when I compile my script into an exe so my exe icon is the same?
      Thanks!
    • 9252Survive
      By 9252Survive
      Hello Guys, 
      Is there a way to have Auto it Exe messages/line number when you hover over the tray icon just at it shows when you run Au3.?
      For an example, if I the script has paused due to WinWait or Sleep I could hover over the icon and it shows the line where it's at. Is there a way to achieve the same with the compiled exe? 
      Many thanks for the help! 
       
    • musicstashall
      By musicstashall
      Excuse me, I did not understand how in the function of Main I can include hundreds of functions of my executable code ?? How to implement this?
    • JohnNash
      By JohnNash
      Weird story. Been using Autoit for more than a year now. But recently moved to a new machine, so did a fresh install, and suddenly I saw menus I never saw before in the editor.
      For example, I Always used to have: Tools>Compile and then it would compile my au3 code. Now, the tools menu has a lot of options but after pressing Compile it goes to a whole new screen specifically for au3 code to select more options, also it debugs my code, which prevents compiling if badly coded.
      Of course this is fine, but I would really like to recompile some old crappy code I wrote, regardless of the mistakes that are still in there, also I am really used to the old setup I had,
      so kind of not done, but how do i get this 'bad'  configuration back? Does it have to do with the au3.properties file? What should I do with it....
      Thanks