Jump to content
Sign in to follow this  
Holger

Problem With Fileselectfolder, Fileopendiag...

Recommended Posts

Holger

Hi there :D

I have a problem with the following:

GUICreate("Filetest")
$button1 = GUISetControl("button","FileOpen",50,30,80,20)
GUISetControlNotify()
$button2 = GUISetControl("button","FileSave",50,70,80,20)
GUISetControlNotify()
$button3 = GUISetControl("button","FolderSelect",50,110,80,20)
GUISetControlNotify()

While GUIMsg() > 0
   $n = GUIMsg(0)
   Select
      Case $n = $button1
         FileOpenDialog("Select file:",@ScriptDir,"All files (*.*)") 
      Case $n = $button2
         FileSaveDialog("Select file to save:",@ScriptDir,"All text files (*.txt)",2,"file.txt")
      Case $n = $button3
         FileSelectFolder("Select folder:","",0)
   EndSelect
WEnd

The functions work but there's a strange bug-effect:

If you click on a button and then cancel the 'select'-action there will appear an empty like 'autoit spy"-window in the background.

You can see this if you change the active program/windows through ALT + TAB.

Does anybody have the same problem?

I'm using XP+SP1 and the Autoit3-version from the 3.may.

Thanks and regards

Holger

Share this post


Link to post
Share on other sites
Valik

He's right, for some reason, the AutoIt window is being brought out of hiding.

Share this post


Link to post
Share on other sites
Valik

Jon, this may go back to the whole thing where an HWND is being passed when creating those common dialogs instead of just using NULL...

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  

×