cdm_Death Posted October 2, 2006 Share Posted October 2, 2006 (edited) http://www.autoitscript.com/forum/index.php?showtopic=33710THAT IS THE SUPPORT TOPIC!I decided to post this here because alot of people in support dont nessasarily understand gui's...I apreciate all help Edited October 2, 2006 by cdm_Death Link to comment Share on other sites More sharing options...
iceberg Posted October 2, 2006 Share Posted October 2, 2006 (edited) hi, u mean something like this? #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 323,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("Input1", 50, 60, 180, 60) $Button_2 = GuiCtrlCreateButton("Button2", 90, 160, 120, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_2 $test = GUICtrlRead($Input_1) MsgBox(0, "", $test) FileWrite("c:\test.txt", $test & @CRLF) EndSelect WEnd Exit Edited October 2, 2006 by iceberg mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
cdm_Death Posted October 2, 2006 Author Share Posted October 2, 2006 hi, u mean something like this? #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 323,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("Input1", 50, 60, 180, 60) $Button_2 = GuiCtrlCreateButton("Button2", 90, 160, 120, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_2 $test = GUICtrlRead($Input_1) MsgBox(0, "", $test) FileWrite("c:\test.txt", $test & @CRLF) EndSelect WEnd Exit maybe you could help me understand why mine is not working? I have an idea... I think maybe... MAYBE its reading the variables before I type them in... so if there blank to sart and it never re-reads them, then input_# is always blank? thoughts? Link to comment Share on other sites More sharing options...
smashly Posted October 2, 2006 Share Posted October 2, 2006 (edited) I'm a n00b to auto it and your got a clue as much as me about how to use autoit ..lol but this is a small example of writing the values that are in your input boxes into a .txt file when you hit save button.expandcollapse popup#include <GuiConstants.au3> Opt("GUIOnEventMode", 1) Global $file = @ScriptDir & "\DeathsAutoMove.txt" GuiCreate("Death's AutoMove", 371, 194,(@DesktopWidth-371)/2, (@DesktopHeight-194)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput("", 220, 40, 55, 20) $Input_2 = GuiCtrlCreateInput("", 150, 40, 55, 20) $Input_3 = GuiCtrlCreateInput("", 220, 90, 55, 20) $Input_4 = GuiCtrlCreateInput("", 150, 90, 55, 20) $save = GuiCtrlCreateButton("Save", 50, 150, 120, 30) GUICtrlSetOnEvent($save, "save") $cancel = GuiCtrlCreateButton("Cancel", 190, 150, 130, 30) GUICtrlSetOnEvent($cancel, "cancel") $Icon_5 = GuiCtrlCreateIcon("Icon5", 0, 10, 10, 110, 110) $Label_6 = GuiCtrlCreateLabel("Item 1:", 130, 10, 210, 20) $Label_7 = GuiCtrlCreateLabel("Item 2:", 130, 70, 210, 20) GUISetState (@SW_SHOW) While 1 Sleep(10) WEnd Func save() $in1 = GUICtrlRead ($Input_1) $in2 = GUICtrlRead ($Input_2) $in3 = GUICtrlRead ($Input_3) $in4 = GUICtrlRead ($Input_4) FileWriteLine ($file, $in1) FileWriteLine ($file, $in2) FileWriteLine ($file, $in3) FileWriteLine ($file, $in4) FileClose ($file) MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") EndFunc Func cancel() GUIDelete () MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") Exit EndFunc cheers Edit: Doh , I was to slow...lol Edited October 2, 2006 by smashly Link to comment Share on other sites More sharing options...
cdm_Death Posted October 2, 2006 Author Share Posted October 2, 2006 (edited) I'm a n00b to auto it and your got a clue as much as me about how to use autoit ..lol but this is a small example of writing the values that are in your input boxes into a .txt file when you hit save button.expandcollapse popup#include <GuiConstants.au3> Opt("GUIOnEventMode", 1) Global $file = @ScriptDir & "\DeathsAutoMove.txt" GuiCreate("Death's AutoMove", 371, 194,(@DesktopWidth-371)/2, (@DesktopHeight-194)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput("", 220, 40, 55, 20) $Input_2 = GuiCtrlCreateInput("", 150, 40, 55, 20) $Input_3 = GuiCtrlCreateInput("", 220, 90, 55, 20) $Input_4 = GuiCtrlCreateInput("", 150, 90, 55, 20) $save = GuiCtrlCreateButton("Save", 50, 150, 120, 30) GUICtrlSetOnEvent($save, "save") $cancel = GuiCtrlCreateButton("Cancel", 190, 150, 130, 30) GUICtrlSetOnEvent($cancel, "cancel") $Icon_5 = GuiCtrlCreateIcon("Icon5", 0, 10, 10, 110, 110) $Label_6 = GuiCtrlCreateLabel("Item 1:", 130, 10, 210, 20) $Label_7 = GuiCtrlCreateLabel("Item 2:", 130, 70, 210, 20) GUISetState (@SW_SHOW) While 1 Sleep(10) WEnd Func save() $in1 = GUICtrlRead ($Input_1) $in2 = GUICtrlRead ($Input_2) $in3 = GUICtrlRead ($Input_3) $in4 = GUICtrlRead ($Input_4) FileWriteLine ($file, $in1) FileWriteLine ($file, $in2) FileWriteLine ($file, $in3) FileWriteLine ($file, $in4) FileClose ($file) MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") EndFunc Func cancel() GUIDelete () MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") Exit EndFunc cheers Edit: Doh , I was to slow...lolonly diffrence im seeing is placment of functions... anyone see something I missed? btw thanks I SEE IT! GUICtrlRead THAK YOU! Edited October 2, 2006 by cdm_Death Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now