Jump to content

Problem With Fileselectfolder, Fileopendiag...


Recommended Posts

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

Link to comment
Share on other sites

@valik: thanks for reply:

At the moment I 'solved' it with adding:

Opt("WinTitleMatchMode",2)
...
WinActivate("Filetest")

and WinActivate after the "FileOpen/Save..."-folder dialog.

Regards Holger

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