friends Posted September 27, 2004 Posted September 27, 2004 well.... I just downloaded the latest v103 AutoIT, and there are too many GUI syntax have been changed. I'm still trying to catch up with the latest syntax, somehow, I'm still blurred btw... for the time being, can someone change the below coding to the latest GUI syntax ? I've tried to change it... but the GUI part did not work out like before. Big thanks...... expandcollapse popup#include <GUIconstants.au3> $MsgText = "POS application will be launched automatically in " $CountdownTime = 10 $Val = TimedMsgBox (0, ":: Panda Tools :: POS Launcher v1.0", $MsgText, $CountdownTime) Func TimedMsgBox ($flag, $title, $MsgText, $timeout) OPT ("GUINotifyMode", 1) GUICreate (":: Panda Tools :: POS Launcher v1.0", 350, 168, (@DesktopWidth-350)/2, (@DesktopHeight-168)/2, 0x00020000) $font = "Arial" $CountdownMsg = GUISetControl ("label", "", 25, 40, 330, 60) GUISetControlFont (-1, 14, 800, $font) $font = "Arial" $LaunchMsg = GUISetControl ("label", "", 37, 55) GUISetControlFont (-1, 14, 800, $font) GUIShow() GUIWrite ($CountdownMsg, 0, $MsgText & $timeout & " seconds ") $start = TimerStart() WHILE 1 Sleep (50) IF TimerStop($start) > 1000 THEN $start = TimerStart() $timeout = $timeout - 1 $unit = " seconds" IF $timeout = 1 THEN $unit = " second" GUIWrite ($CountdownMsg, 0, "POS application will be launched automatically in " & $timeout & $unit) ENDIF IF $timeout <= 0 THEN GUIWrite ($CountdownMsg, 0, " ") GUIWrite ($LaunchMsg, 0, "Launching POS application.....") Sleep(1500) GUIDelete() Exitloop ENDIF WEND EXIT EndFunc
CyberSlug Posted September 27, 2004 Posted September 27, 2004 ConvertGui 0.1.1 appears to not always remove the GUIWrite statements even though it converts them okay..... Here's your script when I remove the GuiWrites after using ConvertGUI and JdeB's Tidy: expandcollapse popup#include <GUIconstants.au3> $MsgText = "POS application will be launched automatically in" $CountdownTime = 10 $Val = TimedMsgBox(0, "::Panda Tools::POS Launcher v1.0", $MsgText, $CountdownTime) Func TimedMsgBox($flag, $title, $MsgText, $timeout) OPT ("GUINotifyMode", 1) GUICreate("::Panda Tools::POS Launcher v1.0", 350, 168, (@DesktopWidth - 350) / 2, (@DesktopHeight - 168) / 2, 0x00020000) $font = "Arial" $CountdownMsg = GUICtrlCreatelabel ("", 25, 40, 330, 60) GuiCtrlSetFont (-1, 14, $font, 800) $font = "Arial" $LaunchMsg = GUICtrlCreatelabel ("", 37, 55) GuiCtrlSetFont (-1, 14, $font, 800) GuiSetState (@SW_SHOW) GuiCtrlSetData ($CountdownMsg, $MsgText & $timeout & "seconds") $start = TimerStart() While 1 Sleep(50) If TimerStop($start) > 1000 Then $start = TimerStart() $timeout = $timeout - 1 $unit = "seconds" If $timeout = 1 Then $unit = "second" GuiCtrlSetData ($CountdownMsg, "POS application will be launched automatically in" & $timeout & $unit) EndIf If $timeout <= 0 Then GuiCtrlSetData ($CountdownMsg, "") GuiCtrlSetData ($LaunchMsg, "Launching POS application.....") Sleep(1500) GUIDelete() ExitLoop EndIf Wend Exit EndFunc ;==>TimedMsgBox Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
friends Posted September 27, 2004 Author Posted September 27, 2004 @CS, thanks for the conversion ! I did use your GUIConvert, however it does not work out as I'm still blur on what to change. Thank god you helped me out.... very appreciated ! I'll catch u if there is problem of this....
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