Jump to content

FileOpenDialog, what can cause a crash?


huldu
 Share

Recommended Posts

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 :P

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

  • Moderators

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

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 by huldu

"I'm paper, rock is fine, nerf scissors!!!"

Link to comment
Share on other sites

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 :P). 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

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