Jump to content

Search the Community

Showing results for tags 'suspend'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. with the below code, I am keeping waiting for a particular file and waiting in the background. While $i <> 10 Sleep(60000) If FileExists(@ScriptDir&"\Binaries.ini") then --some processing-- $i = 10 endif WEnd I thought keeping the Sleep will freeze the process from resources but the CPU being uilized.But it is taking 47%. How to free this CPU usage also.?
  2. I have a light bulb which I can turn on and off using UDP commands (I already have that working in AutoIt). What I would like to do is run a script before the computer goes to sleep to turn it off, and after it resumes to turn it on. I've already got the latter working, but not the former. I tried Task Scheduler with the kernel power log, but the command doesn't get executed until the computer resumes from sleep. I've tried some things using WM_POWERBROADCAST, but so far I haven't got that to work either. Here's what I've got so far: Global Const $WM_POWERBROADCAST = 0x218 Global Const $PBT_APMSUSPEND = 0x4 Global Const $PBT_APMRESUMEAUTOMATIC = 0x12 While 1 Sleep(100) WEnd GUICreate("Event Receiver") GUIRegisterMsg($WM_POWERBROADCAST,"MY_WM_POWERBROADCAST") Func MY_WM_POWERBROADCAST($hWnd, $uMsg, $wParam, $lParam) Switch $wParam Case $PBT_APMSUSPEND MsgBox(0,"PBT_APMSUSPEND","PBT_APMSUSPEND"&@HOUR&@MIN&@SEC) Case $PBT_APMRESUMEAUTOMATIC MsgBox(0,"PBT_APMSUSPEND","PBT_APMRESUMEAUTOMATIC"&@HOUR&@MIN&@SEC) EndSwitch EndFunc Does anyone know how to make this work?
×
×
  • Create New...