Jump to content

Error Reading File


Recommended Posts

When I include a openProgram.au3 file (as shown below) into TSM.au3 and try to run TSM.au3, an error is generated when I run TSM.au3. Why?

Error Generated

Line 11

#include<jClassOpenProgram.au3>

Error: Error reading the file.

openProgram.au3 (located in the include folder of AutoIt Programfiles)

Func runProgram($program)
Send("{LWINDOWN}{LWINUP}")
sleep(300)
Send("{UP}")
sleep(300)
Send("{UP}")
sleep(300)
Send("{UP}")
sleep(300)
Send("{ENTER}")
WinWait("Run","")
If Not WinActive("Run","") Then WinActivate("Run","")
WinWaitActive("Run","")
Send($program)
sleep(300)
Send("{ENTER}")
EndFuncoÝ÷ Ù4jíå¡Æ­yا'hréÛºÚ"µÍÚ[ÛYIÚÛÜÓÜ[ÙÜ[K]LÉÝÂÌÍÜÙÜ[SH   ][ÝÙÌLÝÛM  ÌLÝÛK^I][ÝÂÙØÞ
M   ][ÝÐ][[ÛÌÌÎÉ][ÝË   ][ÝÐ[]]ÛX][ÛÈXÝ]È[ÈÕÝXÚH[ÝÙHÜÙ^XØ[[HYÜØYÙHXÈ]]ÈÚÈÈÈÛÉÌÌÎÉ][ÝËL
BÛY
L
B[ÙÜ[J    ÌÍÜÙÜ[S
BÛY
L
BÙ[
    ][ÝÜ][ÝÊBÛY
L
BÛY
Ì
BÙ[
    ][ÝÜØ[LI][ÝÊBÛY
L
BÙ[
    ][ÝÞÕPZLL
LÙ[I][ÝÊBÛY
L
A decision is a powerful thing
Link to comment
Share on other sites

  • 1 year later...

Answer

Scoping has changed (so it seems) with the new AutoIt version. I just had to create an include folder in my documents and then scope accordingly to that folder.

I have just developed the same problem. Can someone tell me what scoping to a folder means. If I place the script inside the "Include" folder, it runs OK. Outside the folder, it does not.

Thanks

Link to comment
Share on other sites

  • Developers

I have just developed the same problem. Can someone tell me what scoping to a folder means. If I place the script inside the "Include" folder, it runs OK. Outside the folder, it does not.

Thanks

The Helpfile describes where AutoIt3 looks for #Include file and the sequence depending on delimiters used.

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

The Helpfile describes where AutoIt3 looks for #Include file and the sequence depending on delimiters used.

Jos

Thanks, got it.

#include "D:\AutoIt3\Include\GUIConstants.au3" works!

I am having problems using @ScriptDir or @ScriptFullPath in this context. Any suggestions?

Link to comment
Share on other sites

Thanks, got it.

#include "D:\AutoIt3\Include\GUIConstants.au3" works!

I am having problems using @ScriptDir or @ScriptFullPath in this context. Any suggestions?

Macros are only available at run-time. Commands like #include and FileInstall() don't allow variables or macros in their paths.

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