reva Posted July 30, 2008 Share Posted July 30, 2008 I want to read from a file present in a different folder than the script. $file = FileOpen('C:\Documents and Settings\%USERNAME%\Desktop\Shortcuts\Info.txt', 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(4096, "error......", "Unable to open the file from a different folder........what to do?", 100) Exit(0) EndIf Thanks in advance. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 30, 2008 Share Posted July 30, 2008 Hi, so where is the problem? You just need the correct path. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ksmith247 Posted July 30, 2008 Share Posted July 30, 2008 Try $file = FileOpen('C:\Documents and Settings\' & @USERNAME & '\Desktop\Shortcuts\Info.txt', 0) Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 30, 2008 Share Posted July 30, 2008 Try $file = FileOpen('C:\Documents and Settings\' & @USERNAME & '\Desktop\Shortcuts\Info.txt', 0)There are macros for that. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
reva Posted July 30, 2008 Author Share Posted July 30, 2008 There are macros for that. I'm a fresher to AutoIt. Can you pelase tell me what are 'macros' ?Thanks Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 30, 2008 Share Posted July 30, 2008 I'm a fresher to AutoIt. Can you pelase tell me what are 'macros' ?ThanksType the word in the search field of the help file and magic will happen Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ksmith247 Posted July 30, 2008 Share Posted July 30, 2008 Look in the helpfile for macros. I like to use the index listing of the helpfile so I can see everything in a list. Look in the index for things beginning with @. Lots of useful stuff there. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] 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