Sign in to follow this  
Followers 0
huldu

Ugh... another question, FileOpenDialog

3 posts in this topic

#1 ·  Posted (edited)

Hey again!

This time i ran into an unexpected problem with FileOpenDialog, the thing is i dont understand what is wrong. Everything works great, but 1 thing...

$OpenFile = FileOpenDialog($message, "C:\", "Executables (*.exe)", 1 + 2 )

$Convert = String($OpenFile) ;Added this cause i thought the $OpenFile result wasnt a string

IniWrite($FileName, "GAME", "Dir", $Convert)

Okay, everything works great until it comes to writting the value to .ini. I just cant get it to write it in there. If i check $OpenFile and/or $Convert i get full path to file, including the .exe so it SHOULD be written to the .ini! :(

If i run this part BEFORE any other IniWrite sections in my script, it messes up ALL IniWrite operations. This is just too evil :P

-- Oh ye, 1 more thing :lmao:

Is it possible to refresh: GUICtrlCreateInput($UpdateDir, 16, 400, 193, 21, -1, $WS_EX_CLIENTEDGE) , in any way if its already been run once?. I tried adding the above line further down in the script but the script locked up and i had to force exit it.

Edited by huldu

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

Share this post


Link to post
Share on other sites



The code that you supplied works for me. Perhaps it's something else in your (unsupplied) code?

You don't need to use String() since the result will already be one.

Is it possible to refresh: GUICtrlCreateInput($UpdateDir, 16, 400, 193, 21, -1, $WS_EX_CLIENTEDGE) , in any way if its already been run once?

Try GUICtrlSetData() perhaps, without knowing any more information.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

This is really weird, i couldnt get it to work. :P

-- Really sorry i found the problem, i "assumed" if i used for example "test.ini" it would save it into the same dir as the script was found in. The test.ini it was writting to was found on c:\ drive hehe

Thanks once again, gonna start using @ScriptDir !

Edited by huldu

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

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