GodForsakenSoul Posted February 20, 2010 Share Posted February 20, 2010 (edited) Q1: I'm having some trouble with what seems to be a basic function. FileReadLine(). It's not that I can't get it to read the file or line, i'm having a problem with one of it's return values. Success: Returns a line of text. Special: Sets @error to -1 if end-of-file is reached. Failure: Sets @error to 1 if file not opened in read mode or other error. The "Special" part is what i'm after. I would like it to actually say when the file is over. Here's a little test i conducted. For $x=1 To 5 $r=FileReadLine("testext.txt",$x) MsgBox(1,"",$r) MsgBox(1,"",@error) Next testext.txt --- line 1 line 2 line 3 line 4 line end Now, According to the help file, upon reaching the end of the file, @error should turn into -1. It didn't happen here. the second MsgBox() always said 0 Here's an actual loop from my current project For $cfL=1 To $ccFC Step 1 $ccFRL1=FileReadLine($gVerbPath&"_CAT.txt",$cfL) If FileExists($gVerbPath&$ccFRL1) Then $ccCF=$ccCF+1 Else MsgBox(4096,"JBT: Error","Error: Missing file"&$gVerbPath&$ccFRL1) EndIf Next Else What I want to do is have that dump $ccCF into a file upon reaching the end of the file. A noble cause, i believe. Score a kill to jchd! Q2.1 I have a bunch of spare PC's (which are broken), and i hope to combine their parts to make at least one that is somewhat working. The one I'm going to build is going to be used as a substitute for a SNES. I have what seems to be the complete collection of snes roms and ZSnes as an emulator. I wrote a fancy looking gui to operate the thing and i'm going to buy a couple of SNes controllers to complete the experience. I want to use said controllers to havigate the menu aswell. While i can use an ugly cluster of HotKeySet()'s to map my keyboard, I can't do so with the controller. Since I couldn't find a GetEverything() type of function in the help file, is there a UDF i can take apart to get the input from SNes controllers? Q2.2 My fancy GUI is very Windows-y. I don't want it to be Windows-y! I can use GuiSetBKColor() to change the backgrounds and that's about it. The buttons seem to stay the same color. How do I Change the color of the buttons? If I use GuiCtrlSetImage(), Can I use .bmp's? The examples always seem to be using .dll's Q3 A not-very-long time ago I asked how to make my thing load before explorer.exe I got what seems to be a legit suggestion to edit a registry file. I think can find the aformentioned thread (assuming it's not too old) But if i can't, i would love someone to post what key to edit here. The problem with the answer in that thread however, is that I have to put my file in the same folder as explorer.exe and i would prefer not to. Can i edit that reg key to an actual PATH to my proggy? Edited February 20, 2010 by GodForsakenSoul Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now