Sign in to follow this  
Followers 0
NewtonScripter

Creating the browse function

6 posts in this topic

Hello

Sorry I'm new to this creating GUI things.

I would like to open a window with the edit field and that "browse" button you always see on applications.

I don't know how to implement the "browse" thing.

Also, I'm really new to this GUI thing, so bear with me please.

How do you keep the GUI from closing? I was reading the GUI Concepts from the Help file, but it uses a specific time interval.

How do I stop it from closing until the user hits like a "submit" button?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

See the help file for FileOpenDialog() and FileSelectFolder() functions.

Also, the typical "loop" to keep a GUI open is using a While loop.

#include <GUIConstants.au3>

GUICreate("My GUI") 
GUISetState (@SW_SHOW) 

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
    
msgbox(0,"Done","")
Edited by spudw2k

Share this post


Link to post
Share on other sites

@spudw2k

It's not a great policy to keep telling people to use #include <guiconstants.au3>.

When that file finally gets retired, people will end up with broken scripts.

#include<GuiConstantsEx.au3> instead since all GuiConstants does is point to that file anyway.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

@spudw2k

It's not a great policy to keep telling people to use #include <guiconstants.au3>.

When that file finally gets retired, people will end up with broken scripts.

#include<GuiConstantsEx.au3> instead since all GuiConstants does is point to that file anyway.

Seems no matter what, something's gonna break in a new release. Sorry I don't keep ahead of the game by researching what changes are coming. I just rely on smart guys like you for "corrections".

Share this post


Link to post
Share on other sites

Seems no matter what, something's gonna break in a new release. Sorry I don't keep ahead of the game by researching what changes are coming. I just rely on smart guys like you for "corrections".

Not a problem. I was just making you (and others) aware. There are scripts available that will update the code anyway and if I'm not mistaken Jos has already included that capability to the AutoIt wrapper. I also have 2 versions which don't rely on Scite or the wrapper. In addition I'm almost ready to post a function which removes any #include<*constants*.au3> lines and just places the required constants at the top of the file instead of including a bunch that you don't need.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

... In addition I'm almost ready to post a function which removes any #include<*constants*.au3> lines and just places the required constants at the top of the file instead of including a bunch that you don't need.

That sounds like a very useful feature. I sually just eliminate the Constants as lookup their values, but this would make things easier and more coder-friendly. muttley

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  
Followers 0