huldu Posted December 30, 2005 Posted December 30, 2005 Hey!Ive tried get this script to work, but it only shows up a "3" in the .ini! I just cant figure out what is wrong... Maybe theres something different to be used when making a GUI then just normal code?#include <GUIConstants.au3>GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES$file = GUICtrlCreateInput ( "", 10, 5, 300, 20)$btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20)GUISetState ()$msg = 0While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelectWendIniWrite("c:\saved.ini", "Test2", "Test2", $file)MsgBox (4096, "drag drop file", GUICtrlRead($file))Maybe someone knows what is wrong :|, no matter what i write the .ini always get a "3" in the Test2 key. "I'm paper, rock is fine, nerf scissors!!!"
BigDod Posted December 30, 2005 Posted December 30, 2005 Try #include <GUIConstants.au3> GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateInput ( "", 10, 5, 300, 20) $btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelect Wend IniWrite("c:\saved.ini", "Test2", "Test2", GUICtrlRead($file)) MsgBox (4096, "drag drop file", GUICtrlRead($file)) You need to use GUICtrlRead to get the value of $file instead of the ControlID Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
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