Sign in to follow this  
Followers 0
soporific

Please help "getting" this friustrating language ...

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Dude.. file open is to open a file , to read.. with shellexecute you can read it, as user.. Do you really use programming for almost 20 years?

edit: Typo

Edited by jaenster

-jaenster

Share this post


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

Share this post


Link to post
Share on other sites

Consider FileOpen() the same as fopen

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

Should do it as well.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


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

Share this post


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

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