Sign in to follow this  
Followers 0
SpecialK

How to update "GUICtrlCreateInput"?

4 posts in this topic

#1 ·  Posted (edited)

Hello,

i have made this little menu for a script:

$tempdir2 = "c:\temp\Office2003"
$finalfolder = "c:\"

$Timer = TimerInit()

GUICreate("Komponentenauswahl", 250, 250)

GUICtrlCreateLabel ("Welche Komponenten sollen installiert werden?",  10, 10, 500)
GUICtrlCreateLabel ("Speicherort wählen",  10, 130, 500)

$Word2003 = GUICtrlCreateCheckbox ("Word 2003", 10, 30, 120, 20)
$Excel2003 = GUICtrlCreateCheckbox ("Excel 2003", 10, 50, 120, 20)
$PP2003 = GUICtrlCreateCheckbox ("PowerPoint 2003", 10, 70, 120, 20)
$Access2003 = GUICtrlCreateCheckbox ("Access 2003", 150, 30, 120, 20)
$Outlook2003 = GUICtrlCreateCheckbox ("Outlook 2003", 150, 50, 120, 20)
$Infopath = GUICtrlCreateCheckbox ("Infopath 2003", 150, 70, 120, 20)
$Publisher2003 = GUICtrlCreateCheckbox ("Publisher 2003", 10, 90, 120, 20)
$tempdir = GUICtrlCreateInput ( $finalfolder, 10,  150, 200, 20)
$weiter = GUICtrlCreateButton("Weiter", 85, 220, 75, 25)
$folder = GUICtrlCreateButton ("Ordner wechseln", 85, 180)
GUICtrlSetState (5, 1); Setzt "Word" automatisch als aktiv
GUICtrlSetState (6, 1); Setzt "Excel" automatisch als aktiv
GUICtrlSetState (7, 1); Setzt "PowerPoint" automatisch als aktiv

GUISetState ()  


While 1
    $TimeDiff = TimerDiff($Timer); setzt den Timer
    $msg = GUIGetMsg()
    If $msg = $folder Then
        $finalfolder = FileselectFolder ("Ordner Wählen:", "", 1)
    EndIf
    If $msg = $weiter Or $TimeDiff > 30000 Or $msg = $GUI_EVENT_CLOSE Then ExitLoop
    Wend

As you can see i've set "c:\" as the standart for $finalfolder. But it is possible for the user to chance this by clicking "Ordner wechseln". Then he will get a "FileselectFolder" Dialogue. Now i want the script to update the "GUICtrlCreateInput" Text when "FileselectFolder" selects a different Path.

I tried a lot but didn't find the solution.

SpecialK

Edited by SpecialK

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If GUICtrlRead($tempdir) <> $finalfolder Then GUICtrlSetData($tempdir,$finalfolder)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

If $msg = $folder Then
        $finalfolder = FileselectFolder ("Ordner Wählen:", "", 1)
        GUICtrlSetData($tempdir, $finalfolder)
    EndIf


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I hoped it would be more difficult so that not everybody see that i'm a newbie in AutoIt :D

Thank you. It works fine.

SpecialK

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