Sign in to follow this  
Followers 0
Vindicator209

Can't read anything after FileOpenDialog

4 posts in this topic

#1 ·  Posted (edited)

A part of my script reads from an ini script every time it is called. It also loads a picture to use at the background, however, after doing this:

$NewApp = FileOpenDialog("Choose an application",@DesktopDir,"Executables (*.exe)")

After that, I can't read anythign using IniRead, and my picture doesn't show up on my control.

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If you read the page in the helpfile about FileOpenDialog() you will see this in the end of the remarks section:

@WorkingDir is changed on successful return.

That means that if you use any relative paths and the like you will have problems. I myself had it in one script and I solved it by doing

FileChangeDir(@ScriptDir)
after every FileOpenDialog(). Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Ah, perfect. I had no idea what was going on, I kept thinking I must have messed up my some IniRead() 's

Yeah, I understand it now though, so thanks!


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ah, perfect. I had no idea what was going on, I kept thinking I must have messed up my some IniRead() 's

Yeah, I understand it now though, so thanks!

I was thinking the same thing until i had read the whole page about FileOpenDialog() a few times, it's so easy to miss if you not know what you are searching for! :P Edited by AdmiralAlkex

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