Jump to content

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


Recommended Posts

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.

 

Link to post
Share on other sites
  • Developers

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

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 post
Share on other sites

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?

Link to post
Share on other sites
  • Developers

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 

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 post
Share on other sites

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?

Link to post
Share on other sites
  • Developers

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

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By AutoJohn
      Hi,
      Part of my standard template for a new project is including the lines:
          #AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
          #Au3Stripper_Parameters=/mo ;     Use the parameters as listed above
      I extensively use bookmarks to jump back and forth between sections of code while debugging and I am experiencing an annoyance that I'm hoping someone could steer me towards a "better" solution.
      The problem is when I go to compile code, all of my bookmarks get deleted.
      I have determined that if I comment out the line    #AutoIt3Wrapper_Run_Au3Stripper then the issue no longer happens and my bookmarks remain.
      Are there some other properties I could be setting somewhere to keep the line in place yet not destroy my bookmarks on every compile?
      Thanks
      SciTE Version 3.7.3     Feb 16 2017 21:41:17
      AutoIT 3.3.14.5
    • By SgtHugoStiglitz
      HI people,
                        I got a questions, I maintain code in autoIT and every time I compile a new version or modification, Scite generate 2 folders. One folder is finish by released and the other is tentative. I try to make some google search, but never find answer would satisfied myself. The dev who was maintain it before were using AutoIt3Wrapper_GUI, and I don't know if it's related. I look both folder, but they seem pretty identical, but I would like to know what it's the difference between those to folder. Anyone have a clue?
    • By Rhidlor
      I don't have any experience compiling AutoIt scripts or know of any best practices regarding said scripts so I was wondering, what are some of the options for passing data to complied scripts? Here's an example of what I mean by "option": Writing data to a text file, then running a script which reads the data from that text file.
      Thanks!
      I apologize if this topic is a little lackluster
    • By Skeletor
      Hey All,
      Yes, this is an odd request. 
      But is there a way to bulk up the size of the compiled program? 
      I know many want to reduce it's size, but I want to increase it.
      What methods do you suggest?
    • By dimm
      Is it possible to compile script without any icon resources included?
      When I make exe it uses default system icon of current OS even if I compile as console application.
      On other versions of Windows it looks a little strange

       
      Update:
      It seems that the only way is remove icons from exe after compilation using resource editors like ResHacker.

       
      another bad solution:
      Using corrupted 35 bytes icon file. Windows can't load it and shows default system icon.
      #pragma compile(Icon, broken.ico) broken.ico
×
×
  • Create New...