JohnBailey Posted January 16, 2007 Share Posted January 16, 2007 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 More sharing options...
JohnBailey Posted January 16, 2007 Author Share Posted January 16, 2007 AnswerScoping 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 Link to comment Share on other sites More sharing options...
fmen Posted March 10, 2008 Share Posted March 10, 2008 AnswerScoping 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 More sharing options...
Developers Jos Posted March 10, 2008 Developers Share Posted March 10, 2008 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.ThanksThe 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 More sharing options...
fmen Posted March 11, 2008 Share Posted March 11, 2008 The Helpfile describes where AutoIt3 looks for #Include file and the sequence depending on delimiters used.JosThanks, 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 More sharing options...
weaponx Posted March 11, 2008 Share Posted March 11, 2008 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 More sharing options...
fmen Posted March 11, 2008 Share Posted March 11, 2008 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now