huldu Posted January 2, 2006 Share Posted January 2, 2006 Is there anything that could possibly cause FileOpenDialog to crash, right after you selected a file? Im going crazy because i just cant figure out why FileOpenDialog is messing around with me. Ive tried alot of ways i thought it was because of GUISetOnEvent but it wasnt. Just to make sure there wasnt anything on my messing around i made a smaller test using FileOpenDialog, in a GUI.. and it worked great. Ive tried remove pretty much anything except the FileOpenDialog from my script, and it STILL freezes up after selecting a file. AaaaAAaaaaAaarrrggghhh... why I put the FileOpenDialog (without the func) in my GUI while loop, bound to the key that should open it up. Same thing again, freezes up. In the test GUI i made with a button it worked perfectly. If someone gets this to work and it doesnt crash after selecting an .exe, please compile it and post the .exe if possible (i would like to run it on my computer). If StringInStr($Convert, "silkroad.exe") <> 0 Then Just change the name "silkroad.exe" to a file you have.MainProgram.au3 "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 3, 2006 Moderators Share Posted January 3, 2006 Put this in a test script by itself, and see what you get. $ThisIsATest = FileOpenDialog("Choose a file from here", @ScriptDir, "All Files (*.*)") If StringInStr($ThisIsATest, 'silkroad.exe') Then MsgBox(48, 'Successful', 'This Test Worked') Else MsgBox(48, 'Oops', 'If you chose the file silkroad.exe, then there might be a mistake in spelling') EndIf 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 More sharing options...
huldu Posted January 3, 2006 Author Share Posted January 3, 2006 (edited) Put this in a test script by itself, and see what you get. $ThisIsATest = FileOpenDialog("Choose a file from here", @ScriptDir, "All Files (*.*)") If StringInStr($ThisIsATest, 'silkroad.exe') Then MsgBox(48, 'Successful', 'This Test Worked') Else MsgBox(48, 'Oops', 'If you chose the file silkroad.exe, then there might be a mistake in spelling') EndIf It works in the test script, why it wont work in the main script, not knowing why drives me nuts hehe -- Edit Im gonna try redo the entire script *again* and this time ill start my focus from the FileOpenDialog. Hopefully ill see when the error starts happen. Edited January 3, 2006 by huldu "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
huldu Posted January 3, 2006 Author Share Posted January 3, 2006 Ive reworked the code and im not sure there is a crash anymore. There however seems to be a delay for some unknown reason. The delay duration seems to vary. When i reworked the script i ran into this delay when i attempted to launch the game, however i went from computer (got angry ). When i got back i noticed that the game client had started and the program was running on like nothing ever happend! "I'm paper, rock is fine, nerf scissors!!!" Link to comment Share on other sites More sharing options...
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