Danjen 0 Posted September 8, 2007 (edited) Hello world, I'm new to AutoIt. *waves hello* ... And coming from a crappy OO-language like Turing is a welcome break. Anyways, I'm having a little issue with opening up a GUI window from inside another one. Just a little macroing application I'm making, but I want it so that I can make a 'more interactive' window when I hit 'help -> about' than the MsgBox function apparently provides. Oh, and another thing is having my defined TIME() function update once per second. I'm not sure how to go about doing this, since if I put it in the While loop, it updates like 20 times a second. expandcollapse popup#include <GuiConstants.au3> ;;Functions func TIME();Gets the time and date. if @HOUR > 12 then $hour = @HOUR-12 $AMPM = "PM" else $hour = @HOUR $AMPM = "AM" endif $embosstimeanddate = GUICtrlCreateLabel ($hour & ":" & @MIN & ":" & @SEC & " " & $AMPM,0,315,310,16,$SS_SUNKEN) EndFunc ;Main Creation $window1 = GUICreate("Main Window",310,350,-1,-1,BitOr($WS_CAPTION,$WS_SYSMENU)) $emboss1 = GUICtrlCreateLabel ("",0,0,310,2,$SS_SUNKEN) $emboss2 = GUICtrlCreateLabel ("",0,3,310,84,$SS_SUNKEN) $emboss3 = GUICtrlCreateLabel ("",0,3,310,84,$SS_SUNKEN) ;Menubar $filemenu = GUICtrlCreateMenu("&File") $fileitem1 = GUICtrlCreateMenuItem("E&xit",$filemenu) $helpmenu = GUICtrlCreateMenu("&Help") $helpitem1 = GUICtrlCreateMenuItem("&Help",$helpmenu) $helpitem2 = GUICtrlCreateMenuItem("",$helpmenu) $helpitem3 = GUICtrlCreateMenuItem("&About",$helpmenu) ;Required Loop GuiSetState() TIME() While 1 $msg = GUIGetMsg() if $msg = $helpitem3 Then ??? endif if $msg = $fileitem1 or $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Exit Edited September 9, 2007 by Larry Share this post Link to post Share on other sites
maqleod 1 Posted September 9, 2007 (edited) Hello world, I'm new to AutoIt. *waves hello* ... And coming from a crappy OO-language like Turing is a welcome break. Anyways, I'm having a little issue with opening up a GUI window from inside another one. Just a little macroing application I'm making, but I want it so that I can make a 'more interactive' window when I hit 'help -> about' than the MsgBox function apparently provides. Oh, and another thing is having my defined TIME() function update once per second. I'm not sure how to go about doing this, since if I put it in the While loop, it updates like 20 times a second. expandcollapse popup#include <GuiConstants.au3> ;;Functions func TIME();Gets the time and date. if @HOUR > 12 then $hour = @HOUR-12 $AMPM = "PM" else $hour = @HOUR $AMPM = "AM" endif $embosstimeanddate = GUICtrlCreateLabel ($hour & ":" & @MIN & ":" & @SEC & " " & $AMPM,0,315,310,16,$SS_SUNKEN) EndFunc ;Main Creation $window1 = GUICreate("Main Window",310,350,-1,-1,BitOr($WS_CAPTION,$WS_SYSMENU)) $emboss1 = GUICtrlCreateLabel ("",0,0,310,2,$SS_SUNKEN) $emboss2 = GUICtrlCreateLabel ("",0,3,310,84,$SS_SUNKEN) $emboss3 = GUICtrlCreateLabel ("",0,3,310,84,$SS_SUNKEN) ;Menubar $filemenu = GUICtrlCreateMenu("&File") $fileitem1 = GUICtrlCreateMenuItem("E&xit",$filemenu) $helpmenu = GUICtrlCreateMenu("&Help") $helpitem1 = GUICtrlCreateMenuItem("&Help",$helpmenu) $helpitem2 = GUICtrlCreateMenuItem("",$helpmenu) $helpitem3 = GUICtrlCreateMenuItem("&About",$helpmenu) ;Required Loop GuiSetState() TIME() While 1 $msg = GUIGetMsg() if $msg = $helpitem3 Then ??? endif if $msg = $fileitem1 or $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Exit Edited September 9, 2007 by Larry [u]You can download my projects at:[/u] Pulsar Software Share this post Link to post Share on other sites