Sign in to follow this  
Followers 0
chrisT

Msgbox not timing out??

3 posts in this topic

I run Win8.1(64bit) and compile au3 as x86(32bit) where could I start to troubleshoot msgbox's not timing out? I actually have to click a button (OK) for the msgbox to close & resume excuting the exe. These exe's are launched using Windows Task Manager.

If I run the exe's manual or start them with Windows Task Manager Msgbox timeout is ok. It appears intimitently

Any help appreciated

Thanks Chris

Share this post


Link to post
Share on other sites



can we see your code so we can if you r doing it right??

Share this post


Link to post
Share on other sites

Hi I finally have a script that isn't intermittent when the "timeout" doesn't work with msgbox, keep in mind that this script is launched automatically by "Windows Task Manager" into session 1 & when compiled is x86 & the latest version of Autoit 3.3.10.2 & the OS is Windows 8.1 64bit.

Why would the MSGBOX not timeout on line No.38 with MsgBox(64,"","Not a Market Holiday! CONTINUING...",2)

Any help appreciated, thx

#pragma compile(FileVersion, 3.3.10.2)
#pragma compile(Icon, C:\Program Files (x86)\AutoIt3\Icons\au3.ico);au3script_v9.ico au3script_v10.ico


#include <Date.au3>
#include <Array.au3>


Dim $aHolidays
Local $sHolidays = "20131128,20131225,20140101,20140120,20140217,20140418,20140526,20140704,20140901,20141127,20141225,20150101,20150119,20150216,20150403,20150525,20150703,20150907,20151126,20151225,20160101,20160118,20160215,20160325,20160530,20160704,20160905,20161124,20161226"
$aHolidays = StringSplit($sHolidays,",")
$iWeekday = _DateToDayOfWeek (@YEAR, @MON, @MDAY);Returns Day of the Week Range is 1 to 7 where 1=Sunday
If $iWeekday = 2 Then
    $iDateLast = _DateAdd( 'd',-3,_NowCalcDate());format YYYY/MM/DD ie Weekday = Monday(2) = Friday is last trading day
Else
    If $iWeekday = 1 Then
        $iDateLast = _DateAdd( 'd',-2,_NowCalcDate());ie Weekday = Sunday(1) = Friday is last trading day
    Else
        $iDateLast = _DateAdd( 'd',-1,_NowCalcDate());ie All other days of the week subtract 1 Day!!
    EndIf
EndIf

$iDateLast = StringReplace($iDateLast,"/", "")
$isHoliday = _ArraySearch ($aHolidays, $iDateLast); returns the index that $iDateLast was found at
If $isHoliday <> -1 Then

    $Hib = MsgBox(36,"","It is a market holiday! SLEEP?",30)
    If $Hib = 6 or $Hib = -1 Then
        $fWLD_Finish_Log = FileOpen("C:\WLD VMRC\WLD_Finish_Log.txt",1)
        FileWriteLine($fWLD_Finish_Log,_NowCalcDate() & " " & _NowTime(5) & " - MARKET HOLIDAY!")
        FileClose($fWLD_Finish_Log)
        Run("C:\WLD VMRC\email.exe","C:\WLD VMRC",@SW_HIDE);Added 20131011
        SplashTextOn("Holiday", "It is a market holiday!!", -1, -1, -1, -1, 4, "")
        Shutdown(32); MsgBox(0,"","Sleep")
        Exit
    EndIf
Else
    MsgBox(64,"","Not a Market Holiday! CONTINUING...",2)
EndIf

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0