Jump to content

Piyush

Active Members
  • Posts

    107
  • Joined

  • Last visited

About Piyush

  • Birthday 09/04/1992

Profile Information

  • Location
    India
  • WWW
    http://piyushparkash.blogspot.com
  • Interests
    Learning Computer things by searching...., Playing Cricket

Piyush's Achievements

Adventurer

Adventurer (3/7)

0

Reputation

  1. Its stilll not working for me...I am also getting the same error as that of jijo. The udf, the dll file and the example file is in the same directory still it is not working. plz help..!!
  2. @pramrao- Welcome to Autoit's World...First thing you should do is to read the help file which comes with autoit setup completely and thoroughly and get the ideas of all the functions and the udfs in it..for your facebook task you can use the IE UDF included in autoit setup Best of Luck, Piyush EDIT: and yes if you have any query please post it in the General help and Support part of the forum...you posted in the wrong section..
  3. whoa! much better than what i thought...thx thx thx.....that works perfectly....
  4. thx a lot guys for the solution....haven't tested your code..yet because i am in college....and i don't have a laptop... i also wrote a function during these days..in my notebook...during my classes.......to perform this task.... i will certainly have a look at this...again...thanks...
  5. are you telling me to not to use the shortcuts i have used in the post for e.g. 'your' instead of 'ur'?And i tried to explain my problem..as much as i could..i don't know wht to add to it..:-(
  6. I need a function 4 this..for eg if i input this string 'this i the {[first|last|third]} {[tym|time]} i m saying this to u..' it should return..an array containing these 6 strings... 1.)'this is the first tym i m saying this to u..' 2.)'this is the last tym i m saying this to u..' 3.)'this is the third tym i m saying this to u..' 4.)'this is the first time i m saying this to u..' 5.)'this is the last time i m saying this to u..' 6.)'this is the third time i m saying this to u..' Here {[ and ]} are special tags in which words are placed..seperated by | thx waiting 4 ur replies...:-)
  7. i have been using this udf...bt never got result with _HTMLGetTable function...can you post an example of it..???
  8. thx 4 the example...actually...i misinterpreted the $endvalue parameter of the functions...so was not able to use the udf properly..again thx 4 the example...
  9. problem solved guys..woooohooo!!
  10. thanks for this code...i used code of yours which is inside the while loop and now my script fine..but showing some kind of error after compilation..i have put it in the help and support forum..
  11. Here is my script.... #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;Create voice and ear for jarvis here---- OnAutoItExitRegister("bye") Global $RecoContext = ObjCreate("SAPI.SpSharedRecoContext") If @error Then MsgBox(0, "", "Error opening the 'SAPI.SpSharedRecoContext' object. Error number: " & Hex(@error, 8)) Exit EndIf $voice = ObjCreate("SAPI.Spvoice") $GRAMMER = $RecoContext.CreateGrammar $GRAMMER.cmdloadfromfile("test.xml") $GRAMMER.cmdsetruleidstate(0, 1) $event = ObjEvent($RecoContext, "event_") $RecoContext.eventinterests = 16 + 512 + 1024 ;~ Global $h_Category = ObjCreate("SAPI.SpObjectTokenCategory") ;~ $h_Category.SetId("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput\TokenEnums\MMAudioIn\") ;~ Global $h_Token = ObjCreate("SAPI.SpObjectToken") ;~ $h_Token.SetId("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput\TokenEnums\MMAudioIn\") ;~ $RecoContext.recognizer.AudioInput = $h_Token Func event_Recognition($1, $2, $3, $4) $text = $4.phraseinfo.gettext() If $text = "exit" Then $RecoContext.voice.speak("Closing Sir") Exit EndIf If $text = "David" Or $text = "COMPUTER" Or $text = "hey" Or $text = "chote" Or $text = "darling" Then $RecoContext.voice.rate = 3 ;~ $RecoContext.voice.voice=$RecoContext.voice.getvoices.item(2) $RecoContext.voice.speak("Yes Sir") Else $RecoContext.voice.speak($text) EndIf EndFunc ;==>event_Recognition Func event_FalseRecognition($1, $2, $3) ConsoleWrite($3.phraseinfo.gettext() & @CRLF) EndFunc ;==>event_FalseRecognition While 1 Sleep(5000) ;Allow the Audio In to finalize processing on the last 5 second capture $RecoContext.Pause ;Resume audio in processing $RecoContext.Resume $event = ObjEvent($RecoContext, "event_") WEnd Func bye() $RecoContext=0 $GRAMMER=0 EndFunc ;==>bye when..i compile this script and run the EXE file it show this Error... Line 13 (File "C:\Documents and Settings\Administrator\Desktop\super software\speech.exe"): Error: The requested action with this object has failed. but it runs fine and gives no error when..i run..it through scite..i don't know why it is giving me error after compilation... Can't think of anything...please help...
  12. 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...!!!!
  13. i don't want to use it as..it takes much time...
  14. I have 2 question in this...thread.. 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...
×
×
  • Create New...