avery Posted June 20, 2008 Posted June 20, 2008 I have a script I've been working on using au3 and I've run into some odd problems that I, so far, can't located answered for. I will try to give as much example as I can.. Please excuse my amature skills as I just started working with au3. When I call the select_mark1() function it works but when I Exit it closes both windows. I need to make a new window, display a dropdown list and then return that value to the main function. edit: Sorry it doesn't line up right expandcollapse popupLaunchPad() Func LaunchPad() GUICreate("MD5 Trusted Download Tool " & $ver, 500, 350) ... ... GUISetState(@SW_SHOW) EndFunc ; Loop the GUI While 1 $msg = GUIGetMsg() Select Case $msg = $file1_button select_file1() select_mark1() Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func select_file1() $file1 = FileOpenDialog("Select Source File", "", "All (*.*)", 1 + 4) GUICtrlSetData($file1_input,$file1) ;$file1a = StringSplit($file1, "\") ;MsgBox(4, "MD5", $file1a[ubound($file1a)-1] & @CRLF & $file1a[1]) $plH = PluginOpen(@ScriptDir & '\' & "MD5Hash.dll") $file1_md5_l = MD5Hash($file1, 1, True) GUICtrlSetData($file1_md5,$file1_md5_l) GUICtrlSetBkColor($file1_md5, "0x99CCFF") PluginClose($plH) status_md5() Return EndFunc Func select_mark1() Local $msg GUICreate("SELECT SOURCE MARKINGS", 200, 100) GUICtrlCreateCombo("item1", 0, 0, 200); create first item GUICtrlSetData(-1, "item2|item3", "item3"); add other item snd set a new default $mark1_ok = GUICtrlCreateButton("OK", 50, 50, 100, 25) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $mark1_ok Then ; tried Return, Next, Exitloop ???? EndIf If $msg = $GUI_EVENT_CLOSE Then ExitLoop;(tried Return) WEnd EndFunc www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org
Kiti Posted June 20, 2008 Posted June 20, 2008 averylook at C:\Program Files\AutoIt3\Examples\GUI\Simple\child.au3 This should provide the info you need. Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30
GEOSoft Posted June 20, 2008 Posted June 20, 2008 Look at GUISwitch() George Reveal hidden contents 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!"
Kip Posted June 20, 2008 Posted June 20, 2008 $GUI_PARENT = guicreate.... $GUI_CHILD = guicreate.... _WinAPI_SetParent($GUI_CHILD, $GUI_PARENT) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
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