Jump to content

iniwrite problem.. idk


Recommended Posts

ok i have a tcp server im building up on.. i want to have a picture on the server's right hand side of the GUI.. anyway this is my code for shoosing the picture

Func _Change_Display_Picture ()
    $Open_Pic = FileOpenDialog('Display Picture', 'My Pictures','all (*)','','',$GUI)
    GUICtrlSetImage ( $Dis_Pic,$Open_Pic)
    IniWrite('Server.ini','#Server','Display_Picture',' ' & GUICtrlRead($Open_Pic))
EndFunc

and whenever i do this it doenst write to the ini.. it changes the picture but only temporarily... also i been using ini's for a while now and i dont see anything wrong with this i double checked the name and the sections but there isnt anything wrong that i can see, any help you guys?

Link to comment
Share on other sites

ok i have a tcp server im building up on.. i want to have a picture on the server's right hand side of the GUI.. anyway this is my code for shoosing the picture

Func _Change_Display_Picture ()
    $Open_Pic = FileOpenDialog('Display Picture', 'My Pictures','all (*)','','',$GUI)
    GUICtrlSetImage ( $Dis_Pic,$Open_Pic)
    IniWrite('Server.ini','#Server','Display_Picture',' ' & GUICtrlRead($Open_Pic))
EndFunc

and whenever i do this it doenst write to the ini.. it changes the picture but only temporarily... also i been using ini's for a while now and i dont see anything wrong with this i double checked the name and the sections but there isnt anything wrong that i can see, any help you guys?

The variable $Open_Pic contains the string path to the selected file. How are you trying to use that as a control ID in GuiCtrlRead()?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

im trying to write the path selected by the user to the ini

Link to comment
Share on other sites

im trying to write the path selected by the user to the ini

Then it should be just:
IniWrite('Server.ini','#Server','Display_Picture', $Open_Pic)

What was the point of having GuiCtrlRead() in there?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

nope still doesnt write to the ini

Link to comment
Share on other sites

you mean.. @scriptdir & 'Server.ini' cause ive tried that and still doesnt work

would you like me to post my entire code for the tcp server?(its kinda messy as it is)

Link to comment
Share on other sites

you mean.. @scriptdir & 'Server.ini' cause ive tried that and still doesnt work

would you like me to post my entire code for the tcp server?(its kinda messy as it is)

That should be:
@scriptdir & '\Server.ini'

Note the trailing backslash is not included in the string returned by the macro.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

thanks lol why do the backslashes mean different things? i mean its slightly confusing

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