Jump to content

Please help "getting" this friustrating language ...


Recommended Posts

Hello, please help me ...

.... everytime i turn to AutoIT for a solution to an unattended problem, simply achieving the most BASIC of tasks takes forever trying to get it right. If its using the wrong functions, to making a mistake with the syntax, something always keeps me going round the bend. I have managed 4 or 5 compiled scripts that do what i want, but they aren't too complex as they never work when i get too ambitious. Now, i can't seem to even open a STUPID TEXT FILE :)

For example, this doesn't work:

FileOpen("Hello.txt",0)

but this does:

ShellExecuteWait("Hello.txt")

-- but the documentation suggests that i use the first command as it "Opens a text file for reading or writing." What am i doing wrong??? This sort of problem just doesn't give me any confidence at all, & i've been using computers and programming for 20 years !!! FFS!!! I'm nearly crying that this seems such an easy thing to do and i can't do it. For me, its like not being able to find the START button on a computer.

Please put me out of my misery !!!! I would like to be able to recommend AutoIT i really would ...

Link to comment
Share on other sites

DUH it doesnt work, file open isnt for opening the file for VIEWING, its to open it up in Autoit form so YOU CAN TELL Autoit to edit it without using an external editor. READ THE HELP FILE.

Shellexecute opens up the file so YOU can edit it.

Link to comment
Share on other sites

  • Moderators

Consider FileOpen() the same as fopen

Run(@comspec & " /c """ & $filename & """, "", @SW_HIDE)

Should do it as well.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

DUH it doesnt work, file open isnt for opening the file for VIEWING, its to open it up in Autoit form so YOU CAN TELL Autoit to edit it without using an external editor. READ THE HELP FILE.

Shellexecute opens up the file so YOU can edit it.

Thanks for the help. You see, i have read the help file, and the clarification about that "file open isnt for opening the file for VIEWING, its to open it up in Autoit form so YOU CAN TELL Autoit to edit it without using an external editor" seems to be MISSING !!

Here i am giving you feedback about how someone is having trouble using the HELP FILE.

Edited by soporific
Link to comment
Share on other sites

Yes, i have been programming for a long time, since 1985 actually ... it doesn't mean i'm a frigging expert ... but i have made a few things in my time ...

http://www.softpedia.com/get/System/OS-Enh...dows-98SE.shtml

so if the author of the above is having problems, maybe other may as well. I'm actually sorry for bringing this up, i'm off to bed, if i could delete this thread i would, and thanks for such a warm and wonderful response to my questions ...

Link to comment
Share on other sites

sorry, i was a bit harsh.... just woke up a while ago..

but yeah, thats the basic idea:

Fileopen() = opening the file without viewing so you can write to it using filewriteline

Shellexecute() = Opens the file to its proper parent application, (eg. text file should open to its parent app Notepad, or word)

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