Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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]

Posted

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

Posted

There are macros for that.

I'm a fresher to AutoIt. Can you pelase tell me what are 'macros' ?

Thanks

Posted

I'm a fresher to AutoIt. Can you pelase tell me what are 'macros' ?

Thanks

Type the word in the search field of the help file and magic will happen :P

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

Posted

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]

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
×
×
  • Create New...