Jump to content

chrisT

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by chrisT

  1. Thanks your suggestion got me to finally find this Autoit user defined function "EventLog Management" which solved the problem
  2. Hi All I have been searching for a way to get the duration(mSec) that my PC has been AWAKENED from either sleep or hibernation. The only references I find mention of in the forums are related to time(mSec) since restart. Anyone point me in the right direction? thanks Chris
  3. Wow that worked a treat! Thanks jguinch it's appreciated! Curious how did you even know that? I'm guessing "Been there done that!!" ..lol
  4. Hi, I require #RequireAdmin to run Schtask.exe i.e create a Windows Scheduled Task, however, if I do then when running the following I will not see any network drives. #RequireAdmin ;Comment Out = NO SCHEDULE TASK CREATED, Not Commented Out = Can't access Network Drives #include <MsgBoxConstants.au3> $CMD = 'schtasks /Create /tn "TESTDEL" /tr "\"C:\Program Files (x86)\AutoIt3\SciTE\Koda\FD.exe\"" /sc weekly /d MON /st 17:00 /RL HIGHEST /F' EnvSet("PATH", @WindowsDir & "\sysnative;" & EnvGet("PATH") ) $iCreateSchedule = Run('"' & @ComSpec & '" /k ' & $CMD, @SystemDir) Example() Func Example() ; Create a constant variable in Local scope of the message to display in FileSelectFolder. Local Const $sMessage = "Select a folder" ; Display an open dialog to select a file. Local $sFileSelectFolder = FileSelectFolder($sMessage, "",6) If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No folder was selected.") Else ; Display the selected folder. MsgBox($MB_SYSTEMMODAL, "", "You chose the following folder:" & @CRLF & $sFileSelectFolder) EndIf EndFunc ;==>Example Exit Does anyone have any suggestions, I'm lost on this...Thanks
  5. Thanks guys for your responses, jguinch that explanation was spot on & steered me in the right direction, found this article & it cleared out all my remaining questions http://ovidiupl.wordpress.com/2008/07/11/useful-wow64-file-system-trick/ for others who may come this way
  6. Hi.. I'm trying to run WBAdmin.exe the win7/win8 backup using autoit, in both code examples below I get C:WLD VMRC>wbadmin /? 'wbadmin' is not recognized as an internal or external command, operable program or batch file. However when I run simply by manually opening a cmd prompt it will work C:Windowssystem32>wbadmin /? wbadmin 1.0 - Backup command-line tool © Copyright 2013 Microsoft Corporation. All rights ---- Commands Supported ---- START BACKUP -- Runs a one-time backup....... etc. Am I missing something here, any help appreciated, thanks #requireadmin Run("C:\WINDOWS\system32\cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send("wbadmin /?" & "{ENTER}") Exit #requireadmin $CMD = 'wbadmin /?' ;$CMD = 'c:\Windows\System32\wbadmin.exe /?' ;$CMD = "Ping 192.168.1.1" RunWait('"' & @ComSpec & '" /k ' & $CMD, @SystemDir) Exit
  7. 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
  8. Thanks, clear enough , however previous autoit versions when using Ctrl+F7(SciTE) to compile an au3, there was no need to include any directives & compiling would automatically include the relevant info by default so now it has null defaults ie version = 0.0.0.0, icon default to a windows icon..etc. I guess I was wanting to know how to avoid including directives in the au3 script?
  9. Hello Just updated Autoit to version 3.3.10.3 & now when compiling(Ctrl + F7) there is no default icon or "File version" number for the .exe How can I set these defaults(i.e to avoid browsing to the icon path or using Pragma directives #pragma compile(Icon, C:\Program Files\AutoIt3\Icons\au3.ico in au3 script) & where can I find more info on Pragma & how it fits together with AutoIt3Wrapper (A Dummies version) Some forum searching gave this thread anything else: '?do=embed' frameborder='0' data-embedContent>> Documentation http://www.autoitscript.com/autoit3/docs/directives/pragma-compile.htm
  10. 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
  11. Very nice, thanks. How would I be able to monitor "System Idle Process"
  12. cameronsdad Great!! thx for your quick response u make this look easy.....
  13. I have looked, leaving almost no stone unturned, does abody know a simple way, not just to filewriteline or filewrite, but to append an entire text file to another textfile, perhaps ClipPut/ClipGet with a $string variable, sorry I'm very new here, forgive my ignorance.
×
×
  • Create New...