Sign in to follow this  
Followers 0
Piyush

2 questions..

6 posts in this topic

I have 2 question in this...thread..:x

First One:

Can Autoit make PC come out stand by(sleep) after specific interval..or when an event occurs...

I am using Microsoft Speech Recognition...i want to make a script which...make computer..come out of standby...when i say...wake Up!!..

Second One:

has any one made...wikipedia text parser.??

i want to get the text of the articles of Wikipedia..

thnks...waiting 4 ur replies...


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites



I have 2 question in this...thread..:x

First One:

Can Autoit make PC come out stand by(sleep) after specific interval..or when an event occurs...

I am using Microsoft Speech Recognition...i want to make a script which...make computer..come out of standby...when i say...wake Up!!..

Second One:

has any one made...wikipedia text parser.??

i want to get the text of the articles of Wikipedia..

thnks...waiting 4 ur replies...

1. Don't think so. Only the OS can handle stand by state as far as I know. But question still remains open as I'm not sure.

2. I'm sure you can do it yourself, it wouldn't be hard, anyway, just search into the forums, like everyone do. Personally, I don't know if anyone made a similar script, but I think u can find valid web parsers that can be adapted to wikipedia.


I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites

Definitely look at IE UDF. It's in helpfile.

i don't want to use it as..it takes much time...Posted Image


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites

searching the forum..the best thing i got was this script which runs specific programs when computer goes into..suspend state or comes out of it.

#include 

$logfile = @ScriptDir&"\mp_standby-hook.log"
$delystdby = 30   ;seconds to delay standby
$mes = ""

Global $WM_POWERBROADCAST         = 536
Global $PBT_APMQUERYSUSPEND       = 0x0000
Global $PBT_APMQUERYSTANDBY       = 0x0001
Global $PBT_APMQUERYSUSPENDFAILED = 0x0002
Global $PBT_APMQUERYSTANDBYFAILED = 0x0003
Global $PBT_APMSUSPEND            = 0x0004
Global $PBT_APMSTANDBY            = 0x0005
Global $PBT_APMRESUMECRITICAL     = 0x0006
Global $PBT_APMRESUMESUSPEND      = 0x0007
Global $PBT_APMRESUMESTANDBY      = 0x0008
Global $PBT_APMBATTERYLOW         = 0x0009
Global $PBT_APMPOWERSTATUSCHANGE  = 0x000A
Global $PBT_APMOEMEVENT           = 0x000B
Global $PBT_APMRESUMEAUTOMATIC    = 0x0012
Global $PBTF_APMRESUMEFROMFAILURE = 0x00000001
Global $ES_DISPLAY_REQUIRED       = 0x00000002; zero the display's idle timer
Global $ES_SYSTEM_REQUIRED        = 0x00000001; zero the system's idle timer
Global $ES_CONTINUOUS             = 0x80000000; keep the display or system on (doesn't work?)

$hGUI = GUICreate("Standby", 1,1,1,1,-1)
GUIRegisterMsg($WM_POWERBROADCAST, "Standby")  ;hook into win32 pm API
GUISetState(@SW_MINIMIZE,$hGUI)

$g_szVersion = "MP_StandBy-Hook"
If WinExists($g_szVersion) Then Exit ; It's already running
AutoItWinSetTitle($g_szVersion)
WriteToLog($g_szVersion&" started...")

While 1
    $GUIMsg = GUIGetMsg()
    Switch $GUIMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
    Sleep (60000) ; Sleep for a minute
WEnd

Func Standby($hWnd, $Msg, $wParam, $lParam)
    Switch $wParam
        Case $PBT_APMQUERYSUSPEND         ; gets called first on standby request
            WriteToLog("PBT_APMQUERYSUSPEND received...")
            For $i=$delystdby to 1 Step -1
                DllCall("kernel32.dll","int","SetThreadExecutionState","int", $ES_SYSTEM_REQUIRED)
                WriteToLog("Delaying Standby: "&$i&" s.")
                Sleep(1000)
            Next

        Case $PBT_APMSUSPEND              ; gets called second on standby request
            WriteToLog("PBT_APMSUSPEND received...")
            WriteToLog("Entering Standby...")

        Case $PBT_APMRESUMEAUTOMATIC      ; gets called first after resume
            WriteToLog("PBT_APMRESUMEAUTOMATIC received...")
            WriteToLog("Resuming from Standby...")

        Case $PBT_APMRESUMESUSPEND        ; gets called second after resume
            WriteToLog("PBT_APMRESUMESUSPEND received...")
            WriteToLog("Checking MediaPortal...")
            Sleep(5000)
            If Not ProcessExists("mediaportal.exe") Then
                Run("c:\_mp\mediaportal.exe","c:\_mp")
            EndIf
            Sleep(5000)

        Case $PBT_APMQUERYSTANDBY
            WriteToLog("PBT_APMQUERYSTANDBY received...")
        Case $PBT_APMQUERYSUSPENDFAILED
            WriteToLog("PBT_APMQUERYSUSPENDFAILED received...")
        Case $PBT_APMQUERYSTANDBYFAILED
            WriteToLog("PBT_APMQUERYSTANDBYFAILED received...")
        Case $PBT_APMRESUMECRITICAL
            WriteToLog("PBT_APMRESUMECRITICAL received...")
        Case $PBT_APMRESUMESTANDBY
            WriteToLog("PBT_APMRESUMESTANDBY received...")
        Case $PBT_APMSTANDBY
            WriteToLog("PBT_APMSTANDBY received...")
        Case $PBT_APMPOWERSTATUSCHANGE
            WriteToLog("PBT_APMPOWERSTATUSCHANGE received...")
        Case $PBT_APMOEMEVENT
            WriteToLog("PBT_APMOEMEVENT received...")
        Case Else
            WriteToLog("Some unknown standby related message received... WTF?")
    EndSwitch
EndFunc

Func WriteToLog($mes)
    ConsoleWrite($mes)
Endfunc

....is there any way to..send a msg to computer to wake up from stand by...as it receives when ..our computer is in stand by state and..when we press any key...it sends to computer and it comes out of stand by...!!!! Posted Image


[font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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