yakir Posted March 20, 2010 Share Posted March 20, 2010 (edited) $LocNu = GuiCtrlCreateInput(IniRead("Locdata.ini","Save","Open NuConnector","..."),5,40,200,20) $LocAgbot = GuiCtrlCreateInput(IniRead("Locdata.ini","Save","Open AgBot","..."),5,80,200,20) $LocSro = GuiCtrlCreateInput(IniRead("Locdata.ini","Save","Open SilkRoad","..."),5,120,200,20) case $Nuexe $Q = "nuConnector914.exe" $Title = "Open NuConnector" explorer($Q,$LocNu,$Title) case $AGbotexe $Q = "AgBot.exe" $Title = "Open AgBot" explorer($Q,$LocAgbot,$Title) case $Sroexe $Q = "Silkroad.exe" $Title = "Open SilkRoad" explorer($Q,$LocSro,$Title) Func explorer($Q,$Link,$Title) $OD1 = FileOpenDialog ("" & $Title & "" ,@WindowsDir ,"(" & $Q & ")") GUICtrlSetData ($Link ,$OD1) EndFunc unc Save($LocNu,$LocAgbot,$LocSro) IniWrite("Locdata.ini","Save","Open NuConnector",GUICtrlRead($LocNu)) IniWrite("Locdata.ini","Save","Open AgBot",GUICtrlRead($LocAgbot)) IniWrite("Locdata.ini","Save","Open SilkRoad",GUICtrlRead($LocSro)) EndFunc after i use explorer func i build it dont save the data in the ini file pls help ~_~ if yo need the full code tall me and il post Edited March 20, 2010 by yakir Link to comment Share on other sites More sharing options...
cueclub Posted March 20, 2010 Share Posted March 20, 2010 was this a typo? unc Save($LocNu,$LocAgbot,$LocSro) IniWrite("Locdata.ini","Save","Open NuConnector",GUICtrlRead($LocNu)) IniWrite("Locdata.ini","Save","Open AgBot",GUICtrlRead($LocAgbot)) IniWrite("Locdata.ini","Save","Open SilkRoad",GUICtrlRead($LocSro)) EndFunc or is that how it actually look? if so try changing unc save to Func save might be easier to have a look at the whole code. i dont know much but 2 heads are better then 1. Link to comment Share on other sites More sharing options...
yakir Posted March 20, 2010 Author Share Posted March 20, 2010 here is a demo scrip i made of the problam #include <GuiConstantsEx.au3> GuiCreate("AgBot and nuConnector HIDER =]", 255, 225) $LocNu = GuiCtrlCreateInput(IniRead("Locdata.ini","Save","Open NuConnector","..."),5,40,200,20) GuiSetState() MsgBox(0,"","6547852") $Q = "nuConnector914.exe" $Title = "Open NuConnector" $OD1 = FileOpenDialog ("" & $Title & "" ,@WindowsDir ,"(" & $Q & ")") GUICtrlSetData ($LocNu ,$OD1) IniWrite("Locdata.ini","Save","Open NuConnector",GUICtrlRead($LocNu)) While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd after i use FileOpenDialog and then GUICtrlSetData it dosnt save the data why? if i only use GUICtrlSetData no FileOpenDialog link this : #include <GuiConstantsEx.au3> GuiCreate("AgBot and nuConnector HIDER =]", 255, 225) $LocNu = GuiCtrlCreateInput(IniRead("Locdata.ini","Save","Open NuConnector","..."),5,40,200,20) GuiSetState() MsgBox(0,"","6547852") $Q = "nuConnector914.exe" $Title = "Open NuConnector" $OD1 = "asdfaa" GUICtrlSetData ($LocNu ,$OD1) IniWrite("Locdata.ini","Save","Open NuConnector",GUICtrlRead($LocNu)) While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd the problam is here but i have no idea what i do worng ;-------not working------ $Q = "nuConnector914.exe" $Title = "Open NuConnector" $OD1 = FileOpenDialog ("" & $Title & "" ,@WindowsDir ,"(" & $Q & ")") GUICtrlSetData ($LocNu ,$OD1) ;------- working ---------- $Q = "nuConnector914.exe" $Title = "Open NuConnector" $OD1 = "asdfaa" GUICtrlSetData ($LocNu ,$OD1) Link to comment Share on other sites More sharing options...
yakir Posted March 20, 2010 Author Share Posted March 20, 2010 any1 can help me plz im stuck 2 days already because of this Link to comment Share on other sites More sharing options...
Developers Jos Posted March 20, 2010 Developers Share Posted March 20, 2010 (edited) FileOpenDialog wil change the working dir and you probably will find your updated ini there. try: IniWrite(@scriptdir & "\Locdata.ini","Save","Open NuConnector",GUICtrlRead($LocNu)) Edited March 20, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
yakir Posted March 20, 2010 Author Share Posted March 20, 2010 FileOpenDialog wil change the working dir and you probably will find your updated ini there. try: IniWrite(@scriptdir & "\Locdata.ini","Save","Open NuConnector",GUICtrlRead($LocNu)) OMG TYYYY TYYY TYYYY the need to add this in help file in FileOpenDialog ty alot =] work great now Link to comment Share on other sites More sharing options...
Developers Jos Posted March 20, 2010 Developers Share Posted March 20, 2010 the need to add this in help file in FileOpenDialog ty alot =] work great nowWhich part is unclear in the helpfile? RemarksSeparate the file filters with a semicolon as shown in the example.Multiple groups of filters are separated by a pipe "|".If default name is given, options must also be given. If none of the options are wanted, use 0 for options.Special Windows folders (such as "My Documents") can sometimes be set as the init dir; see Appendix.@WorkingDir is changed on successful return. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
yakir Posted March 20, 2010 Author Share Posted March 20, 2010 wan i read this "@WorkingDir is changed on successful return." i didnt know what thet meant it will help for ppl like me you add example under it on what it mean 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