Rizzet Posted July 24, 2008 Posted July 24, 2008 when i use FileOpenDialog my program partly stop working i can no longer open new files or create GUI's... is this just my windows who got an error or have i missed something?
Andreik Posted July 24, 2008 Posted July 24, 2008 when i use FileOpenDialog my program partly stop workingi can no longer open new files or create GUI's... is this just my windows who got an error or have i missed something?please post your code
Achilles Posted July 24, 2008 Posted July 24, 2008 I had this problem once... This might help you (from the helpfile):@WorkingDir is changed on successful return.If that's not your problem then you're probably manipulating the returned string wrong or not adding possibilities of an @error... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Rizzet Posted July 24, 2008 Author Posted July 24, 2008 please post your code My current code is very big, but i post a little example of my problem $testFile = FileOpenDialog("What file?","23","(*.*)",1,"") ConsoleWrite("File Path: "&$testFile&@CRLF) FileClose($testFile) ConsoleWrite("anyfile.txt Exists: " & FileExists(@ScriptDir&"\anyfile.txt") &@CRLF) $testFile2 = FileOpen("anyfile.txt",0) ConsoleWrite("anyfile.txt Contains: " & $testFile2 & @CRLF &"Error = "& @Error & @CRLF) FileClose($testFile2) and my the data posted File Path: C:\IniBrain.ini anyfile.txt Exists: 1 anyfile.txt Contains: -1 Error = 0 >Exit code: 0 Time: 2.431
PsaltyDS Posted July 24, 2008 Posted July 24, 2008 (edited) My current code is very big, but i post a little example of my problem $testFile = FileOpenDialog("What file?","23","(*.*)",1,"") ConsoleWrite("File Path: "&$testFile&@CRLF) FileClose($testFile) ConsoleWrite("anyfile.txt Exists: " & FileExists(@ScriptDir&"\anyfile.txt") &@CRLF) $testFile2 = FileOpen("anyfile.txt",0) ConsoleWrite("anyfile.txt Contains: " & $testFile2 & @CRLF &"Error = "& @Error & @CRLF) FileClose($testFile2) and my the data posted File Path: C:\IniBrain.ini anyfile.txt Exists: 1 anyfile.txt Contains: -1 Error = 0 >Exit code: 0 Time: 2.431 $testFile2 = -1 means the FileOpen() failed, most likely because you didn't provide the full path as in FileExists(). Try it with this: $testFile2 = FileOpen(@ScriptDir & "\anyfile.txt",0) P.S. Even if FileOpen() works, it returns the handle to the open file, not the data in the file. Your "anyfile.txt Contains:" implies you have that confused. Edited July 24, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Rizzet Posted July 24, 2008 Author Posted July 24, 2008 $testFile2 = -1 means the FileOpen() failed, most likely because you didn't provide the full path as in FileExists(). Try it with this: $testFile2 = FileOpen(@ScriptDir & "\anyfile.txt",0) P.S. Even if FileOpen() works, it returns the handle to the open file, not the data in the file. Your "anyfile.txt Contains:" implies you have that confused. its not only that that doesnt work.. the file things was just a fast example.. just took the first file things that open a file in any way i this is all kind of problems.. All File* or Ini* or GUI* things get messed up, its like i cant return things from windows anymore
PsaltyDS Posted July 25, 2008 Posted July 25, 2008 its not only that that doesnt work.. the file things was just a fast example.. just took the first file things that open a file in any wayi this is all kind of problems.. All File* or Ini* or GUI* things get messed up, its like i cant return things from windows anymoreSigh... So, lets reset and try this again from the top: Please post a short reproducer script that actually runs and actually produces the symptoms. Without that, there is nothing to talk about. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Rizzet Posted July 25, 2008 Author Posted July 25, 2008 Sigh... So, lets reset and try this again from the top: Please post a short reproducer script that actually runs and actually produces the symptoms. Without that, there is nothing to talk about. my script do reproduce the symptoms..for me. have you tried the script?? just make a anyfile.txt in the same folder as the script then open what ever file you want (exept the andfile.txt) with the dialog. If it works for you then its a problem with my computor
BrettF Posted July 25, 2008 Posted July 25, 2008 Worked here, what version are you using? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Rizzet Posted July 25, 2008 Author Posted July 25, 2008 ConsoleWrite(@OSServicePack&@CRLF) ConsoleWrite(@OSTYPE&@CRLF) ConsoleWrite(@OSVersion&@CRLF) ConsoleWrite(@AutoItVersion&@CRLF) _________________________________ Service Pack 2 WIN32_NT WIN_XP 3.2.12.1
BrettF Posted July 25, 2008 Posted July 25, 2008 There is no problem that I can see. Please produce a small script, that reproduces the problem, so we may test... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Rizzet Posted August 1, 2008 Author Posted August 1, 2008 i've downloaded the beta and it all seems to work now
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