pandel Posted June 29, 2013 Share Posted June 29, 2013 (edited) Hi! I have a strange problem with FileSelectFolder under Windows 7 and 8. What happens: - I call the function and the dialog opens: $folder = FileSelectFolder("Please choose new folder:", $basepath, 3, "", $form) - I click on the "create new folder" button on the lower left side - a new folder shows up with default name - I change the folder name immediately - I press enter, but the dialog doesn't show the CHANGED folder name, but the default one (but in the background the folder is created with the name I entered!!) If I click ok now, it says folder doesn't exist (that's ok, because it still searches for a folder with the default name) but if I cancel and re-open the dialog, it correctly shows the folder name I entered before and I can select it. The dialog simply isn't refreshed after creating and renaming the new folder. This doesn't happen under Win XP, but Win 7, 8 regardless of 32 or 64 bit. Am I doing something wrong or could this be a bug? Regards, Holger Edited June 29, 2013 by pandel ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
Gianni Posted June 29, 2013 Share Posted June 29, 2013 i tryed this (simplified) on win7 x64 $folder = FileSelectFolder("Please choose new folder:", "c:\temp", 3) ; , "", $form) and it works OK for me. what is the value of $basepath ? Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
guinness Posted June 29, 2013 Share Posted June 29, 2013 I would post what you tried. Or a small reproducer. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
abberration Posted June 29, 2013 Share Posted June 29, 2013 Sounds like a problem with your computer. Link to a site to fix it: http://www.itworld.com/windows/259222/what-do-when-windows-explorer-doesnt-refresh Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
pandel Posted July 1, 2013 Author Share Posted July 1, 2013 Arg! Didn't follow my own topic and so I have not seen your replies... Many thanks! The problem is that it doesn't happen only on my computer. The code is inside a tool I wrote, and this tool is used by a whole lot of people. Many of them told me, that they noticed exactly the same wrong behaviour. My code: $project_folder = FileSelectFolder(__("Please choose new project folder:"), $opsi_dev_dir, 3, "", $form) $opsi_dev_dir is a simple network path, like "w:develop". @abberration: thanks for the article. I'll try some of the suggestions mentioned there when I'm back home again. My computer at work is XP, so no problem here. ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
pandel Posted July 10, 2013 Author Share Posted July 10, 2013 It seems to happen only if the base path is on anetwork drive. There is a report of the exact same problem on the german autoit forum, too. ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
BrewManNH Posted July 10, 2013 Share Posted July 10, 2013 Does every computer you're using it on have a "W:" drive that points to that same share location? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
pandel Posted July 10, 2013 Author Share Posted July 10, 2013 No. It is user configurable. In my app I have a settings dialog where you can set the base folder to whatever drive and subfolder you like and then FileSelectFolder starts from there. ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
BrewManNH Posted July 10, 2013 Share Posted July 10, 2013 No. It is user configurable. In my app I have a settings dialog where you can set the base folder to whatever drive and subfolder you like and then FileSelectFolder starts from there. Post your code, because you're just confusing everyone with the answers you're giving. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
pandel Posted July 10, 2013 Author Share Posted July 10, 2013 (edited) ??? You asked, if there is always a drive "W:" and I said, "No", sometimes it is "W:", sometimes "Z:" or whatever, it really doesn't matter! The drive ALWAYS exists, because I check it before I open the FileSelectDialog, and that's all. What is so confusing about it? The important code line is in #5... Edited July 10, 2013 by pandel ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
blckpythn Posted July 10, 2013 Share Posted July 10, 2013 $project_folder = FileSelectFolder(__("Please choose new project folder:"), $opsi_dev_dir, 3, "", $form) Could it have to do with what is happening in your __() function, or the fact that you have a parent for the dialog? Link to comment Share on other sites More sharing options...
pandel Posted July 10, 2013 Author Share Posted July 10, 2013 The error occurred before I introduced the __() function, so I don't think so. But I'll try to omit the parent and see what happens... ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
BrewManNH Posted July 10, 2013 Share Posted July 10, 2013 What exactly does the __() function do? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
blckpythn Posted July 10, 2013 Share Posted July 10, 2013 What exactly does the __() function do? Really want to know that too, unless it returns something other than the string passed to it, why bother? Link to comment Share on other sites More sharing options...
pandel Posted July 10, 2013 Author Share Posted July 10, 2013 The __() function simply returns a translation. I use it for every text string in application for I18N support and haven't had any problems with it... But when I have access to my Win 7 again, I will definitely try every single hint given to find the problem. ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
pandel Posted July 11, 2013 Author Share Posted July 11, 2013 I did some tests using SciTe and only one single line of code, first on a local drive, second on a network drive: 1st) line of code: $bla = FileSelectFolder("test","C:",3) Everything works as expected. If I create a new folder from within the dialog, the new folder name is shown immediately after typing the new name and pressing ENTER. 2nd) - assign network drive from Samba server: net use z: servershare - line of code: $bla = FileSelectFolder("test","Z:",3) When I create a new folder, I can still change the name and when I press ENTER the new folder is created with the new name (verified with windows explorer), BUT the new name isn't shown in the dialog. It still says "New folder". Win 8, 64 bit. ScriptEditor with I18N support and customizable lexer completely written in AutoIt Link to comment Share on other sites More sharing options...
blckpythn Posted July 11, 2013 Share Posted July 11, 2013 2nd) - assign network drive from Samba server: net use z: servershare - line of code: $bla = FileSelectFolder("test","Z:",3) When I create a new folder, I can still change the name and when I press ENTER the new folder is created with the new name (verified with windows explorer), BUT the new name isn't shown in the dialog. It still says "New folder". Any non-Samba shares you can test it on? Link to comment Share on other sites More sharing options...
BrewManNH Posted July 11, 2013 Share Posted July 11, 2013 (edited) For some reason this "$bla = FileSelectFolder("test","z:",3)" was working fine on my work computer (Win7 x64), but wasn't working on my home computer, same OS. Now I test it this morning (on my work computer) and I'm getting the same issue the OP is getting, I create a new folder and rename it, hit Enter and the folder name (in the dialog) still shows New Folder and $bla is set to "New Folder" as well. If I go to the drive in question, it shows the folder with the new name. Although I'm not sure if it's an issue with the Windows file select dialog or with AutoIt because I can't for the life of me figure out how to invoke that dialog from something like VBScript. Edited July 11, 2013 by BrewManNH If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
blckpythn Posted July 11, 2013 Share Posted July 11, 2013 For some reason this "$bla = FileSelectFolder("test","z:",3)" was working fine on my work computer (Win7 x64), but wasn't working on my home computer, same OS. Now I test it this morning (on my work computer) and I'm getting the same issue the OP is getting, I create a new folder and rename it, hit Enter and the folder name (in the dialog) still shows New Folder and $bla is set to "New Folder" as well. If I go to the drive in question, it shows the folder with the new name. Although I'm not sure if it's an issue with the Windows file select dialog or with AutoIt because I can't for the life of me figure out how to invoke that dialog from something like VBScript. Just tried it myself, same issue. Win7 32-bit on a Server 2008 R2(x64) share. Link to comment Share on other sites More sharing options...
pandel Posted July 11, 2013 Author Share Posted July 11, 2013 (edited) Phew! I'm not alone. That doesn't solve the problem, but it makes me feel a bit better Does anybody have access to AutoIt source code? I think it could have something to do with SHBrowseForFolder (http://msdn.microsoft.com/en-us/library/windows/desktop/bb762115%28v=vs.85%29.aspx), if it is used for FileSelectFolder... @BewManNH regarding VBScript Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(0, "Example", 1, "c:\Programme") If objFolder Is Nothing Then Wscript.Quit End If wscript.Echo "folder: " & objFolder.title & " Path: " & objFolder.self.path Edited July 11, 2013 by pandel ScriptEditor with I18N support and customizable lexer completely written in AutoIt 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