Sign in to follow this  
Followers 0
JohnBailey

Error Reading File

7 posts in this topic

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

Share this post


Link to post
Share on other sites



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.


A decision is a powerful thing

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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


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

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Good to know.

Thanks.

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
Sign in to follow this  
Followers 0