Jump to content

How to update "GUICtrlCreateInput"?


Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

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

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.

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