Today I will be going to show how to make a remote desktop control with autoit. This is really a crude method of doing so but works fine for small purposes. Main advantage is that controlling keys would be comments on a blog which can be easily done by any mobile phone with GPRS connectivity. So you would actually be able to control your PC with your basic mobile phone remotely via Internet.
Here is a working video of this..........
And here's the code explained in comments of code
; This file shows you how to your pc capable of being controlled remotely
; It needs some thing to be updated on internet so we will be using the comments on a post on my blog as inputs
#include <IE.au3>
#include <INet.au3>
#include <String.au3>
;getting the source
Global $sSource = _INetGetSource("http://mcadventures369.blogspot.in/2012/12/control.html")
;removing ''s to avoid confusion between program's ' and source's '
$sstring = StringReplace($sSource,"'","")
;getting the names of persons who commented
$sstring1 = _StringBetween($sstring,'href=http://www.blogger.com/profile/','</a></cite><span class=')
$sz1 = UBound($sstring1)
;getting the latest one
$userid = StringSplit($sstring1[$sz1-1],">")
$sz2 = UBound($userid)
;getting the remote commands and selecting the latest
$keyword = _StringBetween($sstring,'MC class=comment-content>','</p><span id=')
$sz3 = UBound($keyword)
;doing some thing according to keywords if commented by me
If ($userid[$sz2-1] == "Manjith Chakravarthi") Then
Switch $keyword[$sz3-1]
Case "say hi"
MsgBox(0,"","hi")
Case "say bye"
MsgBox(0,"","bye")
EndSwitch
EndIf
Exit
;This is just for demo, you can also improve it by using funtions like Shutdown()
;Have Fun .. :D!!!!
You can also download source from here.
And here's the code explained in comments of code
; This file shows you how to your pc capable of being controlled remotely
; It needs some thing to be updated on internet so we will be using the comments on a post on my blog as inputs
#include <IE.au3>
#include <INet.au3>
#include <String.au3>
;getting the source
Global $sSource = _INetGetSource("http://mcadventures369.blogspot.in/2012/12/control.html")
;removing ''s to avoid confusion between program's ' and source's '
$sstring = StringReplace($sSource,"'","")
;getting the names of persons who commented
$sstring1 = _StringBetween($sstring,'href=http://www.blogger.com/profile/','</a></cite><span class=')
$sz1 = UBound($sstring1)
;getting the latest one
$userid = StringSplit($sstring1[$sz1-1],">")
$sz2 = UBound($userid)
;getting the remote commands and selecting the latest
$keyword = _StringBetween($sstring,'MC class=comment-content>','</p><span id=')
$sz3 = UBound($keyword)
;doing some thing according to keywords if commented by me
If ($userid[$sz2-1] == "Manjith Chakravarthi") Then
Switch $keyword[$sz3-1]
Case "say hi"
MsgBox(0,"","hi")
Case "say bye"
MsgBox(0,"","bye")
EndSwitch
EndIf
Exit
;This is just for demo, you can also improve it by using funtions like Shutdown()
;Have Fun .. :D!!!!
You can also download source from here.
0 comments:
Post a Comment