r2du-soft Posted September 24, 2020 Posted September 24, 2020 (edited) hi i create a source: expandcollapse popup;----------------------------------------------------- ;#includes #include-once #include <FontConstants.au3> #include <GuiConstants.au3> #include <Timers.au3> ;----------------------------------------------------- Local $GUI_HWNDPARENT Local $Label_Sleep_Timer Local $i_Timer_number_Counter = 5 Local $Starting_Screen_Timer _Splash_Screen() MsgBox(0, "", "END") Func _Splash_Screen() ;--------- $GUI_HWNDPARENT = GUICreate("Timer " & FileGetVersion(@ScriptFullPath), 300, 300, -1, -1, $WS_POPUPWINDOW) ;--------- GUIRegisterMsg($WM_NCHITTEST, "MoveGUI_Set") ;Move GUI from Click and Drag Drop ;--------- $Label_Sleep_Timer = GUICtrlCreateLabel("Delaying " & $i_Timer_number_Counter & "s", 150, 150, 100 , 15) GUICtrlSetBkColor($Label_Sleep_Timer, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($Label_Sleep_Timer, 0x59645d) GUICtrlSetFont($Label_Sleep_Timer, 9, $FW_BOLD) ;--------- GUISetState() ;--------- ;--------- $Starting_Screen_Timer = _Timer_SetTimer($GUI_HWNDPARENT, 1000, "_Splash_Screen_Timer") ;--------- While 1 IF $i_Timer_number_Counter <= "0" Then GUIDelete() ExitLoop EndIF WEnd EndFunc Func _Splash_Screen_Timer($hWnd_3, $iMsg_3, $iIDTimer_3, $iTime_3) #forceref $hWnd_3, $iMsg_3, $iIDTimer_3, $iTime_3 IF $i_Timer_number_Counter <= "0" Then _Timer_KillTimer($GUI_HWNDPARENT, $Starting_Screen_Timer) _Disable_Wait_GUI() Else $i_Timer_number_Counter = $i_Timer_number_Counter - 1 GUICtrlSetData($Label_Sleep_Timer, "Delaying " & $i_Timer_number_Counter & "s") EndIF EndFunc Func _Disable_Wait_GUI() ;--------------------------- GUISetState(@SW_DISABLE, $GUI_HWNDPARENT) ;--------------------------- EndFunc ;==>_Disable_Wait_GUI Func MoveGUI_Set($hWnd_a, $iMsg_a, $iwParam_a, $ilParam_a) if $hWnd_a = $GUI_HWNDPARENT and $iMsg_a = $WM_NCHITTEST then Return $HTCAPTION EndFunc after compile script with "Compile Script (x86)" and run the exe file if i click on gui and HOLD the click on gui, if timer equal 0 then i see a messagebox whit text END now if compile script with "Compile Script (x64)" and run the exe file if i click on gui and HOLD the click on gui now if timer equal 0 then program closed without show any message!! what it the problem and how can solve it? Edited September 24, 2020 by r2du-soft
Danp2 Posted September 24, 2020 Posted September 24, 2020 Your script is crashing in x64 mode. Your issue is here -- _Timer_KillTimer($GUI_HWNDPARENT, $Starting_Screen_Timer) From the help file -- Quote This function must not be used in the callback function set by _Time_SetTimer(). Commenting out this line and your script runs fine for me. r2du-soft 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
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