Katakan "Good Mornig" kepada JARVIS

Selamat datang di blok ku yang sederhana ini, pada kali ini aku akan membagikan module  WSRMacros untuk salam selamat pagi, siang atau sore. Nah ini yang unik, misalnya masih
pagi terus kalian bilang "Good afternoon Jarvis" maka dia akan jawab "Actually is not afternoon, but still morning sir". Silahkan dicoba

<speechMacros>
  <command>
                <listenFor>good morning</listenFor>
                <listenFor>morning</listenFor>
                <listenFor>morning Jarvis</listenFor>
                <listenFor>Good morning Jarvis</listenFor>
<script language="JScript">
<![CDATA[
var d = new Date();
vtime = d.getHours();

if(vtime<12){

vsay = "Good morning sir";

}

else if(vtime<18){

vsay = "Actually is not morning, but afternoon sir";

}

else{

vsay = "Actually is not morning, but evening sir";

}


Application.SetTextFeedback(vsay);

Application.Speak(vsay);




]]>
</script>
<setState name = "aConversation" value ="video" />
     <waitFor seconds = "5"/>
     <setState name ="aConversation" />

  </command>
  <command>
                <listenFor>Good afternoon </listenFor>

<listenFor>Good afternoon Jarvis</listenFor>
<script language="JScript">
<![CDATA[
var d = new Date();
vtime = d.getHours();

if(vtime<12){

vsay = "Actually is not afternoon, but still morning sir";

}

else if(vtime<18){

vsay = "Good afternoon sir";

}

else{

vsay = "Actually is not afternoon, but evening sir";

}


Application.SetTextFeedback(vsay);

Application.Speak(vsay);


]]>
</script>
<setState name = "aConversation" value ="video" />
     <waitFor seconds = "5"/>
     <setState name ="aConversation" />
</command>
<command>
<listenFor>Good evening </listenFor>
<listenFor>Good evening Jarvis</listenFor>
<script language="JScript">
<![CDATA[
var d = new Date();
vtime = d.getHours();

if(vtime<12){

vsay = "Actually is not evening, but still morning sir";

}

else if(vtime<18){

vsay = "Actually is not evening, but afternoon sir";

}

else{

vsay = "Good evening sir";

}


Application.SetTextFeedback(vsay);

Application.Speak(vsay);




]]>
</script>
<setState name = "aConversation" value ="video" />
     <waitFor seconds = "5"/>
     <setState name ="aConversation" />
</command>
<command>
                <listenFor>Good day Jarvis</listenFor>
<script language="JScript">
<![CDATA[
var d = new Date();
vtime = d.getHours();

if(vtime<12){

vsay = "Good morning sir";

}

else if(vtime<18){

vsay = "Good afternoon sir";

}

else{

vsay = "Good evening sir";

}


Application.SetTextFeedback(vsay);

Application.Speak(vsay);



Application.EmulateRecognition("What time is it");

]]>
</script>
</command>
<command>
     <stateIsSet name = "aConversation" value ="video" />
     <listenFor>Oh really?</listenFor>
<speak>yes sir</speak>
<script language="JScript">
<![CDATA[
Application.EmulateRecognition("What time is it");

]]>
</script>
<waitFor seconds ="3"/>
     <speak>Are you ok sir?</speak>
     <setState name ="aConversation" />
<setState name = "aConversation" value ="kiki" />
     <waitFor seconds = "5"/>
     <setState name ="aConversation" />

  </command>
<command>
     <stateIsSet name = "aConversation" value ="video" />
     <listenFor>Oh sorry</listenFor>
<listenFor>Sorry</listenFor>
<speak>No Problem Sir </speak>
<script language="JScript">
<![CDATA[
Application.EmulateRecognition("What time is it");

]]>
</script>
  </command>
<command>
     <stateIsSet name = "aConversation" value ="kiki" />
     <listenFor>not really</listenFor>
<listenFor>Yeah sure</listenFor>
<listenFor>Of Course</listenFor>
     <setState name ="aConversation" />
<setState name = "aConversation" value ="mimi" />
     <waitFor seconds = "5"/>
     <setState name ="aConversation" />

</command>
<command>
     <stateIsSet name = "aConversation" value ="mimi" />
     <listenFor>Why don't you ?Play some music</listenFor>
<listenFor>Some music may be great</listenFor>
<wmpMediaControl command="play"/>
     <setState name ="aConversation" />
</command>
</speechMacros>

Nah tidak cuma itu, kalian bisa sedikit ngobrol sama laptop kalian, contohnya
Admin: good morning Jarvis
Laptop: actualy is not morning but afternoon sir
Admin: Oh realy?
Laptop:  yes sir
                Are you ok sir?
Admin: not really
               Why don't you play some music?
Laptop: (play musik)

Atau
Admin: good morning Jarvis
Laptop: actualy is not morning but afternoon sir
Admin: Ohsorry.
Laptop: No problem sir.

Terserah anda mau coba yang mana.

Bagaimana seru kan? Jika ada ide lain bisa di share, atau mau ngerubah juga boleh, coba saja mungkin bisa  lebih seru. Sekian dulu post kali ini, dan semoga bermanfaat.

Comments

Popular posts from this blog

Membuat Laptop/PC kaya JARVIS

Aung San Suu Kyi

Download Frozen (2013) BluRay 720p 800MB via ganool