;This script will calculate the Nth weekday of any month. Just replace the numbers for $Year, $Month, $Week, and $Weekday with numbers of your choice,
;Some lines are not really needed but are there to allow testing and proofing. It is based on Excel formula.
Global $tmp, $Year = "2019", $Month = "2", $Week = 2, $WeekDay = 4
Global $aNth = StringSplit("First ,Second ,Third ,Fourth ,Fifth ", ",")
Func GetWeekDay($Week, $Year, $Month, $WeekDay)
Local $LastDay = 8 - $WeekDay, $EndDay = $Week * 7 + 1
$Month = $Month > 10 ? $Month : "0" & $Month
Local $iWday = _DateToDayOfWeek($YEAR, $Month, $LastDay)
Return $YEAR & "/" & $Month & "/" & $EndDay - $iWday
MsgBox(0,'',$aNth[$Week] & _DateDayOfWeek($WeekDay) & " of " & _DateToMonth($Month) & _
" " & $Year & " is " & GetWeekDay($Week, $Year, $Month, $WeekDay) )
So I just got a new computer, and instantly went and installed Autoit onto it. I selected run script as default action when clicking on an au3 file, however every time I do this it opens the script in the editor. I can from there run the script no problem.
I've tried reinstalling and checking the settings by hitting "Ctrl+1" and have confirmed it is set to run, but yet it just continues to open in the editor.
Any ideas why this is happening or how to solve?
New system is windows 10, old was windows 7
Im trying to launch a .exe file that is nested within the program files (x86) folder structure. i have already used the standard RunAs Syntax and found that it fails to launch the application. I have switched to Run and that seems to work. My issue is I have to use RunAs as the applicaton would need to run under a completely different account. The Current logged in user is a Local User on the machine, however, the application must be run as a domain user. The Machine is domain connected.
have tried the following:
RunAs("username","logonpassword", $RUN_LOGON_PROFILE, "D:\Program Files (x86)\Vendor\Application Name\Exe Location\Executable.exe") The above fails to launch, there are no errors or syntax issues, it just does nothing when the variables are replaced for the correct values.
I did the same using the Run command
Run("D:\Program Files (x86)\Vendor\Application Name\Exe Location\Executable.exe") That seems to work fine, but runs in local user context. Any thoughts? Could it be a local Machine rights issue? Or have i missed something glaring in my script